{"id":19664524,"url":"https://github.com/ash0508/ai-based_sudoku_solver_using_csp_technique","last_synced_at":"2026-04-12T23:06:36.934Z","repository":{"id":223104899,"uuid":"759331005","full_name":"Ash0508/AI-based_Sudoku_Solver_using_CSP_Technique","owner":"Ash0508","description":"This project is a Sudoku solver implemented in Java using the Constraint Satisfaction Problem (CSP) approach. It reads a Sudoku puzzle, applies CSP techniques to solve it, and verifies the solution.","archived":false,"fork":false,"pushed_at":"2024-07-21T17:49:01.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T03:49:53.526Z","etag":null,"topics":["csp-solver","git","java","vscode"],"latest_commit_sha":null,"homepage":"https://github.com/Ash0508/AI-based_Sudoku_Solver_using_CSP_Technique","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ash0508.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-18T09:42:26.000Z","updated_at":"2024-07-21T17:49:04.000Z","dependencies_parsed_at":"2024-07-21T19:15:08.417Z","dependency_job_id":"94d572d5-f8e2-4c3c-8376-4e51e0982484","html_url":"https://github.com/Ash0508/AI-based_Sudoku_Solver_using_CSP_Technique","commit_stats":null,"previous_names":["ash0508/ai-based_sudoku_solver_using_csp_technique"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ash0508/AI-based_Sudoku_Solver_using_CSP_Technique","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ash0508%2FAI-based_Sudoku_Solver_using_CSP_Technique","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ash0508%2FAI-based_Sudoku_Solver_using_CSP_Technique/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ash0508%2FAI-based_Sudoku_Solver_using_CSP_Technique/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ash0508%2FAI-based_Sudoku_Solver_using_CSP_Technique/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ash0508","download_url":"https://codeload.github.com/Ash0508/AI-based_Sudoku_Solver_using_CSP_Technique/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ash0508%2FAI-based_Sudoku_Solver_using_CSP_Technique/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285704833,"owners_count":27217837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-21T02:00:06.175Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csp-solver","git","java","vscode"],"created_at":"2024-11-11T16:18:01.808Z","updated_at":"2025-11-21T23:02:49.854Z","avatar_url":"https://github.com/Ash0508.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sudoku Solver using Constraint Satisfaction Problem (CSP)\n\nThis project is a Sudoku solver implemented in Java using the Constraint Satisfaction Problem (CSP) approach. It reads a Sudoku puzzle, applies CSP techniques to solve it, and verifies the solution.\n\n## Features\n\n- **CSP Techniques**: Utilizes techniques such as elimination, single possible number, only choice in row/column/box to solve the puzzle.\n- **Efficient**: Designed to solve puzzles efficiently with performance statistics.\n- **Modular Design**: Clear separation of different CSP techniques for better readability and maintainability.\n\n## Technologies Used\n\n- **Java**: The programming language used for the implementation.\n- **Eclipse/IntelliJ**: Recommended IDEs for development.\n\n## Getting Started\n\n### Prerequisites\n\n- Java Development Kit (JDK) installed (version 8 or above).\n- An IDE like Eclipse or IntelliJ IDEA is recommended for running the project.\n\n### Installation\n\n1. **Clone the Repository**\n\n    ```sh\n    git clone https://github.com/yourusername/sudoku-csp-solver.git\n    cd sudoku-csp-solver\n    ```\n\n2. **Open the Project in Your IDE**\n\n    Open the cloned project in your preferred IDE.\n\n3. **Run the Project**\n\n    Locate the `SudokuCSP.java` file and run it.\n\n### Usage\n\n1. **Define the Sudoku Puzzle**\n\n    The Sudoku puzzle to be solved is defined in the `firstSudoku` 2D array in the `SudokuCSP.java` file. Modify this array to solve different Sudoku puzzles.\n\n    ```java\n    public static int[][] firstSudoku = {\n        {5, 0, 1, 0, 0, 0, 6, 0, 4},\n        {0, 9, 0, 3, 0, 6, 0, 5, 0},\n        {0, 0, 0, 0, 9, 0, 0, 0, 0},\n        {4, 0, 0, 0, 0, 0, 0, 0, 9},\n        {0, 0, 0, 1, 0, 9, 0, 0, 0},\n        {7, 0, 0, 0, 0, 0, 0, 0, 6},\n        {0, 0, 0, 0, 2, 0, 0, 0, 0},\n        {0, 8, 0, 5, 0, 7, 0, 6, 0},\n        {1, 0, 3, 0, 0, 0, 7, 0, 2},\n    };\n    ```\n\n2. **Run the Solver**\n\n    Run the `SudokuCSP.java` file. The program will display the initial Sudoku puzzle, solve it, and then display the solved puzzle along with the time taken.\n\n### Project Structure\n\n- **Cell.java**: Defines the `Cell` class representing each cell in the Sudoku grid.\n- **SudokuCSP.java**: Main class implementing the CSP solver.\n\n### Example Output\n\n```sh\n---------------------------------------------\n 5 0 1 0 0 0 6 0 4\n 0 9 0 3 0 6 0 5 0\n 0 0 0 0 9 0 0 0 0\n 4 0 0 0 0 0 0 0 9\n 0 0 0 1 0 9 0 0 0\n 7 0 0 0 0 0 0 0 6\n 0 0 0 0 2 0 0 0 0\n 0 8 0 5 0 7 0 6 0\n 1 0 3 0 0 0 7 0 2\n---------------------------------------------\n\nSUDOKU IS CORRECTLY SOLVED!!!\n---------------------------------------------\n 5 3 1 2 7 8 6 9 4\n 2 9 4 3 1 6 8 5 7\n 6 7 8 4 9 5 2 1 3\n 4 2 6 7 5 1 3 8 9\n 3 5 7 1 6 9 4 2 8\n 7 1 9 8 4 2 5 3 6\n 9 4 5 6 2 3 1 7 8\n 8 8 2 5 3 7 9 6 1\n 1 6 3 9 8 4 7 4 2\n---------------------------------------------\nSudoku Solved in : 123 ms\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fash0508%2Fai-based_sudoku_solver_using_csp_technique","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fash0508%2Fai-based_sudoku_solver_using_csp_technique","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fash0508%2Fai-based_sudoku_solver_using_csp_technique/lists"}