# Calcudoku Generator

Calcudoku is a Sudoku-like puzzle — given an $$n \times n$$ grid, fill it with 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 work 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. There's no guarantee how long it will take for a puzzle to become decently challenging, but as the output grows more difficult, the algorithm will slow down dramatically. 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.

Time Elapsed

0

Since Last Change

0