Added new optional filters to main script#34
Open
craigjmclaughlin wants to merge 3 commits into
Open
Conversation
--forcedMate --color --minTurn --maxTurn --opening
This was referenced May 7, 2022
vitogit
reviewed
May 13, 2022
| - `--includeBlunder=False` If False then generated puzzles won't include initial blunder move, default is `True` | ||
| - `--stockfish=./stockfish-x86_64-bmi2` Path to Stockfish binary. | ||
| Optional. If omitted, the program will try to locate Stockfish in current directory or download it from the net | ||
| - `--color=WHITE` Generate puzzles only for preferred color. `WHITE`/`W`, `BLACK`/`B`, or default `NONE` |
Owner
There was a problem hiding this comment.
Can you include a test to make sure that the filters are working correctly?
For example with this game.pgn file https://gist.github.com/vitogit/8e1059e57929a9fde4f69232eca6c1f2
Running python3 main.py --depth=5 --games=game.pgn it generates 3 puzzles
Running python3 main.py --depth=5 --games=game.pgn --color=WHITE it generate 1 puzzle
Running python3 main.py --depth=5 --games=game.pgn --color=BLACK it generate 1 puzzle when it should to generate 2.
vitogit
reviewed
May 13, 2022
| Optional. If omitted, the program will try to locate Stockfish in current directory or download it from the net | ||
| - `--color=WHITE` Generate puzzles only for preferred color. `WHITE`/`W`, `BLACK`/`B`, or default `NONE` | ||
| - `--opening= '1. e4 e5 2. f4` Generate puzzles stemming from opening. Default is `NONE` | ||
| - `--forcedMate=TRUE` Only generate puzzles with a forced checkmate. Default is `False` |
Owner
There was a problem hiding this comment.
using forcedMate=TRUE and forcedMate=FALSE returns 0 puzzles
vitogit
requested changes
May 13, 2022
vitogit
left a comment
Owner
There was a problem hiding this comment.
Thanks for the PR. I think there are some filters that are not working as it should
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.
New optional parameters to main.py address several requested issues
Added:
--color=WHITE Generate puzzles only for preferred color. WHITE/W, BLACK/B, or default NONE
--opening= '1. e4 e5 2. f4' Generate puzzles stemming from opening. Default is NONE
--forcedMate=TRUE Only generate puzzles with a forced checkmate. Default is False
--minTurn=10 Generate puzzles from turns >= minTurn. Default is 0
--maxTurn=50 Generate puzzles from turns <= maxTurn. Default is 999