https://github.com/noxmor/zenkai
Universal Sudoku solver with a custom-rule engine
https://github.com/noxmor/zenkai
lua-scripting sudoku-solution-finder sudoku-solver
Last synced: about 1 month ago
JSON representation
Universal Sudoku solver with a custom-rule engine
- Host: GitHub
- URL: https://github.com/noxmor/zenkai
- Owner: Noxmor
- License: mit
- Created: 2025-05-09T19:15:35.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-12T22:29:45.000Z (about 1 year ago)
- Last Synced: 2025-06-23T09:46:19.828Z (about 1 year ago)
- Topics: lua-scripting, sudoku-solution-finder, sudoku-solver
- Language: C
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zenkai
Universal Sudoku solver with a custom-rule engine
***
## About
`zenkai` is a universal `sudoku solver` with a `custom-rule engine`. This means `zenkai` can most likely solve any sudoku you can think of, even with rules beyond the standard sudoku rules.
### Sudoku files
`zenkai` expects sudokus to be defined in a `json` file. The root object MUST HAVE a field `name` with its value being the sudoku grid string (a 81 character string, where the i-th character encodes the i-th digit in the sudoku, 0 encodes an empty cell).
Furthermore, the root object MAY HAVE a `rules` field with its value being an array of objects. Each of those objects encodes an instance of a custom sudoku rule (e.g. a thermometer) by specifying a `name` field with the value being the name of the custom rule and optionally (if needed) a `data` field which can be a generic json object. This `data` object will be translated by `zenkai` from `json` to `lua`. The behaviour for said custom rules are defined by `.lua` script files inside `zenkai`'s `rules` directory.
For more details on how behaviour for custom rules can be defined, check the `rules` subdirectory in this repository.
***
## Installing
Run the following command inside the root directory of this repository:
```bash
make install
```
This will install the `zenkai` binary and the `rule` scripts, found in the `rules` subdirectory.
***
## Usage
```bash
zenkai ...
```
where sudoku is a filepath to a `json` file that encodes the sudoku alongside the custom rules for the sudoku, if needed.