A Conversation for Creating an Artificial Intelligence to play Minesweeper

In the beginning......

Post 1

RangaKoo

(bear with me - I'm only a first year)

How does it get past the initial random clicking to start the board? Wouldn't it think that (according to the information) every square holds a mine as there is nothing to tell it otherwise?

(thinks through the algorithm again) Or is there where the 'guessing' comes into action as it knows that it's 'found' more mines than there really are?


In the beginning......

Post 2

26199

Neither smiley - smiley

To sum up the way the program works: it guesses thirty times, making sure every guess fits in with the information, then averages the guesses together to get probabilities for there being a mine on each square.

Now, at the start of the game, it doesn't have *any* information... thus it produces thirty entirely random guesses at what the board might contain. Averaging these values out, it naturally concludes that some squares are less likely to have mines on than others... simply because of the random nature of the probability calculating procedures.

It then picks whichever square happened to look like it ought to have the least probability of containing a mine.

In effect: it guesses. But the guessing comes from the probability calculations, not from any higher-level process.

The cool thing about my algorithm, though, is that if you ask it 'where are all the mines?', it will always be able to give you an answer... if there are thirty mines on the board, it *always* knows where it thinks every single one of those thirty mines might be...

26199


In the beginning......

Post 3

The Cow

Does your program make use of the Minesweeper 'cheat' in windows: if you blow up the first time, then move that bomb to another (random) square.

This'd change the 60% for the Beginner mode to 66%, possibly?


In the beginning......

Post 4

26199

You mean there's never a bomb on the square which you lost on last time?

In fact, my program plays against its own version of minesweeper for reasons of easy of interaction, so it doesn't have any little quirks to take advantage of.

There's a better cheat for the Windows 3.11 version of minesweeper, incidentally: I think you type something like SHIFT x z z y ENTER (this isn't likely to be accurate - you could look it up at http://www.eeggs.com ) and then the top-left pixel on your screen changes colour to show if you're hovering over a mine.

26199


In the beginning......

Post 5

Martin Harper

No, the first square you click is never a bomb...

btw, presumably you might get better results if you randomly guessed at the center, rather than the edges... or maybe vica versa... some element of "look-ahead" would make the program work faster...


In the beginning......

Post 6

Martin Harper

umm, I meant better, not faster... smiley - sadface


In the beginning......

Post 7

26199

It's true that the program doesn't take into account how much information it'll get from clicking on a particular square...

Hmmmm. Intuitively, I think the advantage gained in doing so would be incredibly small... but I could be wrong.

*shrug*

26199


In the beginning......

Post 8

Martin Harper

I suspect that in classic Minesweeper the advantage is of the order of percentage points - but I'm sure I could find variations where it is critically important...


In the beginning......

Post 9

Baldrick

Have any of you played Minesweeper on really old b/w macs?


In the beginning......

Post 10

The Cow

The cheat is X Y Z Z Y - from ADVENT fame

Advent was the REALLY old text game (we're talking before 'COLOSSAL' adventure, which took up more than one reel of tape): the name is ADVENT because they only had 6 letter filenames.


In the beginning......

Post 11

Martin Harper

oh good god - the "magic word"! fond memories...

You are in the Hall of the Mountain King. MyRedDice blocks your way.


In the beginning......

Post 12

Baldrick

that's old.


In the beginning......

Post 13

26199

Grin, I played that one...

Prob'ly wasn't born before it came out, though.

26199


In the beginning......

Post 14

RangaKoo

Yes - it's just the same on a b/w Mac isn't it?


In the beginning......

Post 15

RangaKoo

I beg to differ. The first square you click on CAN be a bomb - and it's REALLY irritating.


In the beginning......

Post 16

Martin Harper

*shrug* not on my PC. It's probably different for the mac - I know it's different for some of the clones...


In the beginning......

Post 17

26199

I've tested Win 3.1 and Win 95's minesweepers, and it appears MyRedDice is right: the first square you click on is never a mine.

26199


In the beginning......

Post 18

JininTonix (Confusion is best taken with a wedge of Lime!)

What the *&^*&^ ARE YOU ON ABOUT????!!!
IF YOU CAN HELP THIS ONE OUT THEN THE FLAG IS UPSIDE DOWN ALREADY....
do you know the meaning of autocracy?????
Where do you think these types of ?? come from anyways?
You might as well be playing "Step on the Mine and You DIE"
-Jin


In the beginning......

Post 19

26199

Er...

Dare I ask what you're talking about?

26199 (somewhat baffled)


In the beginning......

Post 20

Martin Harper

Remember kids, mines aren't toys...


Key: Complain about this post