Somewhat OT... Computer playing Minesweeper

John Doe joe at schmoe.com
Wed Jul 14 22:34:39 EDT 2004


I expect you'd get much better performance by randomly selecting the
first get() in solve().  As it is, for the first get, you iterate over
every possible combination of fields of the apropriate size, only to
learn that they are all equally likely, since you have no information.

As for your percentage accuracy, I think another poster had a point,
in that while your first random get is capable of causing a Boom, in
most implementations of Minesweeper, it cannot.  You are throwing in
an extra 15% failure rate, right there on your 16x16 with 40 mines.



More information about the Python-list mailing list