Slashdot Mirror


Solving Sudoku With dpkg

Reader Otter points out in his journal a very neat use for the logic contained in Debian's package dependency resolver: solving sudoku puzzles. To me at least, this is much more interesting than the sudoku puzzles themselves. Update: 08/24 02:51 GMT by T : Hackaday just ran a story that might tickle the same parts of your brain on a game played entirely with MySQL database queries.

3 of 190 comments (clear)

  1. Re:Cheat code for even Sudoku?? by Anonymous Coward · · Score: 5, Informative

    Jesus Christ. If you're going to mention the greatest cheat code ever, get it right:
    Up-Up-Down-Down-Left-Right-Left-Right-B-A-(Select)-(Start)

    Amateur.

  2. Re:Cheat code for even Sudoku?? by _xeno_ · · Score: 4, Informative

    RTFA. I know, I know, what am I suggesting, it's Slashdot.

    Here's the quick version: Russell Coker remarked that "a package management system that can solve Sudoku based on package dependency rules is not something that I think would be useful or worth having."

    Daniel Burrows realized that apt could, in fact, currently be used to solve Sudoku puzzles, and wrote a Python script to automate the process of creating the packages required to do such a thing. That's the linked article, and it gives the background I'm repeating here.

    I, personally, think it's pretty damned cool. Useless, but cool.

    And, as the article points out, there exist better Sudoku solving algorithms. apt is a rather poor Sudoku solver, mainly because it's designed to come up with the "best" dependency resolution rather than solve Sudoku. It's not to "cheat" at Sudoku, but rather to demonstrate the power of the apt dependency resolver.

    --
    You are in a maze of twisty little relative jumps, all alike.
  3. I Disagree and I Agree by Nymz · · Score: 5, Informative

    Sudoku doesn't have clever logic and elegant methods.

    Check out the various strategies listed on this Sudoku Solver.

    Don't mod me down if you disagree. If you disagree, consider writing a retort instead.

    You must be new here. Only posters that take the time to back up conclusions with reasoned responses are moderated down. Conversely, those that write short, unsupported attacks are moderated up... because in reality most people can only be trusted with 2 tags - I agree or I disagree.