2025-01-27 00:24:28 +05:30
2025-05-11 16:48:42 +05:30
2025-02-23 15:15:26 +05:30
2025-02-23 15:26:42 +05:30
2025-02-22 19:29:20 +05:30
2025-02-22 19:29:20 +05:30
2025-01-04 16:18:49 +05:30
2025-03-24 00:24:09 +05:30
2025-02-23 17:16:15 +05:30

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:     7
           Total pieces placed:    71
         Success pieces placed:    42
               Total time (ms):    69

               ♘  .  .  .

               ♙  .  ♖  .

               ♔  .  ♘  ♙

               .  .  .  .


          id: 202859896274992
  • Solve a puzzle by ID, or by board string
$ sol_cli --solve 202859896274992
$ sol_cli --solve-board N...P.R.K.NP....

               ♘  .  .  .

               ♙  .  ♖  .

               ♔  .  ♘  ♙

               .  .  .  .


          id: 202859896274992

Found 3 solutions
1. RxNc2
2. RxPd2
3. RxKa2
4. RxPa3
5. RxNa4

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.
Description
Solitaire chess solver and puzzle generator implemented in rust
Readme AGPL-3.0 661 KiB
Languages
Rust 94.8%
Shell 4.1%
HTML 1.1%