enigma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Enigma-devel] level submission: minesweeper


From: Andreas Lochmann
Subject: Re: [Enigma-devel] level submission: minesweeper
Date: Tue, 15 Apr 2008 21:46:08 +0200
User-agent: IceDove 1.5.0.14pre (X11/20080305)

Hi,

Ronald Lamprecht schrieb:
The problem of unsolvable bomb distributions can be fixed by a simple
algorithm. All bomb free fields must be connected to the outside area
by direct path. For all bomb free fields of the border mark all
reachable fields by a recursive depth run. Marking all visited fields
allows to limit the recursive depth run to those border fields that are
not yet marked.

I have now implemented such a reachability check. Unreachable tiles do not occur very often, but the check does occasionally reject a mine distribution.

This would reduce the problem to bomb distributions that are not
"solvable" due to the intrinsic ambiguity.

Andreas wrote:
Not exactly, as you can't reach the diagonal tiles
without stepping on the directly adjacent ones.

Eliminating distributions that cannot be reached as they would require diagnal moves is the main idea of the above algorithm. Throwing away these occasional distributions should solve the problem for sure.

I hope the following example works as intended,
though it's a little bit constructed:

++++++++
++*****+
+**C__*+
++4*??*+
+++*33*+
++++++++

Additional info: 1 Mine is still not found.

* = Mine,
Number = free and opened, number as usual
+ = anything opened, number is uninteresting
_ = unopened but obviously free from the number of
     remaining mines and the "3",
? = one of these two fields is a mine, the other one is
     free. We know this from the two "3", but we need
     "C" to determine which one.
C = Center piece: We know that it's free from the "4"
     and from the number of remaining mines. But we
     can't access it, as its connection to the outside is
     only secure when we already have the information
     hidden below itself.

In real minesweeper, this situation is solvable.
In hit-the-neighbor-minesweeper, it's gambling.

Never thought that recursion matters in minesweeper ...
*laugh*

@Brian: Thanks for the update, I'll take a look at it soon.

Best greets,
Andreas






reply via email to

[Prev in Thread] Current Thread [Next in Thread]