Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Info output as dict #8

Open
gj84 opened this issue Dec 1, 2015 · 1 comment
Open

Info output as dict #8

gj84 opened this issue Dec 1, 2015 · 1 comment

Comments

@gj84
Copy link
Contributor

gj84 commented Dec 1, 2015

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
Copy link
Owner

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

pafnucy added a commit to pafnucy/pystockfish that referenced this issue Oct 25, 2016
fox for iamjarret#8
pv was left as string, as I'm unsure what form is more appropriate

on the way:
-additions to docstrings (Match.move, Engine.bestmove, Engine._movelisttostr)
-used shorthand notation for _movelisttostr concatenation, ponder assignment in Match.move
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants