https://github.com/rachit901109/cli-board-game-solver
CLI based Eight Puzzle & LightsOut Solver, which also generates svg files of the solution path and game tree for both the games
https://github.com/rachit901109/cli-board-game-solver
8puzzle-solver cli lightsout problem-solving
Last synced: 4 months ago
JSON representation
CLI based Eight Puzzle & LightsOut Solver, which also generates svg files of the solution path and game tree for both the games
- Host: GitHub
- URL: https://github.com/rachit901109/cli-board-game-solver
- Owner: rachit901109
- Created: 2023-08-09T19:07:23.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-15T22:19:53.000Z (over 1 year ago)
- Last Synced: 2025-01-18T21:16:58.538Z (6 months ago)
- Topics: 8puzzle-solver, cli, lightsout, problem-solving
- Language: C++
- Homepage:
- Size: 193 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 1. Eight-puzzle-problem
Commands to run on the terminal:
1. To solve puzzle:
```
cd eight_puzzle
g++ -g eight_puzzle.cpp -fsanitize=address -o solve.exe
./solve.exe
```Solution path:

2. To generate game tree:
```
g++ -g game_tree.cpp -fsanitize=address -o game_tree.exe
./game_tree.exe
```
Game Tree for Depth 5:
# 2. Lights Out Puzzle
Commands to run on the terminal:
1. To solve puzzle:
```
cd lightsout
g++ -g lightsout.cpp -o solve.exe
./solve.exe
```
Solution Sequence:
2. To generate game tree:
```
g++ -g game_tree.cpp -o game_tree.exe
./game_tree.exe
```
Game Tree (All possible moves for a 3x3 grid):