Queen's Gambit is a visualisation tool for solving the N-Queens problem using a backtracking algorithm. The N-Queens problem involves placing N chess queens on an N×N chessboard so that no two queens threaten each other. This project allows you to interactively explore and visualize solutions to the N-Queens problem.
Caption for Screenshot 1
Caption for Screenshot 2
- Interactive UI: Adjust the number of queens and visualize solutions.
- Backtracking Algorithm: Find all possible solutions.
- Slider for Speed: Adjust visualization speed.
- Responsive Design: Works well on various screen sizes.
Clone the repository and open index.html
in your web browser.
https://github.com/Sagar180304/N-Queen-Visualiser.git
cd queens-gambit
-
Input Number of Queens:
- Enter the number of queens in the input box.
-
Adjust Visualization Speed:
- Use the slider to change the speed.
-
Start Visualization:
- Click "Play" to see the solutions unfold.
- HTML: Structuring the web page.
- CSS: Styling the UI components.
- JavaScript: Implementing the interactive features and algorithm.
Your result should to be same as the above screen shots.
Contributions are always welcome!
So if you would like to add some thing or update some existing features then please make pull request , I will review it as early as possible.
What did you learn while building this project? What challenges did you face and how did you overcome them?
-
- Algorithm Optimization Implementing the backtracking algorithm for solving the N-Queens problem taught valuable lessons in algorithm optimization. Iterative improvements in the algorithm's efficiency were necessary to handle larger board sizes without performance degradation.
-
- UI/UX Design Iteration Iterative UI/UX design was crucial to improve user interaction and visual clarity. Feedback loops from testing helped in refining the slider functionality and ensuring responsive design across different devices.