-
Notifications
You must be signed in to change notification settings - Fork 29
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
Added new optional filters to main script #34
base: master
Are you sure you want to change the base?
Conversation
--forcedMate --color --minTurn --maxTurn --opening
@@ -83,6 +83,11 @@ To execute the generator execute this command. By default it will look for the ` | |||
- `--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` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@@ -83,6 +83,11 @@ To execute the generator execute this command. By default it will look for the ` | |||
- `--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` | |||
- `--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` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using forcedMate=TRUE and forcedMate=FALSE returns 0 puzzles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. I think there are some filters that are not working as it should
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