Files
sol_chess/README.md
T
2026-01-22 18:27:32 +05:30

1.6 KiB

Solitaire Chess Puzzle Generator

Goal: Generate 'hard' puzzles.

Play a demo of the game here

Install

  • Install Rust from here.
  • Run cargo install --git https://github.com/cool-mist/sol_chess to install the tool.
  • This installs 2 binaries: sol_chess and sol_cli.

Usage

  • Run sol_chess to start a windowed GUI game.
  • Run sol_cli to start the CLI tool.

CLI Usage

  • Generate a puzzle
$ sol_cli -g -n 6
Generating a puzzle with 6 pieces with a maximum of 5 solutions
                Total attempts:    16
           Total pieces placed:   131
         Success pieces placed:    96

               ♙  ♗  .  .               

               .  .  .  .               

               ♗  ♖  .  .               

               ♙  .  .  ♙               


              id: wmgYAAAG     
  • Solve a puzzle by ID, or by board string
$ sol_cli --solve wmgYAAAG
$ sol_cli --solve-board pb......br..p..p

               ♙  ♗  .  .               

               .  .  .  .               

               ♗  ♖  .  .               

               ♙  .  .  ♙               


              id: wmgYAAAG              

1. RxBb4
2. RxPa4
3. RxBa2
4. RxPa1
5. RxPd1
There are atleast 1 solutions to this puzzle

Heuristics of current algorithm

  1. About 6-7 pieces on the board.
  2. Select pieces to place based on its weight. 3. Eg: Queen is too powerful, so it has lower weightage. 4. Eg: Knights are confusing. More knights.