{"id":15540275,"url":"https://github.com/rm-hull/sudoku","last_synced_at":"2025-03-29T00:14:59.286Z","repository":{"id":5637815,"uuid":"6846166","full_name":"rm-hull/sudoku","owner":"rm-hull","description":"A Scala / Play! 2.x sudoku solver for deployment on Heroku","archived":false,"fork":false,"pushed_at":"2014-01-01T14:57:50.000Z","size":539,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-03T12:17:40.008Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"sudoku.destructuring-bind.org","language":"CSS","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/rm-hull.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}},"created_at":"2012-11-25T00:55:42.000Z","updated_at":"2020-08-21T22:03:29.000Z","dependencies_parsed_at":"2022-09-18T17:00:39.391Z","dependency_job_id":null,"html_url":"https://github.com/rm-hull/sudoku","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm-hull%2Fsudoku","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm-hull%2Fsudoku/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm-hull%2Fsudoku/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm-hull%2Fsudoku/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rm-hull","download_url":"https://codeload.github.com/rm-hull/sudoku/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246117762,"owners_count":20726069,"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":[],"created_at":"2024-10-02T12:13:25.004Z","updated_at":"2025-03-29T00:14:59.260Z","avatar_url":"https://github.com/rm-hull.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"Sudoku\n======\n\nA Scala / Play! 2.x sudoku solver for deployment on Heroku at http://sudoku.destructuring-bind.org. \nInitially written to compare and contrast an identically implemented Clojure\nsolver, whose source can be found here: \nhttps://github.com/rm-hull/project-euler/blob/master/src/euler096.clj,\nbut mainly to play with Play!.\n\n\u003e\"HOW TO PLAY: Fill in the grid so that every row, every column and every 3 × 3\nbox contains the digits 1–9. There’s no maths involved. You solve the puzzle with\nreasoning and logic.\"\n\n_Advice on how to play Sudoku, The Independent Newspaper_\n\nHow to build \u0026 deploy\n---------------------\n* install sbt 0.12.1  if you do not have it already. You can get it from\n  here: http://www.scala-sbt.org/\n \n* execute `sbt` and then `help play` for play specific commands\n\n* execute `sbt` and then `compile` to build the project\n\n* execute `sbt` and then `run` to run the built-in development server\n\n* to run directly from the shell, execute `sbt` and then `stage`; this will\n  create a `target/start` script which allows the application to run stand-alone\n\nTrivia\n------\nThere are 6,670,903,752,021,072,936,960 ways of filling in a blank Sudoku \ngrid, according to http://www.afjarvis.staff.shef.ac.uk/sudoku/sudoku.pdf\n\n49151 grids dynamically sourced from http://school.maths.uwa.edu.au/~gordon/sudokumin.php,\nrandomly displayed whenever the page is reloaded, alternatively, go to \nhttp://sudoku.destructuring-bind.org/grid/XXXX to load a specific grid.\n\nhttp://sudoku.destructuring-bind.org/grid/52 is reputed to be the hardest \nSudoku in the world [http://www.telegraph.co.uk/science/science-news/9359579/Worlds-hardest-sudoku-can-you-crack-it.html]\n\nImplementation Details\n----------------------\nThere are initially two simple solvers employed iteratively in composition \nwith each other until the grid is solved or there is no further reduction\navailable:\n\n* _Single cell reduction_, where cells are progressively reduced down to be \n  the only candidate in a cell.\n\n* _Hidden single reduction_, where a candidate that appears with others in a \n  cell, but only once in a given row, column or box.\n\nIt turns out that these simple techniques will _generally_ reduce down the \nsearch space considerably, and in a good proportion of grids, solves the\ngrid entirely.\n\nIf however this repeated simple reduction still leaves cells with multiple\ncandidates, then a lazy stream-based depth-first-search is used (again applying\nthe above reductions at each step), where the first grid which 'solves' is\nreturned.\n\nA side-effect of this interweaving of DFS and simple reduction considerably \nshortens the search space, and allows completely empty grids to be solved.\n\nLicense\n-------\nCopyright (c) Richard Hull 2012\n\nSame as the eclipse public license - v 1.0: https://www.eclipse.org/legal/epl-v10.html\n\n\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rm-hull/sudoku/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frm-hull%2Fsudoku","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frm-hull%2Fsudoku","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frm-hull%2Fsudoku/lists"}