BookmarkSubscribeRSS Feed

Sudoku Puzzle Generator

Started ‎07-05-2014 by
Modified ‎04-04-2022 by
Views 2,933

The macro generates Sudoku puzzles using a two-stage algorithm.   Initially it finds a completed Sudoku square using a Markov chain algorithm that tries to sample at random from all squares that exist. The macro is not restricted to 9x9 squares and can generate squares up to 25x25 within a reasonable amount of time.  In the field of experimental design, these squares are known as gerechte designs with rectangular regions.  The second stage algorithm uses very simple reverse solving logic to generate a valid puzzle, by removing clues one by one from the completed square.  The puzzle generated is written to a SAS data set in the work library and can also be viewed as listing output or as RTF/PDF files.

Version history
Last update:
‎04-04-2022 03:17 PM
Updated by:

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Labels
Article Tags