Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kunald08/n-puzzle-solver
A C++ project which efficiently solves any given N-puzzle (aka 15 puzzle) using a backtracking algorithm on a decision tree.
https://github.com/kunald08/n-puzzle-solver
Last synced: 21 days ago
JSON representation
A C++ project which efficiently solves any given N-puzzle (aka 15 puzzle) using a backtracking algorithm on a decision tree.
- Host: GitHub
- URL: https://github.com/kunald08/n-puzzle-solver
- Owner: kunald08
- Created: 2024-10-03T08:09:14.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-03T08:18:56.000Z (4 months ago)
- Last Synced: 2024-12-22T13:42:05.505Z (about 1 month ago)
- Language: C++
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# N-puzzle-solver
A C++ project which efficiently solves any given N-puzzle (aka 15 puzzle) using a backtracking algorithm on a decision tree.
## Run on Terminal
```sh
g++ Header/*.cpp main.cpp -std=c++11 -o test
test
```## Description
In this project, the main objective is developing a program that solves the puzzle
game, whose rules are as follows:- Game table is an NxN table whose cells are filled with numbers from 1
to (N^2 − 1), and the remaining one is blank.
- Only the blank box can be moved on the table and the moving direction
can be either horizontal or vertical (diagonal moves are not possible).
- When the blank box is moved, the blank one and the box in the destination
position of the blank box are swapped.## Output
The program will write all steps without blank spaces or newline characters. Starting from the initial configuration:
- For LEFT move, the program will write letter L,
- For RIGHT move, the program will write letter R,
- For UP move, the program will write letter U,
- For DOWN move, the program will write letter D on the terminal.## Author
👤 **Kunal Dharpure**
* [LinkedIn](https://www.linkedin.com/in/dharpure-kunal)
* [GitHub](https://github.com/dharpurekunal08)