What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » MineSwee++ 3: Play Minesweeper Flags with your computer

MineSwee++ 3: Play Minesweeper Flags with your computer
Author: Message:
fluffy_lobster
Veteran Member
*****

Avatar
Posts: -2

Posts: 1391
Reputation: 23
36 / Male / Flag
Joined: Nov 2002
RE: RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.236
quote:
Originally posted by Mnjul
Lobster: Could you use math equations to explain your post?

http://shoutbox.menthix.net/showthread.php?tid=20...d=189580#pid189580

In your post I at least know standard deviation...anyway just post your equations and I'll try to work it out;)

Thanks:)

If you don't want to..it's ok too:P

OK, the way I'll do this is to do the equations php-style, which afaik is almost if not completely identical to c...

Supposing you had a class array named $combination which had a number of different properties.  Each item in the array represents a possible combination in which the current visible squares are all satisfied (e.g. every 2 has two mines next to it)

foreach($combination as $i=>$value){

$combination[$i]->squaresinvolved = $combination[$i]->knownemptysquares + $combination[$i]->knownmines ;

$combination[$i]->deviation = ($combination[$i]->squaresinvolved / $combination[$i]->knownmines)-(256/51) ;

$totaldev += sqrt($combination[$i]->deviation ^ 2);

}

$standarddev = $totaldev / count($combination) ;

foreach($combination as $i=>$value){

$combination[$i]->standardisedscore = $combination[$i]->deviation / $standarddev ;

}

Now each combination has a standardised score which represents the number of standard deviations from the average and ideal situation.  The closer to 0 this value is, the more likely the combination is.  To make the closeness to zero a positive thing, I think at this point it needs to be depolarised and reciprocated.  Then the reciprocal can be found as a fraction of the total and it's that fraction that is the direct probability of each combination.

foreach($combination as $i=>$value){

$combination[$i]->standardisedscore = 1/(sqrt($combination[$i]->standardisedscore ^ 2)) ;
$totalreciprocalstandardisedscore += $combination[$i]->standardisedscore ;

}

foreach($combination as $i=>$value){

$combination[$i]->probability = $combination[$i]->standardisedscore/$totalreciprocalstandardisedscore ;

}

Now we have to apply the combination's probability to each square to see which one it affects the most. Let's take every square that [o] might want to click on (i.e. every one that is adjacent to the existing cluster of uncovered squares) and throw them into some sort of array.  And let's suppose each of these squares has a property called "influences" which is an array of probabilities that have effect on that square.  For example, if it's adjacent to a 1 with 4 free spaces next to it, an array item would be added with a value of 0.25.  The number of items in the array would depend on the number of opened squares.  For each of these probabilities you multiply it by the combination's probability, and then at the end take the average of these probabilities.  For each combination, the average probability is added to get a perfect (i think) probability:

foreach($combination as $i=>$value){

foreach($possiblesquare as $j=>$value1){

foreach($possiblesquare[$j]->influences as $k=>$value2){

$possiblesquare[$j]->influences[$k] = $possiblesquare[$j]->influences[$k] * $combination[$i]->probability ;

}

$possiblesquare[$j]->probability[$i] = sum($possiblesquare[$j]->influences) / count($possiblesquare[$j]->influences);

}

}

foreach($possiblesquare as $i=>$value){

$possiblesquare[$i]->overallprobability = sum($possiblesquare[$i]->probability);

}




And if I'm right, that's the way the cookie crumbles :P
01-15-2004 09:29 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
MineSwee++ 3: Play Minesweeper Flags with your computer - by Mnjul on 01-10-2004 at 07:05 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - by Chrono on 01-10-2004 at 07:40 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - by KnightieBoy on 01-10-2004 at 12:09 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - by ranicx on 01-10-2004 at 12:11 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - by fluffy_lobster on 01-10-2004 at 12:29 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - by Mnjul on 01-10-2004 at 12:39 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - by Stigmata on 01-10-2004 at 01:15 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - by Wabz on 01-10-2004 at 01:43 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - by Choli on 01-10-2004 at 02:09 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - by Mnjul on 01-10-2004 at 02:45 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - by Choli on 01-10-2004 at 03:06 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - by fluffy_lobster on 01-10-2004 at 03:12 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - by Mnjul on 01-10-2004 at 03:24 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - by Tochjo on 01-10-2004 at 03:31 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - by Mnjul on 01-10-2004 at 03:48 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - by Tochjo on 01-10-2004 at 03:54 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - by fluffy_lobster on 01-10-2004 at 03:54 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - by Mnjul on 01-10-2004 at 04:09 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - by fluffy_lobster on 01-10-2004 at 04:34 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - by Mnjul on 01-10-2004 at 04:36 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - by fluffy_lobster on 01-10-2004 at 04:41 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - by Mnjul on 01-10-2004 at 04:56 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - by fluffy_lobster on 01-10-2004 at 05:25 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - by Choli on 01-10-2004 at 08:54 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.221 - by Mnjul on 01-11-2004 at 06:33 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.221 - by bach_m on 01-11-2004 at 06:40 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.221 - by Mnjul on 01-11-2004 at 06:53 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.221 - by bach_m on 01-11-2004 at 06:55 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.221 - by Chrono on 01-11-2004 at 07:01 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.221 - by Mnjul on 01-11-2004 at 07:03 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.221 - by Chrono on 01-11-2004 at 07:07 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.221 - by tomfletcherman on 01-11-2004 at 10:04 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.221 - by CookieRevised on 01-11-2004 at 11:23 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.221 - by user27089 on 01-11-2004 at 11:42 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.221 - by Choli on 01-11-2004 at 11:59 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.221 - by user27089 on 01-11-2004 at 12:01 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.221 - by Mnjul on 01-11-2004 at 12:11 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.225 - by Choli on 01-11-2004 at 12:22 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.225 - by fluffy_lobster on 01-11-2004 at 01:07 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.225 - by Choli on 01-11-2004 at 01:12 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.225 - by Mnjul on 01-11-2004 at 01:41 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.225 - by fluffy_lobster on 01-11-2004 at 02:20 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.225 - by fluffy_lobster on 01-11-2004 at 03:59 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.225 - by Mnjul on 01-12-2004 at 06:39 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.225 - by Guido on 01-12-2004 at 06:45 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.225 - by Mnjul on 01-12-2004 at 06:57 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.225 - by fluffy_lobster on 01-12-2004 at 07:53 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.228 - by Mnjul on 01-12-2004 at 04:08 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.228 - by user27089 on 01-12-2004 at 06:18 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.228 - by Mnjul on 01-12-2004 at 06:20 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.228 - by fluffy_lobster on 01-12-2004 at 07:48 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.228 - by TotalKaos on 01-13-2004 at 12:34 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.228 - by Guido on 01-13-2004 at 01:43 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.228 - by Mnjul on 01-13-2004 at 02:21 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.228 - by Chrono on 01-13-2004 at 02:37 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.228 - by Mnjul on 01-13-2004 at 02:46 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.228 - by Chrono on 01-13-2004 at 02:50 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.228 - by Mnjul on 01-13-2004 at 04:26 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.231 - by Chrono on 01-13-2004 at 04:54 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.231 - by Choli on 01-13-2004 at 07:38 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.0.231 - by Mnjul on 01-13-2004 at 08:19 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.233 - by chungster on 01-13-2004 at 01:45 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.233 - by Choli on 01-13-2004 at 02:22 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.233 - by fluffy_lobster on 01-13-2004 at 04:55 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.233 - by Mnjul on 01-14-2004 at 05:55 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.233 - by Guido on 01-14-2004 at 06:12 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.233 - by Chrono on 01-14-2004 at 06:25 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.236 - by fluffy_lobster on 01-14-2004 at 07:57 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.236 - by Mnjul on 01-14-2004 at 09:15 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.236 - by Choli on 01-14-2004 at 09:41 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.236 - by hcsoso on 01-14-2004 at 02:57 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.236 - by hcsoso on 01-14-2004 at 02:58 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.236 - by Mnjul on 01-14-2004 at 03:07 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.236 - by hcsoso on 01-14-2004 at 03:13 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.236 - by Mnjul on 01-15-2004 at 01:43 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.236 - by Guido on 01-15-2004 at 07:35 PM
RE: RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.236 - by fluffy_lobster on 01-15-2004 at 09:29 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.236 - by Mnjul on 01-16-2004 at 08:24 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.236 - by Choli on 01-16-2004 at 11:35 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.236 - by Mnjul on 01-16-2004 at 11:37 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by bach_m on 01-23-2004 at 04:19 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by Mnjul on 01-23-2004 at 04:28 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by bach_m on 01-23-2004 at 02:26 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by bach_m on 01-23-2004 at 11:58 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by Mnjul on 01-24-2004 at 02:20 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by lizard.boy on 01-24-2004 at 02:44 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by user27089 on 01-26-2004 at 07:52 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by Choli on 01-26-2004 at 11:26 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by Weyzza on 01-27-2004 at 07:58 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by Choli on 01-27-2004 at 12:25 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by Mnjul on 01-27-2004 at 12:55 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by Choli on 01-27-2004 at 01:15 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by user27089 on 01-29-2004 at 06:34 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by fluffy_lobster on 01-29-2004 at 08:30 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by Mnjul on 01-30-2004 at 06:23 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by Rancey on 02-12-2004 at 09:46 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by Huuf on 03-07-2004 at 12:38 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by Mnjul on 03-07-2004 at 12:57 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by Marsh8472 on 03-07-2004 at 02:14 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by Sticky on 03-10-2004 at 11:55 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by Marsh8472 on 03-10-2004 at 05:09 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by Sticky on 03-11-2004 at 01:20 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by Marsh8472 on 03-11-2004 at 10:22 AM
RE: RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by V@no on 03-11-2004 at 01:34 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by Sticky on 03-11-2004 at 01:56 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.239 - by Marsh8472 on 03-13-2004 at 03:02 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.240 - by Mak on 01-30-2006 at 12:13 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.240 - by [MR] on 02-05-2006 at 09:45 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.240 - by manuvalbu on 02-08-2006 at 04:08 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.240 - by [MR] on 02-08-2006 at 04:14 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.240 - by manuvalbu on 02-08-2006 at 12:27 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.240 - by SebMarti on 02-13-2006 at 02:50 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.240 - by psychedelic on 05-19-2006 at 10:07 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.240 - by Supersonicdarky on 05-19-2006 at 10:17 PM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.240 - by Mnjul on 05-20-2006 at 05:25 AM
RE: Have you ever thought of playing MineSweeper Flags with your computer? - 1.1.240 - by Eddie on 05-20-2006 at 06:26 AM
RE: MineSwee++ 2: Play Minesweeper Flags with your computer (2.0.0395 Preview Release - by Mnjul on 01-25-2007 at 11:54 AM
RE: MineSwee++ 2: Play Minesweeper Flags with your computer (2.0.0395 Preview Release) - by NanaFreak on 01-25-2007 at 11:58 AM
RE: MineSwee++ 2: Play Minesweeper Flags with your computer (2.0.0395 Preview Release - by markee on 01-25-2007 at 12:15 PM
RE: MineSwee++ 2: Play Minesweeper Flags with your computer (2.0.0395 Preview Release) - by Sunshine on 01-25-2007 at 12:29 PM
RE: MineSwee++ 2: Play Minesweeper Flags with your computer (2.0.0395 Preview Release) - by SebMarti on 03-16-2007 at 02:50 AM
RE: MineSwee++ 2: Play Minesweeper Flags with your computer (2.0.0395 Preview Release - by Mnjul on 03-16-2007 at 11:52 AM
RE: MineSwee++ 2: Play Minesweeper Flags with your computer (2.0.0395 Preview Release - by Mnjul on 04-05-2007 at 04:57 PM
RE: MineSwee++ 2: Play Minesweeper Flags with your computer (2.0.0395 Preview Release - by Eddie on 04-05-2007 at 05:02 PM
RE: MineSwee++ 2: Play Minesweeper Flags with your computer (2.0.0395 Preview Release - by Mnjul on 04-06-2007 at 04:54 AM
RE: MineSwee++ 2: Play Minesweeper Flags with your computer (2.0.0395 Preview Release) - by NanaFreak on 04-06-2007 at 05:03 AM
RE: MineSwee++ 2: Play Minesweeper Flags with your computer (2.1.0531 RCX) - by MicroWay on 06-04-2007 at 09:04 PM
RE: MineSwee++ 2: Play Minesweeper Flags with your computer (2.1.0531 RCX) - by Dr4g0n on 06-05-2007 at 05:00 PM
RE: MineSwee++ 2: Play Minesweeper Flags with your computer (2.1.0531 RCX) - by prashker on 06-05-2007 at 07:39 PM
RE: MineSwee++ 2: Play Minesweeper Flags with your computer (2.1.0531 RCX) - by Dr4g0n on 06-05-2007 at 07:43 PM
RE: MineSwee++ 2: Play Minesweeper Flags with your computer (2.1.0531 RCX) - by Mnjul on 06-06-2007 at 07:28 AM
RE: MineSwee++ 2: Play Minesweeper Flags with your computer (2.1.0566) - by SebMarti on 08-25-2007 at 07:53 AM
need help - by medmonie on 10-19-2007 at 07:37 AM
RE: MineSwee++ 2: Play Minesweeper Flags with your computer (2.1.0566) - by Cyane on 08-30-2008 at 05:08 PM
RE: MineSwee++ 2: Play Minesweeper Flags with your computer (2.1.0566) - by Mnjul on 09-01-2008 at 12:57 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On