Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion docs/examples/sudoku.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
# Sudoku

<div id="app"></div>
This example demonstrates a **Sudoku Solver** powered by the DS deductive system. The solver uses logical rules to deduce cell values based on standard Sudoku constraints:

- **Row constraint**: Each row must contain the digits 1-9 exactly once
- **Column constraint**: Each column must contain the digits 1-9 exactly once
- **Box constraint**: Each 3×3 box must contain the digits 1-9 exactly once

## How It Works

The Sudoku solver encodes Sudoku rules as logical inference rules in the DS system. When you click "Solve", the search engine iteratively applies these rules to deduce new cell values until the puzzle is complete. You can also click "Update" to perform a single iteration of inference and observe the step-by-step solving process in the log.

## Interactive Demo

<div id="app">
<p style="text-align: center; padding: 40px; color: #666; font-style: italic;">
Loading Sudoku Solver...
</p>
</div>
<script src="https://unpkg.com/ejs@3.1.10/ejs.min.js"></script>
<script>
(async () => {
Expand Down