Hacker News new | past | comments | ask | show | jobs | submit login

There are a couple questions here:

- Can every minesweeper board be solved without guessing?

No:

  1 ?
  1 ?
- If a minesweeper game doesn't require guessing, is there an algorithm that can determine the next move?

Yes. Just enumerate all combinations of mine/not-mine for every hidden cell, and look at all the boards that match the exposed clues. If there is a square that is never a mine, click it. If there isn't, the board requires guessing.

- Is there an efficient algorithm to do the above?

Most likely not. Minesweeper as a decision problem ("is there any solution to these given clues") is NP-complete. http://simon.bailey.at/random/kaye.minesweeper.pdf




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: