{"id":24796332,"url":"https://github.com/anthonytedja/sudoku","last_synced_at":"2025-03-24T20:18:35.810Z","repository":{"id":233639425,"uuid":"465514080","full_name":"anthonytedja/sudoku","owner":"anthonytedja","description":"sudoku is an AI-powered CSP sudoku variant solver for all grid sizes","archived":false,"fork":false,"pushed_at":"2022-03-03T01:11:12.000Z","size":97,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-30T00:33:56.629Z","etag":null,"topics":["ai","csp-solver","forward-checking","gac","mrv-heuristic","sudoku-solver"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anthonytedja.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-03-03T00:30:46.000Z","updated_at":"2024-04-16T20:17:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"621064ea-d65c-43c1-9ef5-e6f8ba30a203","html_url":"https://github.com/anthonytedja/sudoku","commit_stats":null,"previous_names":["anthonytedja/sudoku"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonytedja%2Fsudoku","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonytedja%2Fsudoku/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonytedja%2Fsudoku/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonytedja%2Fsudoku/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anthonytedja","download_url":"https://codeload.github.com/anthonytedja/sudoku/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245343984,"owners_count":20599867,"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","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":["ai","csp-solver","forward-checking","gac","mrv-heuristic","sudoku-solver"],"created_at":"2025-01-30T00:32:50.631Z","updated_at":"2025-03-24T20:18:35.798Z","avatar_url":"https://github.com/anthonytedja.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sukodu\n\n[![Grid](assets/board.png)](https://github.com/anthonytedja/sudoku)\n\n\u003e sudoku is an AI-powered sudoku variant solver.\n\n## Introduction\n\nThere are two parts to this project:\n\n- `propagators.py` : The implementation of two constraint propagators – a Forward Checking constraint propagator and a Generalized Arc Consistence (GAC) constraint propagator. Also includes the implementation of the MRV heuristic for selecting variables to be assigned to code in this file.\n- `funpuzz_csp.py` : The encoding of three different CSP models to solve a logic puzzle that is a sudoku variant called FunPuzz, as described below. One model uses binary not-equal constraints for row and column constraints, while the other model uses n-ary all-different constraints for them. The third model encodes row, column and cage constraints (which are defined below).\n\n## Funpuzz Formal Description\n\nThe Sudoku variation encoded is called FunPuzz and has the following formal description:\n\n- The game consists of an n×n grid where each cell of the grid can be assigned a number 1 to n. No digit appears more than once in any row or column. Grids range in size from 3×3 to 9×9.\n- The game grids are divided into heavily outlined groups of cells called cages. These cages come with a target and a mathematical operation. The numbers in the cells of each cage must produce the target value when combined using the mathematical operation.\n- For any given cage, the operation can be one of addition, subtraction, multiplication or division. Values in a cage can be combined in any order: the first number in a cage may be used to divide the second, for example, or vice versa. Note that the four operators are “left associative” e.g., 16/4/4 is interpreted as (16/4)/4 = 1 rather than 16/(4/4) = 16.\n- A puzzle is solved if all empty cells are filled in with an integer from 1 to n and all above constraints are satisfied.\n- An example of a 6×6 grid is shown in the Figure. Note that your solution will be tested on n×n grids where n can be from 3 to 9.\n\n## Setup \u0026 Usage\n\nTo run premade board tests, use the following command:\n\n```cpp\npython3 autograder.py\n```\n\n## Features\n\n- Integrated Forward Checking and Generalized Arc Consistence constraint propagators with MRV heuristic to minimize search tree runtime by over 10000 times compared to Backtracking Search.\n- Encoded efficient CSP models to exponentially outperform solution runtimes, variable assignments and prune value ratios.\n\n## Built With\n\n- Visual Studio Code\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonytedja%2Fsudoku","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanthonytedja%2Fsudoku","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonytedja%2Fsudoku/lists"}