-
Notifications
You must be signed in to change notification settings - Fork 56
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
Notation conversion, get_num_pieces function, and misc. #112
base: master
Are you sure you want to change the base?
Notation conversion, get_num_pieces function, and misc. #112
Conversation
…stockfish-1 into notation-conversion
Coverage report
The coverage rate is
Diff Coverage details (click to unfold)stockfish/models.py
|
…d, give the user an option to send it themselves with a separate function, if they want to do this.
There are a few things I noticed. if (
isCapture
and turnsInto != ""
and self.get_what_is_on_square(dst) is None
) or (
isCapture
and turnsInto == ""
and self.will_move_be_a_capture(move)
== Stockfish.Capture.NO_CAPTURE
): This was put like that because there was the bug (Issue#99) in Also line Also "+" and "#" at the end of the move string indicates a check/checkmate. I glossed over that in my implementation and just ignored it because I was just messing around, you may want to test if that's actually true. Also there is a print statement warning that a move not describing a capture is in fact a capture. You may or may not want to remove that as printing to stdout is unexpected for such a function. Consider not allowing to capture pieces without explicitly declaring it to be a capture or swallowing it silently instead? |
I hope I didn't make too much of a mess. I'm not used to github's review system. |
Update workflow versions and add type annotations
@2union I'm very sorry to hear that, this is sad news. Thank you for letting us know though, we will try to continue the project. He started something that's become quite popular and useful for many people. |
Change links and add information to README
Maybe it's time for a fork? |
Yes, it definitely is. @johndoknjas and I already set up a new repo and intend to continue the development there. We haven't announced that yet since we're still in the middle of planning and getting more permissions for the PyPi package, but we plan to make the fork the main development point and move all PRs (and issues) that are still open here over there (Preferably not all at once so there is no chaos). |
* Update some parameters to be of type bool rather than string. * Fix bug related to stockfish needing lowercase 'false' and 'true' options. * Add some backwards compatability safety checks in models.py, for the new bool types of the three params. Also update the README and .gitignore. * Add docs for simpler way to call get_parameters. * Do a different method for handling the get_parameters change. Instead, deprecate it in favour of a new function. * Update some wording in the readme. * Small edits to docs for recent changes. * Update test function Co-authored-by: kieferro <[email protected]> --------- Co-authored-by: kieferro <[email protected]>
* Clean up documentation * Add examples; move classes * Use __future__ annotation to allow putting classes on bottom * Add pdoc; Add Github Workflow for publishing API docs on Github Pages * Test Github Pages on PR * Fix pip install in workflow * Try fixing Github workflow * Cleanup; add link to Github Pages in README * Improve example * Improve example * Minor syntax fixes * Update .github/workflows/api-docs.yml Co-authored-by: kieferro <[email protected]> --------- Co-authored-by: kieferro <[email protected]>
…yabuzhsky#30) * Add `debug_view` as option * Add `debug_view` to documentation
* Works to make a new command to not run slow tests. However, get a warning message that testing like this via setup.py will be deprecated at some point. * Change back some values. * Format with black. * Add slow marker to some of the tests. * Update README.md
…ted docs and added warnings for weaker settings. (zhelyabuzhsky#38) * Add functions to get the static evaluation, and resume full strength. Also updated some documentation. * Update static eval test. * Account for earlier versions of stockfish prefixing the static evaluation line with 'Total Evaluation'. * Update README.md * Issue warnings in get_top_moves, get_evaluation, and get_wdl_stats, when Stockfish is set to play on a weaker setting. * Remove unnecessary calls to set the fen position.
1062984
to
3bf2dd1
Compare
* Add ': Stockfish' type hints in test_models.py. * Fix mypy errors. * Add various type hints in models.py. * Minor test_models.py updates.
Note - since this PR is quite big, please merge the other PRs into master first. I'll then resolve any conflicts for this PR.
Closes #110
This PR allows the user to convert "human-style" notation into the notation format that Stockfish uses.
Thanks to @FalcoGer for providing the code for this feature in issue 110. I've refined it a bit and added some tests, but most of the credit should go to them.
Besides this, the PR also: