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

Always annotate the final position #16

Open
rpdelaney opened this issue Jan 18, 2018 · 2 comments
Open

Always annotate the final position #16

rpdelaney opened this issue Jan 18, 2018 · 2 comments

Comments

@rpdelaney
Copy link
Collaborator

rpdelaney commented Jan 18, 2018

Sometimes it's not obvious why a player resigned or a draw was agreed, especially when one's elo is much lower than the players in the game one is analyzing. Also, if one uses chess-annotator to blunder check one's own games, it would be useful to know if someone resigned in a position that was actually winning or drawn, or accepted a draw in a position that was actually winning.

To achieve this, chess-annotator should add a numeric evaluation to the last node in the game regardless of whether the last played move was a mistake or not. Additionally, it would add the engine's PV in the final position as a variation to that node.

Now, it will be easy to introduce a step to add the engine's numeric evaluation of the final position to the last node in the game. But I'm not sure if it's legal PGN, as well as technically possible in python-chess, to add a variation to an end node. Some investigation and testing into that will be necessary.

@rpdelaney rpdelaney self-assigned this Jan 18, 2018
@rpdelaney
Copy link
Collaborator Author

rpdelaney commented Jan 18, 2018

I attempted something along these lines in a very early version, but IIRC the functionality was lost during a big rewrite. If memory serves, it was possible to add a variation to the end node by adding the engine's PV to the end node as the main line, and then demoting that main line to a variation using GameNode.demote().

Still need to research whether that is legal PGN, though.

@ddugovic
Copy link
Contributor

ddugovic commented Jan 18, 2018

I think it's legal; certainly I've seen chess blogs add variations after the final move.

The only cases where evaluation/PV is not necessary is checkmate, which is the best possible move.

@rpdelaney rpdelaney removed their assignment Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants