1

I am working on a chess player-rating system based on engine evaluations. As part of this I would like to extract evaluation data from Stockfish for the top 10 moves in a given set of positions.

Ideally I would like to be able to loop this from my program, so something like:

while i < 1000:
#'evaluate' returns a list of top moves with their centipawn evaluations.
choices = evaluate(positions[i]); 
...do stuff...
i++;
end while

In the above 'positions' would be a vector of chess positions in FEN format. I have looked around and there are some solutions for this using the chess library in Python, but I would really like to do this from within cpp. Is there any relatively trouble-free way to do this?

1 Answer 1

2

The Python solutions are nothing but wrapper for sending UCI commands to the Stockfish engine. I'm not aware there is a C++ equivalent but you can code it yourself.

I don't have a copy-and-paste ready code for you. To do what you want you will need:

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.