A powerful Sudoku solver built with Selenium. This tool automates the process of solving Sudoku puzzles directly on a webpage. It extracts the grid from the webpage, solves it using an efficient backtracking algorithm, and inputs the solution back into the webpage.
- Automated Grid Extraction: Reads the Sudoku grid directly from the webpage.
- Efficient Solving Algorithm: Utilizes a backtracking algorithm to solve puzzles quickly.
- Seamless Web Interaction: Automatically fills the solved grid back into the webpage.
- Python 3.x
- Selenium
- ChromeDriver
-
Clone the repository:
git clone https://github.com/yourusername/sudoku-solver.git cd sudoku-solver -
Install dependencies:
pip install selenium
-
Set up ChromeDriver:
- Download ChromeDriver from Google Chrome Labs.
- Place the
chromedriverexecutable in the project directory. Ensure it is in the same location as your Python script.
-
Open the script and confirm that the
executable_pathin theServiceobject points to yourchromedriverfile. -
Run the script:
python sudoku.py
-
Watch as the script:
- Launches a browser.
- Navigates to the Sudoku puzzle webpage.
- Extracts, solves, and fills in the solution.
- Extract the Sudoku Grid: Reads the grid structure from the webpage.
- Solve the Sudoku: Implements a backtracking algorithm to compute the solution.
- Fill the Sudoku Grid: Inputs the solved values back into the webpage.
Contributions are always welcome! If you have suggestions, encounter issues, or want to enhance the project, feel free to:
- Open an issue
- Submit a pull request
This project is licensed under the MIT License. See the LICENSE file for more information.
