MineSwee++ 3: Play Minesweeper Flags with your computer |
Author: |
Message: |
Choli
Elite Member
Choli
Posts: 4714 Reputation: 42
43 / /
Joined: Jan 2003
|
RE: Have you ever thought of playing MineSweeper Flags with your computer?
quote: Originally posted by Mnjul
How do you code "sometimes" ?
quote: 50% is a fair number, but I don't know what makes the game the easiest and what the hardest
i think that 50% doen't have anything to do with the difficult of the game. I'm not sure. I've only played once and the game freezed. the last i saw was "it's [o]'s turn.[o] is calculating a deciding" or something similar... nothing happened after that. I couldn't take a sshot. I'll test it further later.
Edit: just played again and if freezed again: see attachment,.
Attachment: buscaminas se cuelga.JPG (46.75 KB)
This file has been downloaded 545 time(s).
This post was edited on 01-10-2004 at 03:13 PM by Choli.
|
|
01-10-2004 03:06 PM |
|
|
fluffy_lobster
Veteran Member
Posts: -2
Posts: 1391 Reputation: 23
36 / /
Joined: Nov 2002
|
RE: Have you ever thought of playing MineSweeper Flags with your computer?
30% of the time you open it?
I would have thought the hardest process of decision would be to choose the square with the highest chance of there being a mine being there...
To make him smarter, you might also want to stop him choosing squares on the edge when he's making the 'random' moves when nothing that's there tells him where there might be a mine. You have a statistically better chance of finding the mines indicated by a square on the edge than a square with all 8 unknown edges.
|
|
01-10-2004 03:12 PM |
|
|
Mnjul
forum super mod
plz wub me
Posts: 5396 Reputation: 58
– / /
Joined: Nov 2002
Status: Away
|
O.P. RE: Have you ever thought of playing MineSweeper Flags with your computer?
quote: Originally posted by fluffy_lobster
I would have thought the hardest process of decision would be to choose the square with the highest chance of there being a mine being there...
Yep that's right, [o] does it...
If the highest chance is not over 50% (you can set it in Games\Options) [o] just randomly opens one
If you like, I can post my source code of the original MineSwee+ in C++ (It's mess and unorganized all in all, and you'll wonder why I use class and even use an inheritance)
And Choli:
How come
This post was edited on 01-10-2004 at 03:25 PM by Mnjul.
|
|
01-10-2004 03:24 PM |
|
|
Tochjo
forum super mod
Posts: 4207 Reputation: 78
37 / /
Joined: Sep 2003
|
RE: Have you ever thought of playing MineSweeper Flags with your computer?
It's freezing for me too. I've attached a screenshot (that will probably not tell you much anyway).
Edit: freezing again, with Red 17, Blue 24 and 10 left. Calculating, thinking, not responding...
Attachment: freezing.PNG (88.37 KB)
This file has been downloaded 3959 time(s).
This post was edited on 01-10-2004 at 03:37 PM by Tochjo.
|
|
01-10-2004 03:31 PM |
|
|
Mnjul
forum super mod
plz wub me
Posts: 5396 Reputation: 58
– / /
Joined: Nov 2002
Status: Away
|
O.P. RE: Have you ever thought of playing MineSweeper Flags with your computer?
I've uploaded a new version and it's supposed not to have the freezing problem
|
|
01-10-2004 03:48 PM |
|
|
Tochjo
forum super mod
Posts: 4207 Reputation: 78
37 / /
Joined: Sep 2003
|
RE: Have you ever thought of playing MineSweeper Flags with your computer?
It isn't freezing anymore (for now), thanks!
|
|
01-10-2004 03:54 PM |
|
|
fluffy_lobster
Veteran Member
Posts: -2
Posts: 1391 Reputation: 23
36 / /
Joined: Nov 2002
|
RE: Have you ever thought of playing MineSweeper Flags with your computer?
quote: Originally posted by Mnjul
Yep that's right, [o] does it...
If the highest chance is not over 50% (you can set it in Games\Options) [o] just randomly opens one
If you like, I can post my source code of the original MineSwee+ in C++ (It's mess and unorganized all in all, and you'll wonder why I use class and even use an inheritance)
Well it still has a better chance of winning if it always goes for the highest chance... maybe that's why 0% is so hard, but that depends on your code working out the probability of squares with nothing special adjacent to them to compare a random shot with.
I wouldn't be able to use the source code anyway, I don't have VC++ and don't know C++ I can understand you using classes though, that's how I did it
|
|
01-10-2004 03:54 PM |
|
|
Mnjul
forum super mod
plz wub me
Posts: 5396 Reputation: 58
– / /
Joined: Nov 2002
Status: Away
|
O.P. RE: Have you ever thought of playing MineSweeper Flags with your computer?
Well I am not very sure still...
[o] finds out the highest chance for all the cell is 40% (two fifth), and if [o] opens it he MISSES, does it mean you will have much more chance to open the (nearby) cells and get a mine?
|
|
01-10-2004 04:09 PM |
|
|
fluffy_lobster
Veteran Member
Posts: -2
Posts: 1391 Reputation: 23
36 / /
Joined: Nov 2002
|
RE: Have you ever thought of playing MineSweeper Flags with your computer?
Out of all the squares which you have the choice to click on, each has a percentage chance of getting a mine.
For example, if it is adjacent to a 1 which has no other unclicked adjacent squares and no adjacent mines, the probability is 1, because there is nowhere else for the 1 mine to go.
Similarly, a square adjacent to a 7 which is surrounded by 6 clicked mines and one other empty square.
The probability of a square adjacent to a 2 which has 2 clicked mines adjacent to it is 0
Similarly, a shot in the middle of nowhere has a probability. It can be calculated by taking the total number of mines left and dividing it by the total number of free squares. This is usually quite a low probability but when you get further on in the game and more squares have been ruled out, one of these squares may well be more likely than one of the squares adjacent to a 1 in the middle of nowhere (each of which has a chance of 0.125). You can also train it to pick the most remote possible 'middle of nowhere' square (although it looks like you already have) because if only one square separates the random square and a previously clicked square, you introduce combined probability that might be to the user's advantage.
I hope that makes sense...
This post was edited on 01-10-2004 at 04:35 PM by fluffy_lobster.
|
|
01-10-2004 04:34 PM |
|
|
Mnjul
forum super mod
plz wub me
Posts: 5396 Reputation: 58
– / /
Joined: Nov 2002
Status: Away
|
O.P. RE: Have you ever thought of playing MineSweeper Flags with your computer?
Thanks, I already know that...they are the ways [o] calculates...
|
|
01-10-2004 04:36 PM |
|
|
Pages: (14):
« First
«
1
[ 2 ]
3
4
5
6
»
Last »
|
|