Re: Minesweeper solver
Article: 7913 of alt.hackers From: edp@math.zk3.dec.com (Eric Postpischil) Newsgroups: alt.hackers Subject: Re: Minesweeper solver Date: 30 May 1995 15:26:13 GMT Organization: Digital Equipment Corporation Lines: 36 Approved: edp Distribution: world Message-ID: 3qfdel$ep0@jac.zko.dec.com Reply-To: edp@mv.com NNTP-Posting-Host: math.zk3.dec.com Status: RO
Sam Wood (sjw@saucer.cc.umr.edu) wrote, in some article that expired:
[Assertion that Minesweeper guarantees the first chosen square is safe.]
>not true. It's tru that it would be simple to implement, but it just
>isn't the case. I have on many occasions hit a mine on the first square.
>try the corners. i have never seen a case where no corner had a mine.
I tried the corners. Did you? I set Minesweeper (from Windows 3.1) to
24x30, with 667 mines (the maximum it will accept). In 20 successive
games, I tried each of the corners five times as the first square. No
bomb ever appeared in the first chosen square. If the bombs are placed
by random choice from a uniform distribution, the chance of 20 squares
independently not having bombs in them is ((24*30-667)/(24*30))^20, or
about one in 46 sextillion.
ObHack: Need to use Recorder to run two macros at different times in
the same session without user intervention (both to work around bugs in
other products). But Recorder won't activate a second instance (running
it a second time just activates the first window), and Recorder doesn't
provide any way to terminate itself -- It just hangs around after
executing a macro. Solution: Copy Recorder to a different file name.
The newly named file would run even with the original Recorder still
active, although not vice-versa. (More of a kludge than a hack, but oh
well.)
-- edp (Eric Postpischil)
"Always mount a scratch monkey."
edp@mv.com
Disclaimer: The opinions of Digital Equipment Corporation do not reflect mine.
Public key fingerprint: 8e ad 63 61 ba 0c 26 86 32 0a 7d 28 db e7 6f 75.
To get PGP, FTP /pub/pgp/pgp26uis.zip or pgp26uix.zip from ftp.demon.co.uk.