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

Simplified move parsing #157

Merged
merged 1 commit into from
Feb 2, 2020
Merged

Simplified move parsing #157

merged 1 commit into from
Feb 2, 2020

Conversation

TerjeKir
Copy link
Owner

@TerjeKir TerjeKir commented Feb 2, 2020

Previously a lot of effort went into ensuring correct input when parsing a move given as part of a 'position' command - this sounds nice, but doesn't really do much. First of all, no GUI or other program would send an incorrect command to begin with, so for a vast majority of use cases there is no point checking it. Secondly, in the event that a poorly formatted input is given, ignoring the input would still not get the engine set up to search the correct position.

As such, this patch simplifies the parsing of moves, speeding up setup, and allowing weiss to (potentially) crash when used incorrectly. This is most likely not gaining any strength as this code runs outside of the timed search.

This also fixes a bug where weiss would crash due to an out of bounds during movegen in long games (total moves > MAXDEPTH). This crash was inconsistent as it would segfault at varying game lengths depending on the memory layout which changed between executions, at least on my windows machine.

No functional change.

ELO | 3.99 +- 5.36 (95%)
SPRT | 10.0+0.1s Threads=1 Hash=32MB
LLR | 2.98 (-2.94, 2.94) [-4.00, 1.00]
Games | N: 9850 W: 3073 L: 2960 D: 3817
http://chess.grantnet.us/viewTest/4491/

@TerjeKir TerjeKir merged commit a83c604 into master Feb 2, 2020
@TerjeKir TerjeKir deleted the CleanerParseMove branch February 2, 2020 22:19
@TerjeKir TerjeKir mentioned this pull request Feb 3, 2020
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

Successfully merging this pull request may close these issues.

1 participant