Added Perft test suite#4
Merged
Merged
Conversation
Owner
|
Hey, Zander, thanks for helping me out! I noticed you had some quite-advanced algorithmic ideas, and I don't want to lose them, so I created a new branch for that. In the meantime, I'm still trying to come as close as possible to Stockfish, just with Python3, instead of C++ (I may even train a neural network on my Mac to help with this.). Anyway, I'll see you tomorrow at chess club! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey, took the time to checkout your project its a nice start and I hope you keep going.
Not sure if you want any help or outside contributions on this but noticed just some strangeness here and there and wanted to do a perft test https://www.chessprogramming.org/Perft to verify correctness. Feel free to adapt this to your style or to ignore.
Here are the perft results I got. I didn't have time to wait around for full depth results to finish as move generation isn't the fastest right now. I would recommend running this with full depth 6 instead of the 4 I did if you have the time.
perft_results.txt
The last position fails but otherwise looks mostly good with an asterix.
## Searching for other possible causes of stalemate... self.stalemate = self.search_for_material_stalemate() # # ## Fixing a bug where one can move after stalemate: if self.stalemate: moves = []I understand this was added to fix a move after stalemate bug but it is very non standard. This had to be commented out or else many perft tests would fail. Normally stalemate is checked before calling to the move generation function. We just expect the move generation to return all legal moves in the position and not worry about the current state of the board.
Regardless I hope some perft testing will help you in your development going forward. Always good to have to make sure if you refactor anything you don't break chess.