Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Those three heuristics seem to work for the puzzles on the site, due to a limitation of the site's puzzle generator. However, there exist puzzles of this type which cannot be solved using only those three heuristics.

Take this one, for instance:

  - O - - - -
  X - - O X -
  - - - - - -
  O - X - O -
  - - - - - O
  X - O - X -
This puzzle has the unique solution shown below, but none of your three heuristics will make any progress on it.

  O O X X O X
  X X O O X O
  X O O X O X
  O X X O O X
  O X X O X O
  X O O X X O
One of the ways you can solve this is to note that the square in the upper-left corner must be O. This is because if it were X, then there would be three adjacent Os in the first column. This insight is due to calebcjh@gmail.com.


Except that your puzzle has multiple solutions, so I'm guessing that's why it breaks the heuristics. The same would be true of a sudoku puzzle with too few starting numbers.

  O O X X O X
  X X O O X O
  O O X O X X
  O X X O O X
  X X O X O O
  X O O X X O


Your solution is not valid. The 3rd column and the last column are duplicates.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: