Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lenguyenthanh/chess-position-generator
Generate random chess position/perft
https://github.com/lenguyenthanh/chess-position-generator
chess chess-programming functional-programming scala typelevel
Last synced: 7 days ago
JSON representation
Generate random chess position/perft
- Host: GitHub
- URL: https://github.com/lenguyenthanh/chess-position-generator
- Owner: lenguyenthanh
- License: agpl-3.0
- Created: 2023-04-07T06:55:02.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-15T09:22:13.000Z (almost 2 years ago)
- Last Synced: 2025-01-28T22:56:00.459Z (8 days ago)
- Topics: chess, chess-programming, functional-programming, scala, typelevel
- Language: Scala
- Homepage:
- Size: 42 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# README
Chess position/perft genertor using [scalachess](https://github.com/lichess-org/scalachess)
## Compile
This requires [scala-cli](https://scala-cli.virtuslab.org/install) in order to compile and run.
```sh
scala-cli compile .
```## Examples
### gen command
- Generate 64 positions after 32 moves depth for crazyhouse and save to `crazyhouse.csv`
```sh
scala-cli run . -- gen --variant crazyhouse --moves 32 --positions 64 --output crazyhouse.csv
```- To generate positions for all variants we can just omit the variant from command line.
```sh
scala-cli run . -- gen --moves 32 --positions 64 # the default output file is `positions.csv`
```### perft command
This command will first generate positions (same logic as `gen` command) and then generate perft for those positons.
- generate perft with depth 2 for all variants with the default config
```sh
scala-cli run . -- perft --depth 2
```- generate perft with depth 2 for all variants with the custom config
```sh
echo "10,10\n23,99" > myconfig.csv
scala-cli run . -- perft --depth 2 --config myconfig.csv
```