Closed rajb245 closed 6 years ago
You never gave the board to the engine. You have to do a engine.position(board) or else your multipv is running for startpos which does have 20 possible moves.
Ah, thanks @Mk-Chan
Apologies for the noise, closing the bug.
I'm using python-chess 0.23.5 from pypi, installed using pip on Windows with python '3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)]'
I have a position where I want to use an engine to do a shallow, broad analysis and return me centipawn scores. In this case, there are 32 legal moves in the position, and I wanted a depth 10 scoring of all the legal moves. When I tried this using python-chess, I found that the InfoHandler was capturing "info" lines from the engine on only 20 variations, even though the engine MultiPV was set to something larger. The below test-case and output should demonstrate the problem. I verified that if I send the corresponding UCI commands to the engine with 32 PVs, it does indeed output info strings for 32 variations; UCI code is further down at the bottom.
Here is the python-chess test code:
python-chess test-code output:
UCI commands showing that engine does the info strings correctly with 32 multipv in the same position