可视化Prolog语言
Prolog Development Center A/S (PDC)

Visual Prolog 7.3 Examples and Demos

Sudoku Example

Written by Stuart Cumming

Sudoku  is a logic-based number-placement puzzle. The objective is to fill a 9×9 grid so that each column, each row, and each of the nine 3×3 boxes (also called blocks or regions) contains the digits from 1 to 9 only one time each. The puzzle setter provides a partially completed grid.

Completed Sudoku puzzles are usually a type of Latin square with an additional constraint on the contents of individual regions.

The modern puzzle was invented by an American architect, Howard Garns, in 1979 and published by Dell Magazines.  It became popular in Japan in 1986, after it was published by Nikoli and given the name Sudoku, meaning single number.  It became an international hit in 2005.]

Download the example project

Build and Run

Load the project into the IDE,  build the project, and then select "Run in window" to start the example .

Note

The example requires Visual Prolog 7.3 Commercial or Personal Edition.

Users of previous versions of Visual Prolog are welcome to upgrade to the current version of Visual Prolog  to use the latest versions of the Visual Prolog examples.

Use the WEB|Check for Update IDE menu command for upgrade information.

See also

"Sudoku Puzzle - an Exercise in Constraint Programming and Visual Prolog 7" by Carsten Kehler Holst (Prolog Development Center)

"Sudoku" article in Wikipedia

 
Home | Company | News | Products Downloads | Shop | Support | Visual Prolog Features | Visual Prolog Compiler | FAQ | Tutorials | Examples | Knowledge Base | Discussion Forum | wiki | Site Map

Prolog Development Center A/S - H.J. Holst Vej 3-5C - 2605 Broendby, Denmark - Tel +45 3636 0000 - Fax +45 3636 0001 - sales@visual-prolog.com