Commit Graph

4 Commits

Author SHA1 Message Date
8f3217f3cc Implement Algorithm X for solving and generating sudokus 2021-02-22 20:03:47 -07:00
7ac3e6ad06 Use worker threads for sudoku generation
Moves sudoku generation off of the main thread. Allows for multiple
generation requests (up to the number of physical CPU cores) to be
served in parallel. Uses the "physical-cpu-count" node package to
determine the numer of physical CPUs of the host.

Also introduces a timeout which causes too-difficult (or impossible)
generation requests to fail if they take more than 5 seconds to
complete. In effect soft-capping the complexity of generated puzzles.
2021-02-20 18:57:18 -07:00
7f9cffbfdd initial commit 2021-02-19 23:55:49 -07:00
e13b4d737b root commit 2021-02-19 18:29:51 -07:00