Calcudoku Generator

Calcudoku is a Sudoku-like puzzle — given an \(n \times n\) grid, fill it withn the digits \(1, ..., n\) such that no row or column contains a repeated digit, and such that each cage’s condition is satisfied. For example, a cage with \(5+\) in a corner must have its contents sum to 5. A cage with \(2-\) is a little more complicated — it means that choosing some cell in the cage and subtracting the others results in 2. So a 3-cell cage containing 5, 2, and 1 would work. Division cages are written with a colon and works similarly to subtraction. Finally, cages with no operation at all are always \(1 \times 1\), and simply contain the number in the corner.


Generating these puzzles takes time. The core of the algorithm is written in a language called WebAssembly that runs at much higher speeds than JavaScript (the standard language of the web), but even still, making a puzzle with cages as large as possible is an intensive process. The time it takes for the progress bar to complete is a guess at when the puzzle should be decent, but it is no guarantee, and for puzzles larger than \(8 \times 8\), it may not be nearly enough. For the best results, let the program run for five to ten minutes and make some tea. It’s not that much to ask — after all, you’re probably going to spend longer than that actually solving the puzzle.