Skip to content

Commit f30e516

Browse files
Copilothzhangxyz
andauthored
Add introduction and loading message for Sudoku example page (#41)
* Initial plan * Add introduction about the Sudoku implementation and loading message Co-authored-by: hzhangxyz <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: hzhangxyz <[email protected]>
1 parent 67cb0fc commit f30e516

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

docs/examples/sudoku.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
# Sudoku
22

3-
<div id="app"></div>
3+
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:
4+
5+
- **Row constraint**: Each row must contain the digits 1-9 exactly once
6+
- **Column constraint**: Each column must contain the digits 1-9 exactly once
7+
- **Box constraint**: Each 3×3 box must contain the digits 1-9 exactly once
8+
9+
## How It Works
10+
11+
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.
12+
13+
## Interactive Demo
14+
15+
<div id="app">
16+
<p style="text-align: center; padding: 40px; color: #666; font-style: italic;">
17+
Loading Sudoku Solver...
18+
</p>
19+
</div>
420
<script src="https://unpkg.com/[email protected]/ejs.min.js"></script>
521
<script>
622
(async () => {

0 commit comments

Comments
 (0)