I am using the stockfish 3.23 package in python. To get the evaluation of the chess position, I use the following code:
self.stockfish = Stockfish(path="stockfish\\stockfish", depth=18, parameters={"Threads": 2, "Minimum Thinking Time": 1000})
self.stockfish.set_fen_position(fen)
evaluationValue = self.stockfish.get_evaluation()['value']
This works fine. However, I would like stockfish to constantly evaluate the position, and give me the current evaluation when I want, instead of waiting a predetermined amount of time for the result of the evaluation.
Is this possible?
Thank you very much, Joost
I assume one way to solve it would be to make the call in a loop from 1 to maxDepth and then print the results for each depth in the loop.
I am not sure how the Stockfish package works but Stockfish uses some sort of iterative deepening which means that if it searches for depth 18 it will do the loop mentioned above. I just don't know how to print the results from that built in loop with that library, maybe there is some better way of doing it than I proposed.