stnevans / Apollo

Uci Compatible Chess Engine.
GNU General Public License v3.0
8 stars 1 forks source link

Engine Times Out #3

Open stnevans opened 6 years ago

stnevans commented 6 years ago

Sometimes the engine when run as a lichess bot seems to time out. The below debug log shows such an example.

DEBUG:chess.engine:<PopenProcess at 0x7ff69b530128 (pid=4543)> << position fen 8/1p3k1p/1p3p2/1P1P1Pp1/P2b2P1/3B3P/6K1/8 b - - 1 43 moves h7h6 g2f1 f7e7 d3e4 e7d6 f1e2 d4e5 e2d3 d6c5 e4f3 e5d6 d3c3 d6e5 c3d3 e5d6 d3c3 d6e5
DEBUG:chess.engine:<PopenProcess at 0x7ff69b530128 (pid=4543)> << go wtime 3810 btime 10080 winc 1000 binc 1000

position fen 8/1p3k1p/1p3p2/1P1P1Pp1/P2b2P1/3B3P/6K1/8 b - - 1 43 moves h7h6 g2f1 f7e7 d3e4 e7d6 f1e2 d4e5 e2d3 d6c5 e4f3 e5d6 d3c3 d6e5 c3d3 e5d6 d3c3 d6e5DEBUG:chess.engine:<PopenProcess at 0x7ff69b530128 (pid=4543)> >> info depth 1 score cp 239 nodes 0 nps 0 time 0 pv c3d3
DEBUG:chess.engine:<PopenProcess at 0x7ff69b530128 (pid=4543)> >> info depth 2 score cp 239 nodes 0 nps 0 time 0 pv c3d3 c5b4
DEBUG:chess.engine:<PopenProcess at 0x7ff69b530128 (pid=4543)> >> info depth 3 score cp 239 nodes 0 nps 0 time 0 pv c3d3 c5b4 f3d1
DEBUG:chess.engine:<PopenProcess at 0x7ff69b530128 (pid=4543)> >> info depth 4 score cp 239 nodes 0 nps 0 time 0 pv c3d3 c5b4 f3d1 e5g3
DEBUG:chess.engine:<PopenProcess at 0x7ff69b530128 (pid=4543)> >> info depth 5 score cp 239 nodes 0 nps 0 time 0 pv c3d3 c5b4 f3d1 e5g3 d1c2
DEBUG:chess.engine:<PopenProcess at 0x7ff69b530128 (pid=4543)> >> info depth 6 score cp 239 nodes 0 nps 0 time 0 pv c3d3 c5b4 f3d1 e5g3 d1c2 g3e5
DEBUG:chess.engine:<PopenProcess at 0x7ff69b530128 (pid=4543)> >> info depth 7 score cp 239 nodes 0 nps 0 time 0 pv c3d3 c5b4 f3d1 e5g3 d1c2 g3e5 c2d1
DEBUG:chess.engine:<PopenProcess at 0x7ff69b530128 (pid=4543)> >> info depth 8 score cp 239 nodes 0 nps 0 time 0 pv c3d3 c5b4 f3d1 e5g3 d1c2 g3e5 c2d1 e5g3
DEBUG:chess.engine:<PopenProcess at 0x7ff69b530128 (pid=4543)> >> info depth 9 score cp 239 nodes 0 nps 0 time 0 pv c3d3 c5b4 f3d1 e5g3 d1c2 g3e5 c2d1 e5g3 d1c2
DEBUG:chess.engine:<PopenProcess at 0x7ff69b530128 (pid=4543)> >> info depth 10 score cp 239 nodes 0 nps 0 time 0 pv c3d3 c5b4 f3d1 e5g3 d1c2 g3e5 c2d1 e5g3 d1c2 g3e5
DEBUG:chess.engine:<PopenProcess at 0x7ff69b530128 (pid=4543)> >> info depth 11 score cp 239 nodes 0 nps 0 time 0 pv c3d3 c5b4 f3d1 e5g3 d1c2 g3e5 c2d1 e5g3 d1c2 g3e5 c2d1
DEBUG:chess.engine:<PopenProcess at 0x7ff69b530128 (pid=4543)> >> bestmove c3d3

When the binary is independently tested with identical commands, a more reasonable output is given with a different pv, different scores, a reasonable node count and nonzero times. The zero times could theoretically be due to a previous search searching that deep already and thus causing instant return, but it should be impossible for all the times to be zero especially given that the search took a considerable time.

stnevans commented 6 years ago

Issue might be due to having a large node count for deciding when to check the time. The time 0 in the above data could be explained by the TT, however that no longer would occur.