-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stockfish derivatives not work when analyze pgn #94
Comments
I can't reproduce your bug because I don't have the PGN file you used as input. It would be very useful for debugging if you could find a specific position for which Stockfish does not output anything and then post it here. |
work both single line and pgn but when using python module stockfish is slower compare to chess python module (chess.engine() )
work when analyze single line fen but looping forever when analyze pgn (multi moves)
not work at all (wheter single line fen or pgn (multi moves) )
here the chess-play.pgn for test above
environment
n.b |
best_move = stockfish.get_best_move(wtime = 0, btime = 0) Your code is hanging on these two lines. If you run Stockfish directly and send 0 for movetime (or 0 for wtime/btime), it also doesn't stop searching. |
already tried like on pypi
still got the same result, that's why, try to change parameter hopefully can change the result
btw the 0 value run well when using stockfish
|
Not sure then, since when using 1000 for the time values, it doesn't loop forever for me (using the wrapper for both SF 15 and SF 11). For running stockfish directly, 0 values also run fine for me on Stockfish 11 (but not on Stockfish 15). Using the wrapper with 0 values has the expected result - fine on SF 11, not on SF 15. |
trying to minimalize in thought that pgn must do recursive job, so perhaps it cause looping forever result code
environment
again the first code above on initial issue is work for stockfish but not it's derivatives |
@sugizo A main factor for python stockfish being slower seems to be because of get_top_moves(3). In that fen, White's best move is just a mate is 1. However, since the 3 top moves are requested, the wrapper internally sets MultiPV to 3 (temporarily), in order to tell SF to fully analyze 3 principal variations. It finishes analyzing the Qxf7# variation in an instant, but it takes a bit of time for it to get to depth 25 for the second and third best moves. Meanwhile for Python chess, I'm assuming the default is for MultiPV to be 1, and I don't think you're calling any functions that request this value to be increased. So the module just has to analyze Qxf7#, and this is done in an instant by SF. |
It's still interesting though that it seems to take you around 100 seconds to run your calls to the python stockfish module. I copied some of your source code, and it took under 30 seconds to get to depth 25 (with SF 11). Running SF 11 directly, it seemed slightly faster, but in the same ballpark (roughly 26 seconds maybe). |
For the Python Chess vs Python Stockfish comparison, if you figure out a way to set MultiPV = 3 for Python Chess, then I'd assume the modules will take comparable times to get to depth 25. |
attached the log of initial problem but the same code to analyze pgn work smoothly when using stockfish app engine what i tried is written above :
quick deduction
|
Hello, this project is no longer maintained in this repo but on this fork. (For more information about this please look here). It is not possible to transfer the entire discussion here. However, when we go through the remaining issues, we will get back to you and either create a proxy issue or find another solution. Just be aware that the project will no longer be updated here. |
stockfish derivatives (like fairy_stockfish and brainfish) not work when analyze pgn
no error occured but the result is not expected (looping forever)
The text was updated successfully, but these errors were encountered: