Click here to see the SAS code.
Click here to see the example.
---------------------------------------------------------------
This example demonstrates how to use SAS/GRAPH to draw a sudoku grid,
and populate the boxes with numbers. Rick Langston used this a few
years ago to draw the grids for his SAS Global Forum presentation
where he had a program that uses SAS to *solve* the puzzles.
(this example is just the drawing the grid part ... not the
automatic solving part!)
Currently the data is all hard-coded ... but you could modify it however you want.
/* Some sudoku data from example in ...
http://en.wikipedia.org/wiki/Sudoku
I number each box in the grid with its x/y coordinate as the x_y_id
(the coordinate system starts at the bottom/left)
*/
Here's the SAS Global Forum example the solves sudoku puzzles...
http://www.sascommunity.org/wiki/Sudoku_Solver_Using_Proc_SQL
Back to Samples Index