{"id":24227731,"url":"https://github.com/robert27/sudokusolver","last_synced_at":"2025-11-30T20:04:12.970Z","repository":{"id":142387907,"uuid":"434186811","full_name":"Robert27/SudokuSolver","owner":"Robert27","description":"Simple Sudoko solver written in Python","archived":false,"fork":false,"pushed_at":"2021-12-02T11:08:56.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-12T10:39:14.554Z","etag":null,"topics":["backtracking","forward-checking","python","sudoku"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Robert27.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":"2021-12-02T11:05:03.000Z","updated_at":"2021-12-02T20:40:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"08c93329-4154-417e-b971-38a074a257e0","html_url":"https://github.com/Robert27/SudokuSolver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Robert27/SudokuSolver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robert27%2FSudokuSolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robert27%2FSudokuSolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robert27%2FSudokuSolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robert27%2FSudokuSolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Robert27","download_url":"https://codeload.github.com/Robert27/SudokuSolver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robert27%2FSudokuSolver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27409009,"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-30T02:00:05.582Z","response_time":55,"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":["backtracking","forward-checking","python","sudoku"],"created_at":"2025-01-14T10:19:52.148Z","updated_at":"2025-11-30T20:04:12.950Z","avatar_url":"https://github.com/Robert27.png","language":"Python","readme":"# SudokuSolver\n\n## Description\n\nSudokuSolver is a simple Sudoku solver written in Python. The algorithm uses a recursive backtracking algorithm to solve\nthe puzzle.\n\n### Input\n\nInputs are in the form of a txt file containing a 9x9 grid of numbers in the range 0-9.\n\n- 0 represents an empty cell\n- 1-9 represents a given number.\n\n`sudokus_test/` contains a collection of puzzles to test the solver.\n\n### Requirements\n\nMinimum required Python version: 3.6  \nIncompatible version: 2\n\n## Functions\n\n### Function `test_solver`\n\n\u003e     def test_solver(\n\u003e         path: str\n\u003e     ) ‑\u003e None\n\n\nTests the solver on all the grids in the given path  \n:param path: Path to the folder containing the grids\n\n## Classes\n\n### Class `Sudoku`\n\n\u003e     class Sudoku(\n\u003e         path: str\n\u003e     )\n\n\nSudoku Solver Class\n\nInitializes the grid  \n:param path: Path to the grid file\n\n### Static methods\n\n##### `Method load_grid`\n\n\u003e     def load_grid(\n\u003e         path: str\n\u003e     ) ‑\u003e list\n\n\nLoads the grid from a file and returns it as a list of lists  \n:param path: Path to the file\n:return: List of lists\n\n### Methods\n\n##### Method `find_empty_cell`\n\n\u003e     def find_empty_cell(\n\u003e         self\n\u003e     ) ‑\u003e Optional[tuple]\n\n\nFinds the first empty cell in the grid and returns its coordinates  \n:return: (row, column)\n\n##### Method `print_grid`\n\n\u003e     def print_grid(\n\u003e         self\n\u003e     ) ‑\u003e None\n\n\nPrints the grid to the console in a readable format\n\n##### Method `recursive_solve`\n\n\u003e     def recursive_solve(\n\u003e         self\n\u003e     ) ‑\u003e bool\n\n\nRecursive backtracking algorithm to solve the grid  \n:return: True if solved, False otherwise\n\n##### Method `solve`\n\n\u003e     def solve(\n\u003e         self\n\u003e     ) ‑\u003e list\n\n\nSolves the grid using the backtracking algorithm  \n:return: The solved grid\n\n##### Method `time_taken`\n\n\u003e     def time_taken(\n\u003e         self\n\u003e     ) ‑\u003e float\n\n\nReturns the time taken to solve the grid in milliseconds  \n:return: Time taken in milliseconds\n\n##### Method `check`\n\n\u003e     def check(\n\u003e         self,\n\u003e         digit: int,\n\u003e         position: tuple\n\u003e     ) ‑\u003e bool\n\n\nChecks if the number is valid in the row, column and region\n\n:param digit: Number to check  \n:param position: (row, column)  \n:return: True if valid, False otherwise\n\n\n-----\nGenerated by *pdoc* 0.10.0 (\u003chttps://pdoc3.github.io\u003e).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobert27%2Fsudokusolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobert27%2Fsudokusolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobert27%2Fsudokusolver/lists"}