- Introduction
- Project Overview
- Project Structure
- How to Run
- Algorithm Details
- Concurrency
- Graphical User Interface (GUI)
- Dependencies
- Performance Considerations
- Future Improvements
- Contributing
- License
- Video in Arabic to Explain The Project
- Documentation File
The N-Queens Solver is a Java application that aims to find solutions to the N-Queens problem. The N-Queens problem involves placing N queens on an N×N chessboard in such a way that no two queens threaten each other. The project utilizes a multithreaded approach for solving the problem and includes a graphical user interface (GUI) to visualize the solutions.
- NQueensSolver.java: Implements the core logic for solving the N-Queens problem.
- NQueensThread.java: Represents a thread for solving the problem concurrently.
- NQueensSolverGUI.java: Provides a graphical user interface for interacting with the solver.
- Main.java: The main entry point for running the application.
- pom.xml: Maven configuration for managing dependencies.
The project follows a modular structure:
- com.example.nqueenssolver
- Main.java
- solver
- NQueensSolver.java
- NQueensThread.java
- gui
- NQueensSolverGUI.java
- Ensure you have Java and Maven installed.
- Clone the repository:
git clone <repository-url>
- Navigate to the project directory:
cd Multithreaded-N-Queens-Problem-Solver
- Build the project:
mvn clean install
The algorithm uses a backtracking approach to explore all possible combinations of queen placements. The time complexity is (O(N!)), and the space complexity is (O(N)).
The project utilizes multithreading to solve the N-Queens problem concurrently. Each thread represents a unique attempt to find a solution.
The GUI, implemented using Java Swing, allows users to input the size of the chessboard (N) and visualize the solutions found by each thread.
- Java Swing for GUI components.
- Maven for project management.
The actual runtime may vary based on the hardware and environment. Consider adjusting thread count and other parameters for optimal performance.
- Implement additional heuristics for faster pruning of the search space.
- Enhance GUI features for better user interaction.
Contributions are welcome! Feel free to fork the project and submit pull requests.
This project is licensed under the MIT License.
This video has been compressed. For better quality, please check the resources folder.