Beanie496 / Crab

Crab: a chess engine written in Rust. Originally written as part of my Computer Science A-level coursework.
GNU General Public License v3.0
1 stars 0 forks source link

Crab still losing on time. #1

Closed CPagador closed 1 month ago

CPagador commented 2 months ago

Hi,

I run tournaments at 3'+2", ponder off and single thread. Older versions of Crab like 3.12.0 and 3.28.0 (compiled by Guenther Simon) lost many times on time (>30% of the games). I am using version 4.4.0 for my current tournament and it is still losing on time, although less.

https://talkchess.com/forum3/viewtopic.php?t=84301

These are from PL11:

[Event "Computer Chess Game"]
[Site "DESKTOP-PIO4BDF"]
[Date "2024.09.29"]
[Round "1"]
[White "Project Invincible 2.10"]
[Black "Crab 4.4.0 GS"]
[Result "1-0"]
[TimeControl "180+2"]
[Annotator "6. -0.03   6... +0.07"]

1. c4 c5 2. Nf3 Nc6 3. d4 cxd4 4. Nxd4 Nf6 5. Nc3 e6 6. Bg5 {-0.03/6 5} Be7
{+0.07/23 5} 7. e4 {+0.06/6 5} O-O {+0.21/24 6} 8. Be2 {+0.11/6 5} Qa5
{+0.04/22 4} 9. Bxf6 {+0.37/5 5} Bxf6 {+1.02/27 5} 10. Nxc6 {+0.20/5 5}
Bxc3+ {+1.30/26 4} 11. bxc3 {-0.88/6 5} Qxc3+ {+1.30/27 4} 12. Kf1
{-0.97/6 5} dxc6 {+1.44/27 5} 13. Kg1 {-1.03/6 5} e5 {+1.98/24 6} 14. Rb1
{-1.03/6 5} Be6 {+1.83/28 8} 15. Rb3 {-0.95/6 5} Qa5 {+2.11/27 5} 16. Rxb7
{-0.95/6 5} Rad8 {+2.30/27 15} 17. Qb1 {-0.92/6 5} Rd2 {+2.46/30 5} 18. Rb2
{-1.27/6 5} Rxb2 {+4.20/31 4} 19. Qxb2 {-4.03/7 4} Qe1+ {+4.43/30 5} 20.
Bf1 {-3.87/7 4} Bxc4 {+4.41/31 19} 21. h3 {-3.91/7 4} Bxf1 {+4.43/30 3} 22.
Qxe5 {-4.02/6 4} Bd3+ {+4.95/27 5} 23. Kh2 {-3.97/7 4} Qxf2 {+5.19/29 15}
24. Qg3 {-4.99/6 4} Qxg3+ {+5.55/27 14} 25. Kxg3 {-4.98/8 4} Bxe4
{+5.53/25 2.7} 26. Re1 {-4.99/8 4} f5 {+5.65/24 3} 27. Re2 {-4.90/7 4} Rd8
{+5.99/26 9} 28. Kf4 {-4.89/7 4} Rd3 {+5.96/24 4} 29. Rb2 {-4.88/7 4} Kf7
{+6.35/21 2.4} 30. g4 {-4.99/6 4} Kf6 {+6.60/25 2.7} 31. g5+ {-4.98/7 4}
Kg6 {+7.56/23 6} 32. Rb3 {-4.89/7 4} Rxb3 {+14.81/34 2.6} 33. axb3
{-5.75/9 4} a5 {+16.40/34 3} 34. h4 {-5.89/9 4} Bd5 {+21.91/38 2.7} 35. Ke5
{-5.81/9 4}
{White wins on time} 1-0

[Event "Computer Chess Game"]
[Site "DESKTOP-PIO4BDF"]
[Date "2024.09.29"]
[Round "9"]
[White "Crab 4.4.0 GS"]
[Black "Perseus dev ea813b9 JA"]
[Result "0-1"]
[TimeControl "180+2"]
[Annotator "6. +0.22   6... -0.26"]

1. e4 c5 2. Nf3 e6 3. d4 cxd4 4. Nxd4 a6 5. Bd3 Bc5 6. c3 {+0.22/22 5} d6
{-0.26/20 7} 7. O-O {+0.24/26 6} Nf6 {-0.19/22 6} 8. Bg5 {+0.24/24 5} h6
{-0.03/20 7} 9. Bh4 {+0.28/22 5} e5 {-0.18/22 7} 10. Nf5 {+0.35/24 6} g5
{-0.08/23 6} 11. Bg3 {+0.42/27 5} Bxf5 {-0.05/22 5} 12. exf5 {+0.38/27 5}
Nc6 {+0.01/19 4} 13. Nd2 {+0.30/24 7} d5 {-0.14/20 4} 14. Re1 {+0.36/26 5}
O-O {-0.04/20 6} 15. Nb3 {+0.22/26 10} Bd6 {-0.07/22 6} 16. Bc2
{+0.35/25 5} Kh7 {+0.03/20 6} 17. Qd2 {+0.62/25 12} Re8 {+0.01/21 4} 18.
Qe3 {+0.31/20 4} e4 {+0.41/22 4} 19. Rac1 {+0.14/21 4} Ne5 {+0.53/21 3} 20.
Nd2 {-0.14/22 10} Rc8 {+0.69/21 5} 21. Qe2 {-0.18/24 4} Neg4 {+0.66/23 5}
22. Nf1 {-0.05/24 5} Bf4 {+0.60/24 5} 23. Rcd1 {-0.13/24 6} b5 {+0.55/22 5}
24. Rd4 {+0.09/24 4} Ne5 {+0.54/21 7} 25. Ne3 {+0.00/25 10} Nc6
{+0.92/25 3} 26. Rdd1 {-0.52/23 6} d4 {+0.78/24 3} 27. Rf1 {-0.73/25 7} d3
{+1.37/25 6} 28. Qe1 {-0.98/27 2.8} Qd7 {+1.50/23 5} 29. Bb3 {-1.13/23 4}
Na5 {+1.43/23 4} 30. h3 {-1.12/24 5} Rcd8 {+1.69/25 4} 31. Qd2 {-1.40/26 3}
Qc7 {+1.69/27 4} 32. Rfe1 {-1.54/26 9} Bxg3 {+1.85/25 4} 33. fxg3
{-1.78/30 27} Nxb3 {+1.92/25 2.7} 34. axb3 {-1.72/25 2.6} Qxg3 {+1.89/24 4}
35. Qf2 {-1.72/25 7} Nh5 {+1.86/22 5} 36. Rd2 {-1.68/23 2.6} Kg7
{+1.86/25 5} 37. Qxg3 {-1.69/26 3} Nxg3 {+1.83/24 2.9} 38. Kf2
{-1.69/25 2.2} Ne2 {+1.88/25 8} 39. Ra1 {-1.66/22 2.2} Rd6 {+1.96/23 2.7}
40. g3 {-1.68/22 2.3} b4 {+2.15/22 2.2} 41. cxb4 {-2.05/24 1.9} Nd4
{+2.23/23 4} 42. Rdd1 {-2.26/25 4} Rb6 {+2.32/22 7} 43. Ra4 {-2.33/20 3}
Nxb3 {+2.37/23 2.2} 44. h4 {-2.33/21 2.3} Re5 {+2.51/24 5} 45. h5
{-2.14/25 2.2} Reb5 {+2.41/25 4} 46. g4 {-2.22/25 2.1} Rc6 {+2.42/23 2.2}
47. Rf1 {-2.07/24 2.4} Nd4 {+2.44/23 2.7} 48. Rd1 {-2.87/23 7} Kh7
{+2.59/23 4} 49. Ke1 {-2.27/22 1.9} Nb3 {+2.83/25 3} 50. Kf2 {-2.87/24 1.8}
Rc2+ {+3.16/24 2.1} 51. Nxc2 {-2.91/27 1.8} dxc2 {+3.47/28 2.0} 52. Rf1
{-3.11/31 2.4} c1=Q {+3.52/28 3} 53. Rxc1 {-3.35/31 4} Nxc1 {+3.70/26 1.9}
54. Ke3 {-3.42/30 3} Nd3 {+3.72/26 2.7} 55. Kxe4 {-3.55/30 4} Ne5
{+3.72/26 2.4} 56. Kd4 {-3.66/28 6} Nxg4 {+4.00/27 7} 57. Kc3
{-3.79/24 1.6} Nf2 {+3.99/26 1.9} 58. Rxa6 {-3.88/27 1.5} Rxf5 {+4.06/27 5}
59. Ra1 {-3.88/25 6} g4 {+4.15/26 2.4} 60. Rg1 {-4.75/26 4} Rxh5
{+4.24/25 2.0} 61. Kc4 {-4.97/28 1.8} Rg5 {+4.34/28 2.7} 62. b5
{-4.95/25 2.4} Rg6 {+4.39/27 2.2} 63. Rg2 {-4.81/26 1.5} g3 {+4.48/30 1.8}
64. b6 {-5.08/30 2.7} Rxb6 {+4.52/30 2.7} 65. Rxg3 {-5.40/28 5} Rxb2
{+4.61/28 1.7} 66. Kd4 {-6.02/28 1.9} h5 {+5.07/23 2.0} 67. Rf3
{-7.43/26 6} Kg6 {+5.23/24 1.6} 68. Rg3+ {-7.96/25 1.6} Ng4 {+5.32/23 1.7}
69. Kc3 {-7.95/27 1.3} Rf2 {+5.54/24 2.4} 70. Kd4 {-9.20/31 1.5} f5
{+6.14/25 2.3} 71. Rh3 {-7.49/23 1.4} h4 {+8.49/24 2.0} 72. Rxh4
{-7.70/24 1.3} Rh2 {+99.33/33 1.8} 73. Rxh2 {+0.00/40 25} Nxh2
{+99.63/36 2.2}
{Black wins on time} 0-1

[Event "Computer Chess Game"]
[Site "DESKTOP-PIO4BDF"]
[Date "2024.09.29"]
[Round "11"]
[White "Crab 4.4.0 GS"]
[Black "Priessnitz 1.0 JA"]
[Result "0-1"]
[TimeControl "180+2"]
[Annotator "6. +0.34   6... -0.12"]

1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 4. Ba4 Nf6 5. d3 b5 6. Bb3 {+0.34/23 5} Bc5
{-0.12/21 6} 7. Nc3 {+0.47/24 6} d6 {-0.19/23 8} 8. Nd5 {+0.44/25 6} Na5
{-0.20/25 10} 9. Bg5 {+0.52/25 6} c6 {-0.08/25 8} 10. Nxf6+ {+0.52/26 6}
gxf6 {-0.13/26 17} 11. Bh4 {+0.49/25 6} Bb6 {-0.14/22 5} 12. Qd2
{+0.68/23 6} Rg8 {-0.20/23 5} 13. Qh6 {+0.66/26 7} Rg6 {-0.19/25 7} 14.
Qxh7 {+0.64/28 4} Nxb3 {-0.12/23 5} 15. Qh8+ {+0.73/29 6} Ke7 {-0.14/24 5}
16. Qxd8+ {+0.75/29 15} Kxd8 {-0.07/24 5} 17. axb3 {+0.76/28 8} Kc7
{-0.04/25 7} 18. O-O {+0.64/27 9} a5 {+0.08/23 5} 19. Bg3 {+0.64/27 25} Rg8
{+0.02/24 12} 20. Rfd1 {+0.70/25 4} Be6 {+0.08/21 5} 21. d4 {+0.73/25 6}
Bg4 {+0.28/23 7} 22. dxe5 {+0.50/24 6} fxe5 {+0.29/25 9} 23. Rd2
{+0.42/23 3} Bc5 {+0.36/25 6} 24. Ne1 {+0.35/26 9} Be6 {+0.52/22 5} 25. Nd3
{+0.24/25 5} Bb6 {+0.41/24 4} 26. Re1 {+0.21/25 6} a4 {+0.54/24 5} 27. bxa4
{+0.00/24 5} bxa4 {+0.45/23 4} 28. Rc1 {+0.00/25 7} a3 {+0.48/25 5} 29.
bxa3 {-0.05/27 4} Rxa3 {+0.58/25 4} 30. c4 {-0.22/24 10} f6 {+0.57/25 4}
31. Bh4 {+0.00/24 2.1} Rg6 {+0.55/25 8} 32. Kh1 {-0.24/26 2.6} Bd4
{+0.64/25 4} 33. Nf4 {-0.20/29 4} exf4 {+0.41/29 5} 34. Rxd4 {-0.10/28 3}
c5 {+0.22/27 9} 35. Rdd1 {-0.16/28 42} Rh6 {+0.37/27 3} 36. g3
{+0.00/24 1.2} Bg4 {+0.21/24 4} 37. Re1 {-0.13/27 1.2} Bf3+ {+0.34/24 4}
38. Kg1 {-0.14/28 2.0} Kc6 {+0.37/27 3} 39. Rc2 {-0.34/28 11} Kd7
{+0.42/28 5} 40. Rcc1 {-0.11/26 4} Ke6 {+0.44/28 7} 41. e5 {+0.00/26 1.1}
dxe5 {+0.67/25 5} 42. Rb1 {-0.26/24 1.3} Ra6 {+0.54/22 3} 43. Rb3
{+0.00/28 1.3} Bc6 {+0.62/25 4}
{Black wins on time} 0-1

Regards, Carlos

rwbc commented 2 months ago

A few things here Carlos,

You should add that this was played with lot of concurrency (and how much for the given games above)?

Also as it is in old WB (no native uci support), was this played via Polyglot or HGMs adapter?

Finally a debug/log file for such a time loss would be really helpful, otherwise it will be difficult. Do you also have time losses in Cutechess e.g.?

Guenther

CPagador commented 2 months ago

Hi Guenther,

Yes, concurrency is 14/15 threads out of 16 threads available. The GUI is Winboard 4.6.2 and polyglot adapter is used for UCI engines. All engines play with the same conditions, not all of them lose on time. I am talking about close to 800 engines and only 4 or 5 engines lose on time. Why do I use old Winboard? Because WB is the only GUI that let me run a Swiss tournament with many games at the same time. Why not latest WB? I did try (imagine to install 800 engines, but I did), the problem was that more engines could run under old WB than in the latest WB, so to include more engines in my tournament I use WB 4.6.2.

I only use Cute Chess for FRC testing, and almost no time losses. In the last edition of my FRC tournament, 2520 games were played and only 3 time forfeits. Considering the time control is shorter 1'+0.5", I think the games lost on time percentage is very low.

About the debug file, with many games running on parallel the debug info would be overlapped in the winboard.debug file (unless there is a way to generate an independent debug file for each game, if you know how to do it, please let me know.)

I could run a gauntlet for Crab (only one instance of WB) and wait for time losses. It would be helpful if Crab had an option to create a log for each game played and see why it loses on time.

Carlos

CPagador commented 2 months ago

Ok, I got one game where Crab lost again on time, again having a decisive advantage.

Here is the game:

[Event "Computer Chess Game"]
[Site "DESKTOP-PIO4BDF"]
[Date "2024.09.30"]
[Round "9"]
[White "Crab 4.4.0 GS"]
[Black "Lishex 1.1.1"]
[Result "0-1"]
[TimeControl "180+2"]
[Annotator "6. +0.21   6... -0.10"]

1. e4 c5 2. Nc3 d6 3. Nf3 Nf6 4. d4 cxd4 5. Nxd4 a6 6. Be3 {+0.21/22 6} e5
{-0.10/27 7} 7. Nde2 {+0.07/26 12} Ng4 {+0.09/25 7} 8. Nd5 {+0.10/26 5}
Nxe3 {+0.07/25 7} 9. Nxe3 {+0.08/25 7} g6 {+0.11/27 7} 10. Nc3 {+0.18/26 5}
Nc6 {+0.05/25 7} 11. Bc4 {+0.20/26 6} Bg7 {+0.08/26 7} 12. Ncd5
{+0.26/25 6} Be6 {+0.00/23 6} 13. O-O {+0.30/25 7} O-O {-0.01/26 6} 14. c3
{+0.27/23 4} Rc8 {+0.01/25 6} 15. a4 {+0.34/22 9} Na5 {-0.10/23 6} 16. Ba2
{+0.53/24 7} Nc6 {-0.34/19 6} 17. Nc4 {+0.97/22 7} Kh8 {-0.66/23 6} 18.
Ndb6 {+0.97/24 4} Bxc4 {-0.49/25 6} 19. Nxc4 {+1.23/26 3} Rc7 {-0.61/27 6}
20. Qxd6 {+1.37/26 5} Rd7 {-0.79/24 6} 21. Qc5 {+1.39/24 4} f5 {-1.05/24 5}
22. exf5 {+1.82/24 5} gxf5 {-1.12/26 5} 23. Bb3 {+1.81/25 4} e4
{-1.20/23 5} 24. Rad1 {+1.87/25 4} Qe7 {-1.25/26 5} 25. Qe3 {+1.86/23 4}
Rdd8 {-1.14/25 5} 26. Qe2 {+1.60/22 4} Ne5 {-1.11/22 5} 27. Nxe5
{+1.53/23 5} Bxe5 {-1.24/26 5} 28. Bd5 {+1.49/20 4} Rd7 {-0.96/24 5} 29.
Bc4 {+1.44/19 3} Rfd8 {-1.08/25 5} 30. Rxd7 {+1.43/26 19} Qxd7 {-1.09/27 5}
31. Qh5 {+1.62/23 2.9} Rf8 {-1.06/24 5} 32. Bb3 {+1.47/23 15} Qe7
{-1.12/24 4} 33. Bd5 {+1.46/22 4} b6 {-0.98/24 4} 34. Rd1 {+1.48/22 2.5} a5
{-1.00/25 4} 35. Bc4 {+1.56/21 4} Bg7 {-0.96/23 4} 36. Qe2 {+1.47/23 5} Qg5
{-1.01/21 4} 37. Bb5 {+1.60/19 2.5} Qg6 {-0.91/23 4} 38. Qd2 {+1.63/24 2.6}
Be5 {-1.22/23 4} 39. Qd5 {+1.57/22 4} Bc7 {-1.16/26 4} 40. g3
{+1.72/22 2.3} Rd8 {-1.20/30 4} 41. Bd7 {+2.32/26 4} Rf8 {-1.50/23 4} 42.
Qc4 {+1.99/22 4} Bf4 {-1.66/21 4} 43. Be6 {+2.04/25 2.6} Be5 {-1.81/26 4}
44. Rd7 {+2.24/26 2.4} Qg5 {-1.99/27 4} 45. Rd5 {+2.69/26 2.3} Bg7
{-2.24/27 4} 46. Bxf5 {+2.81/25 3} e3 {-2.33/26 4} 47. fxe3 {+2.80/23 2.9}
Qxe3+ {-2.26/25 4} 48. Kg2 {+2.65/25 2.2} Re8 {-2.29/23 4} 49. Rd6
{+2.73/22 2.1} h6 {-2.39/23 3} 50. Bd3 {+3.30/22 2.1} Qc5 {-3.41/25 3} 51.
Qxc5 {+3.28/24 2.5} bxc5 {-3.65/28 3} 52. Kf3 {+3.58/27 2.1} Ra8
{-2.99/27 3} 53. Rd5 {+3.34/25 2.6} Bf8 {-3.20/28 3} 54. Rd7 {+3.48/25 3}
Rb8 {-3.18/30 3} 55. Bb5 {+3.58/28 2.0} Ra8 {-3.54/27 3} 56. Ke4
{+3.80/26 2.0} Re8+ {-3.04/28 3} 57. Kf5 {+4.04/27 3} Re7 {-3.84/29 3} 58.
Kg6 {+4.19/34 2.1} Rxd7 {-4.18/36 3} 59. Bxd7 {+4.29/38 2.0} Bg7
{-4.36/36 3} 60. Be6 {+5.68/38 6} Bf8 {-3.81/38 3} 61. g4 {+8.69/37 26} Bd6
{-2.95/46 3} 62. Kxh6 {+13.00/35 2.7} Bxh2 {-4.60/33 3} 63. b4
{+99.73/36 26} cxb4 {-10.73/34 3}
{Black wins on time} 0-1

And here is the WB debug:

Crab lost on time.txt

Please, don't misunderstand me. I just want that Crab improves and gets stronger. It makes me feel bad when an engine lose a game because of time, illegal move or crash, when the engine could have won the game easily having a better time management.

Carlos

Beanie496 commented 1 month ago

That's probably because I have a really small default move overhead (2 ms, compared to a more normal 16 ms). And yeah, older versions had a bug that caused them to go over their allocated time. Are you setting the move overhead for each engine or are you leaving it as default?

Beanie496 commented 1 month ago

In any case, I've pushed a hotfix. Try 4.4.1 and see if there are still time losses.

rwbc commented 1 month ago

Hi again Jasper,

Hopefully, but may be not for old WB with high load (and surely not for Arena I guess).

There are a few things to consider. The debug showed some overhead of up to 0.15s often, before the engines started calculating, which was higher than I had expected.

Also I wonder, if it was necessary to get into severe time trouble, while trying to find a mate in a won position in the moves 61 and 63? Here it spent around 26s for each move and spoiled its rest time heavily.

I have made some sheet (out of curiosity and because of fun), which illustrates what happened in the game regarding the rest time left. (Note that most differences between the debug times and pgn just result, because the times in the pgn are rounded and have a max granularity of just one digit in this WB version)

https://docs.google.com/spreadsheets/d/1YgYZdO5bJ5aK2ULxSRYFty9uWy6zw7Uy-vTs3RjpsFE/edit?gid=1000074408#gid=1000074408

It might also be of interest that WB adds the inc after the move, while (since some years) CuteGUI/CuteCli add the inc before the move.

BTW I could not make it use that much time (fully using 2.00 s in the 64th move) from fen at least, while I tried to give as much precise move/time informations as possible. (may be it works with full game history and tt entries though)

Anyhow, I think if Carlos uses a move overhead of 200ms in Crabs uci options he should be safe.

uci
id name Crab 4.4.0
id author Jasper Shovelton
option name Move Overhead type spin default 2 min 0 max 1000
option name Threads type spin default 1 min 1 max 256
option name Hash type spin default 32 min 1 max 268435456
option name Clear Hash type button
uciok
isready
readyok
ucinewgame
setoption name Hash value 256
position fen 7k/8/4B2K/p7/Pp4P1/2P5/7b/8 w - - 0 64
go wtime 2000 btime 36590 winc 2000 binc 2000
info depth 1 seldepth 2 score cp 189 hashfull 0 nodes 22 time 0 nps 211538 pv c3b4
info depth 2 seldepth 4 score cp 158 hashfull 0 nodes 72 time 0 nps 404494 pv c3b4 h2f4
info depth 3 seldepth 4 score cp 158 hashfull 0 nodes 124 time 0 nps 228782 pv c3b4 h2f4 h6g6 a5b4
info depth 4 seldepth 6 score cp 166 hashfull 0 nodes 319 time 0 nps 364988 pv c3b4 a5b4 e6d5 h2g3
info depth 5 seldepth 7 score cp 194 hashfull 0 nodes 520 time 1 nps 434782 pv c3b4 a5b4 e6d5 h2g3 h6g6
info depth 6 seldepth 8 score cp 221 hashfull 0 nodes 1155 time 1 nps 724592 pv c3b4 a5b4 a4a5 h2g3 a5a6 g3e5
info depth 7 seldepth 9 score cp 239 hashfull 0 nodes 1635 time 1 nps 823677 pv c3b4 a5b4 a4a5 h2f4 h6g6 f4c1 a5a6 c1f4
info depth 8 seldepth 10 score cp 244 hashfull 0 nodes 2423 time 2 nps 1028438 pv c3b4 a5b4 a4a5 h2c7 a5a6 c7b6 h6g6 b6d4
info depth 9 seldepth 11 score cp 271 hashfull 0 nodes 3674 time 2 nps 1353222 pv c3b4 a5b4 a4a5 h2f4 h6g6 f4c7 a5a6 c7b6 e6d5 b6d4
info depth 10 seldepth 12 score cp 281 hashfull 0 nodes 4834 time 2 nps 1611870 pv c3b4 a5b4 a4a5 h2f4 h6g6 f4c7 a5a6 c7b6 e6d5 b6d4 g4g5
info depth 11 seldepth 13 score cp 281 hashfull 0 nodes 6158 time 3 nps 1862110 pv c3b4 a5b4 a4a5 h2f4 h6g6 f4c7 a5a6 c7b6 e6d5 b6f2 g4g5 f2d4
info depth 12 seldepth 14 score cp 283 hashfull 0 nodes 8024 time 3 nps 2198356 pv c3b4 a5b4 a4a5 h2f4 h6g6 f4c7 a5a6 c7b6 e6d5 b6f2 g4g5 f2d4 g6f5
info depth 13 seldepth 16 score cp 280 hashfull 1 nodes 11277 time 4 nps 2724571 pv c3b4 a5b4 a4a5 h2f4 h6g6 f4c7 a5a6 c7b6 e6d5 b6f2 g4g5 f2c5 d5c4 c5d4
info depth 14 seldepth 16 score cp 280 hashfull 1 nodes 14997 time 4 nps 3283774 pv c3b4 a5b4 a4a5 h2e5 a5a6 e5d4 h6g6 d4c5 e6d5 c5d4 g4g5 d4c5 d5c4 c5d4
info depth 15 seldepth 16 score cp 282 hashfull 1 nodes 18076 time 5 nps 3607264 pv c3b4 a5b4 a4a5 h2e5 a5a6 e5d4 h6g6 d4c5 e6d5 c5d4 g4g5 d4c5 d5c4 c5d4 g6f5
info depth 16 seldepth 19 score cp 321 hashfull 1 nodes 25050 time 5 nps 4324184 pv c3b4 a5b4 a4a5 h2e5 a5a6 e5d4 h6g6 d4c5 g4g5 c5d4 g6f7 d4c5 g5g6 c5d4 e6d5 d4c5
info depth 17 seldepth 20 score cp 375 hashfull 1 nodes 39350 time 7 nps 5259991 pv c3b4
info depth 17 seldepth 22 score cp 400 hashfull 2 nodes 80631 time 12 nps 6668679 pv c3b4 h2f4 h6g6 f4c7 b4a5 c7a5 g6f7 a5c3 e6f5 c3d2 f5e4 d2a5 g4g5 a5c3 g5g6 c3d4 a4a5 d4c5
info depth 18 seldepth 22 score cp 454 hashfull 2 nodes 95572 time 14 nps 6677286 pv c3b4 h2f4 h6g6 f4c7 b4a5 c7a5 g6f7 a5c3 e6f5 c3d2 f5e4 d2a5 g4g5 a5c3 g5g6 c3b2 a4a5 b2d4 a5a6
info depth 19 seldepth 24 score cp 458 hashfull 2 nodes 114392 time 16 nps 7057313 pv c3b4 h2f4 h6g6 f4c7 b4a5 c7a5 g6f7 a5c3 g4g5 c3d2 g5g6 d2c3 a4a5 c3d4 e6d5 d4g7 a5a6 g7d4 d5c4 d4c5
info depth 20 seldepth 25 score cp 531 hashfull 2 nodes 167850 time 21 nps 7669286 pv c3b4 h2c7 b4a5 c7a5 g4g5 a5d2 h6g6 d2e3 a4a5 e3d4 a5a6 d4c5 e6b3 c5d4 g6f7 h8h7 b3d5 d4c5 g5g6 h7h6 g6g7
info depth 21 seldepth 25 score cp 417 hashfull 2 nodes 203171 time 25 nps 7947543 pv c3b4 h2c7 b4a5 c7a5 g4g5 a5d2 h6g6 d2e3 a4a5 e3d4 a5a6 d4c5 e6b3 c5d4 g6f7 h8h7 b3d5 d4c5 g5g6 h7h6 g6g7
info depth 21 seldepth 26 score cp 534 hashfull 2 nodes 220702 time 27 nps 8002248 pv c3b4
info depth 21 seldepth 27 score cp 883 hashfull 2 nodes 276061 time 34 nps 8000376 pv c3b4 a5b4 a4a5 h2f4 h6g6 f4c7 a5a6 c7b6 g4g5 b6d4 g6f7 h8h7 g5g6 h7h6 a6a7 d4a7 g6g7 h6g5 g7g8q g5f4 g8f8 a7d4 f8b4 f4e4
info depth 22 seldepth 30 score cp 912 hashfull 2 nodes 306795 time 37 nps 8109833 pv c3b4 h2c7 b4a5 c7a5 h6g6 a5c3 g4g5 c3d2 e6d5 d2c3 g6f7 h8h7 a4a5 c3d4 g5g6 h7h6 a5a6 h6g5 g6g7 d4g7 a6a7 g7d4 a7a8q
info depth 23 seldepth 31 score cp 911 hashfull 2 nodes 330183 time 40 nps 8176692 pv c3b4 h2c7 b4a5 c7a5 h6g6 a5c3 g4g5 c3d2 e6d5 d2c3 g6f7 h8h7 a4a5 c3d4 g5g6 h7h6 a5a6 h6g5 a6a7 d4a7 g6g7 g5f4 f7g6 a7d4
info depth 24 seldepth 32 score cp 942 hashfull 2 nodes 368174 time 44 nps 8288846 pv c3b4 h2c7 b4a5 c7a5 h6g6 a5c3 g4g5 c3d2 e6d5 d2c3 g6f7 h8h7 a4a5 c3d4 g5g6 h7h6 a5a6 h6g5 a6a7 d4a7 g6g7 a7d4 g7g8q g5f4 g8g6 d4c3
info depth 25 seldepth 35 score cp 605 hashfull 4 nodes 453568 time 54 nps 8291161 pv c3b4 h2c7 b4a5 c7a5 h6g6 a5c3 g4g5 c3d2 e6d5 d2c3 g6f7 h8h7 a4a5 c3d4 g5g6 h7h6 a5a6 h6g5 a6a7 d4a7 g6g7 a7d4 g7g8q g5f4 g8g6 d4c3
info depth 25 seldepth 35 score cp 942 hashfull 4 nodes 468189 time 56 nps 8306672 pv c3b4
info depth 25 seldepth 36 score cp 945 hashfull 9 nodes 668915 time 78 nps 8492756 pv c3b4 a5b4 a4a5 h2f4 h6g6 f4c7 a5a6 c7b6 g4g5 b6d4 g6f7 h8h7 g5g6 h7h6 a6a7 d4a7 g6g7 h6g5 g7g8q g5f4 g8f8 a7d4 f8b4 f4e4 b4d6 d4e5 e6d5 e4f4 d6g6
info depth 26 seldepth 36 score cp 952 hashfull 9 nodes 706760 time 83 nps 8491241 pv c3b4 a5b4 a4a5 h2f4 h6g6 f4c7 a5a6 c7b6 g4g5 b6d4 g6f7 h8h7 g5g6 h7h6 a6a7 d4a7 g6g7 h6g5 g7g8q g5f4 g8f8 b4b3 e6b3 a7d4 f7g6 f4e4 f8f5 e4e3 b3d5 e3d2 f5f7
info depth 27 seldepth 40 score cp 952 hashfull 11 nodes 777346 time 91 nps 8470589 pv c3b4 a5b4 a4a5 h2f4 h6g6 f4c7 a5a6 c7b6 g4g5 b6d4 g6f7 h8h7 g5g6 h7h6 a6a7 d4a7 g6g7 h6g5 g7g8q g5f4 g8f8 a7d4 f8b4 f4e4 b4d6 d4c3 e6d5 e4e3 d6g6 e3d2 g6d6
info depth 28 seldepth 42 score cp 1253 hashfull 14 nodes 1238020 time 146 nps 8441256 pv c3b4 h2c7 b4a5 c7a5 h6g6 a5d8 g4g5 d8g5 g6g5 h8g7 a4a5 g7f8 e6d5 f8e7 a5a6 e7d6 d5e4 d6e5 e4f5 e5d4 a6a7 d4e3 a7a8q e3f2 a8e8 f2f3 g5f6 f3g3
info depth 29 seldepth 34 score cp 1268 hashfull 14 nodes 1299835 time 153 nps 8448002 pv c3b4 h2c7 b4a5 c7a5 h6g6 a5d8 g4g5 d8c7 e6c4 c7d8 c4d5 d8g5 g6g5 h8g7 a4a5 g7f8 a5a6 f8e7 a6a7 e7d6 a7a8q d6c5 a8g8 c5d4 g8e6 d4d3 g5f6 d3d2 e6e8
info depth 30 seldepth 38 score cp 1268 hashfull 14 nodes 1359935 time 160 nps 8457096 pv c3b4 h2f4 h6g6 f4c7 b4a5 c7a5 e6d5 a5d2 g4g5 d2g5 g6g5 h8g7 a4a5 g7f8 a5a6 f8e7 a6a7 e7d6 a7a8q d6c5 a8g8 c5d4 g8e6 d4d3 g5f6 d3d2 e6e8 d2d1 f6f7 d1d2 f7f6
info depth 31 seldepth 35 score cp 1272 hashfull 14 nodes 1395690 time 165 nps 8449305 pv c3b4 h2f4 h6g6 f4c7 b4a5 c7a5 e6d5 a5d2 g4g5 d2g5 g6g5 h8g7 a4a5 g7f8 a5a6 f8e7 a6a7 e7d6 a7a8q d6c5 a8g8 c5d4 g8e6 d4d3 g5f6 d3d2 e6e8 d2d1 e8e5 d1d2 d5c4 d2c2
info depth 32 seldepth 48 score cp 1279 hashfull 29 nodes 3229597 time 376 nps 8571777 pv c3b4 h2f4 h6g6 a5b4 g4g5 b4b3 e6b3 f4e3 b3d5 e3g5 g6g5 h8g7 a4a5 g7f8 a5a6 f8e7 a6a7 e7d6 a7a8q d6c5 a8g8 c5d4 g8e6 d4d3 g5f6 d3d2 e6e8 d2c2 e8e5 c2c1 e5d4 c1c2 d4e5
info depth 33 seldepth 47 score cp 1844 hashfull 47 nodes 5178355 time 608 nps 8512620 pv c3b4
info depth 33 seldepth 49 score cp 1314 hashfull 103 nodes 10604578 time 1284 nps 8252840 pv c3b4 a5b4 h6g6 h2f4 e6d5 f4c7 g4g5 c7d8 d5e6 d8g5 g6g5 h8g7 a4a5 g7f8 g5f6 f8e8 a5a6 e8d8 a6a7 d8c7 a7a8q c7b6 a8e4 b4b3 e6b3 b6c5 b3d5 c5b5 e4d4 b5a5 d5c6 a5a6 c6d5
bestmove c3b4

Guenther (RWBC)

P.S. Do you plan to create your own compilations in the future for the releases? CCRL e.g. neglected my compilations so far despite I announced Crab in the XB/UCI chronology months ago. https://docs.google.com/spreadsheets/d/1GXoy3lGhdKPJbatdw2_2dhWT3TkpthPcNtHs51MQydM/edit?gid=175552346#gid=175552346

Beanie496 commented 1 month ago

Thanks for making the sheet - the detail is amazing. I suspect the 0.15 s comes from WB itself, because I'm seeing exactly the same delay from the other engine and it takes much less time than that to start the search. (I'm also only seeing a ~0.5 ms delay when I use fast-chess, which is about what I expect.)

Spending a lot of time when there's already a mate is the same as spending a lot of time in any other position - it's just trying to find a faster mate, whether or not that is wise. The time management is really rudimentary - it continues another iterative deepening loop if it's not used more than about 40% of its allocated time (which is in turn only a fraction of the remaining time), but it won't stop the search partway through until it's about to use all of its remaining time. This means that it, if an iteration of the iterative deepening loop takes way longer than expected, it could very easily burn a lot of time. (I did try to make it check allocated time instead of total time but it lost elo. I might retry but with total time / 2 instead, or something similar.) And yeah, I think you're right about being unable to replicate the large amount of time usage - how much time it spends depends on whatever random TT and history entries it already has, so it's very difficult to reproduce it from a single FEN. (Although you could sort of see it with the example you gave, where the re-search at the end took more time than all the other root searches put together.)

Lastly, about the compilations - probably, assuming I can set up a github action or something to do it automatically.

CPagador commented 1 month ago

In any case, I've pushed a hotfix. Try 4.4.1 and see if there are still time losses.

Can you or Guenther build a binary, so I can test it? I am using the 4.4.0 version built by Guenther in the Promotion League 5 of my tournament, I hope Crab passes, so I can test the fixed version in the next PL.

Beanie496 commented 1 month ago

Here's a linux and windows build for reasonably modern CPUs. Setting up some workflow with github actions will take a while, but this will do for now. crab_binaries.tar.gz

rwbc commented 1 month ago

Note that you still should set a higher overhead in its uci options, because of the GUI overhead with high concurrency. I guess most people use cli tools instead of GUIs for this. IIRC there is even a way to start WB w/o UI for this, but I forgot how (probably via batch file with some extra flag?) BTW out of curiosity I checked some of my old WB debug backups [still newer versions than your one ;)] and here the overhead was mostly 10-20 ms, but those were w/o concurrency.

CPagador commented 1 month ago

Hi guys,

Crab 4.4.1 participated in PL4 and qualified to PL3, no time losses this time. I didn't change the default settings (Move overhead=16ms).

Carlos

Beanie496 commented 1 month ago

That's great to hear, thanks! Looks like I can probably close this then.