|
 |
On 4-4-2009 8:49, Kevin Wampler wrote:
> Here's a fun, frivolous, and simple little program I wrote recently
> which seemed just interesting enough to share. The idea is to write an
> AI assistant for the game of minesweeper. The trickiness is that
> sometimes every available square has a chance of having a mine on it, so
> running a basic constraint satisfaction algorithm on it won't give you
> any useful information.
>
> Instead, you can generate a sequence of random mine assignments which
> are each consistent with the numbers on the currently visible squares
> and then calculate a running average of the probability that each square
> has a mine. In some cases this probability is 100% or 0%, in which case
> it (with high likelihood) gives you the same result as a standard
> logical deduction would, but in other cases the probabilities are very
> useful for making a move.
The lower one has at least 5 positions where you will end up having a
50% change and no additional information. The change of surviving this
minefield are therefore below 3%. Possibly much below that if you have
had to guess before arriving at the current position. That is not good
for a game. Perhaps you can employ something like this to find grids
that can be solved with a reasonable chance.
Post a reply to this message
|
 |