In python-chess you can communicate with the engine on a given position. However the method presented in https://python-chess.readthedocs.io/en/latest/uci.html using the engine.go() function with only a time parameter returns just one continuation and that continuations evaluation.

I know in most chess programs you can see the top few ranked positions and their evaluations. How can I do the same in python chess? None of the parameters in engine.go seemed to let me do that.


You can do this by sending out MultiPV, something like:

engine = chess.uci.popen_engine(...)
engine.setoption({ "MultiPV" : multiPV})

The module will generate multiple lines for you, as an array.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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