t-dillon / tdoku

A fast Sudoku solver and generator with a benchmark suite for comparing the fastest known solvers.
https://t-dillon.github.io/tdoku
BSD 2-Clause "Simplified" License
197 stars 25 forks source link

Sudokus with arbitrary shapes and sizes #5

Closed rishabh-ranjan closed 3 years ago

rishabh-ranjan commented 3 years ago

Hi Tom! Really appreciate your work on this.

Can you please add support for generating and solving sudokus other than the classic 9x9 variant? If not as command-line arguments, maybe as compile-time options.

As you must be well aware sudokus are of interest to not only the human players, but also to AI researchers. With the recent advances in Neuro-Symbolic AI, Sudoku datasets are becoming a popular testbed once again. One often requires experimenting with different variants with larger sizes and rectangular boxes (like 6x6 sudokus with 2x3 boxes) to investigate interesting questions regarding scalability and generalisation.

Your repository contains one of the most complete treatments of sudoku solvers and generators, and I'm sure it would be of great utility to extend it with this feature. Thanks.

t-dillon commented 3 years ago

Hi Rishabh,

Thanks for the suggestion! This is not something I'm likely to get to though -- partly because I'm occupied with other pursuits, but also because the assumption that we're working with 9x9 Sudoku is deeply ingrained in the solvers and tools in this project.

If you're just interested in creating a generator for puzzles of different shapes it should be easy to base one off of an exact cover solver or a sat-based solver. It would be hard to adapt the tdoku simd solver to deal with puzzles of different shapes, so I don't think there's much to gain from trying to add support in this project.

Cheers, Tom