iamjarret / pystockfish

Implements an easy-to-use Engine class to integrates the Stockfish chess engine with Python
GNU General Public License v3.0
30 stars 13 forks source link

Info output as dict #8

Open gj84 opened 8 years ago

gj84 commented 8 years ago

It would be useful to have the info output parsed as python data:

>>> deep.bestmove()  
{'info': {'depth': 10, 
            'seldepth': 13,
            'score': {'cp' : -40},
            'nodes': 33303, 
            'nps': 951514, 
            'time': 35,
            'multipv': 1, 
            'pv': ['b8c6', 'g1f3', 'g8f6', 'b1c3', 'e7e5', 'f1b5', 'f8d6', 'e1g1', 'e8g8', 'd2d4', 'e5d4', 'f3d4', 'a7a6']},
'ponder': 'g1f3', 
'move': 'b8c6'}  
iamjarret commented 8 years ago

That's a fantastic suggestion, German. Please feel free to parse the info string into a dict and submit a pull request!