General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 27th, 2004, 12:19 PM
chrisdragonkni chrisdragonkni is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Great Britain
Posts: 4 chrisdragonkni User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Auto Minesweeper Solver

Hi. Im looking for source code for a piece of software that automaically completes minesweeper. (Yeah cheating I know :-) ) I've seen software on the internet that does this but none of the creators will share the source code. Does anyone know of source code that does this, or can anyone make the code?
I preferably want the type that analyses the screen to work out the moves to make, rather than the type that reads the memory.

Reply With Quote
  #2  
Old January 27th, 2004, 12:52 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,886 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 19 m 35 sec
Reputation Power: 18
let me guess, for MSN 6.0 games?
lol... cheat... =P

I've never even heard of this type of program... is it specifically for the Minesweeper in windows, or all minesweeper games?

Reply With Quote
  #3  
Old January 27th, 2004, 01:08 PM
chrisdragonkni chrisdragonkni is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Great Britain
Posts: 4 chrisdragonkni User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
The auto-solver i've currently got is for the minesweeper that came with windows. I dont mind whether it works with all versions of minesweeper or just the standard windows one. But the author of the solver i've got won't share the source code, which is a shame because their solver completed the expert mode in 2 seconds!

Reply With Quote
  #4  
Old January 27th, 2004, 01:18 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,886 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 19 m 35 sec
Reputation Power: 18
Windows Minesweeper used to save its stats in an INI file in the windows folder... you could make it say expert in 0 seconds if you want... this was back on Windows 3.11... not sure if it still operates like this.

If its only the score you want to change, look into that.

Reply With Quote
  #5  
Old January 27th, 2004, 01:20 PM
chrisdragonkni chrisdragonkni is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Great Britain
Posts: 4 chrisdragonkni User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Yes that does work, but I want to understand how the auto-solving software works. Getting a better score is good but I want to learn something too.

Reply With Quote
  #6  
Old January 27th, 2004, 01:24 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,886 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 19 m 35 sec
Reputation Power: 18
Heh, I like your attitude...
Well, aside from the cheating on simple windows games... =)

Have you tried searching sourceforge, or other open-source forums?
Perhaps even coding your own simple Minesweeper would help you understand how to "reverse engineer" (so-to-say) the operations of it...

Reply With Quote
  #7  
Old February 2nd, 2004, 06:06 AM
Safe_Gaz Safe_Gaz is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 1 Safe_Gaz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I am developing a solver myself for my university major project. To be honest most of the solvers on the net are pretty bad.

Mine will have a feature that will allow you to step through every move the solver makes to help you learn minesweeper. That might be the sort of thing you are looking for, but its not quite ready yet.

With my version of minesweeper you can have boards of upto 100 million squares. It currently solves a 1000x1000 sized board with 10% mines in 650 ms and a 7000x7000 board with 4.9 million mines in 45 seconds.

I would not release the source code though, I have to admit. To get a basic solver up and running is really very very easy, to make it a complete but fast solver is where it starts to get a little more difficult.

Reply With Quote
  #8  
Old February 2nd, 2004, 08:37 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Posts: 2,056 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 44 m 22 sec
Reputation Power: 0
I remember (from 3.11 days I think) minesweeper used to have an easter egg, which when activated, you could hover over a square, and the top right (or left) or the screen would go black or white, depending on whether the sqaure was safe or not...

Reply With Quote
  #9  
Old March 3rd, 2004, 07:26 AM
Marsh8472 Marsh8472 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 3 Marsh8472 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Minesweeper Cheat

Quote:
Originally Posted by chrisdragonkni
Hi. Im looking for source code for a piece of software that automaically completes minesweeper. (Yeah cheating I know :-) ) I've seen software on the internet that does this but none of the creators will share the source code. Does anyone know of source code that does this, or can anyone make the code?
I preferably want the type that analyses the screen to work out the moves to make, rather than the type that reads the memory.

Stuck on a move in MineSweeper? I wrote a program to tell you the probability of a cell having a mine in any senerio. Here's a snapshot http://wave.prohosting.com/mars8472/Mine_Solver2.jpg and here's the program http://wave.prohosting.com/mars8472/Minesweeper_Solver_2.exe I looked all over the internet for something like this and couldn't find it so I just made enjoy!

Reply With Quote
  #10  
Old March 6th, 2004, 06:21 AM
Marsh8472 Marsh8472 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 3 Marsh8472 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Minesweeper Solver Webpage

http://wave.prohosting.com/mars8472/minesweeper.html

Reply With Quote
  #11  
Old June 6th, 2004, 02:27 AM
ScottMcG ScottMcG is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Vancouver, BC
Posts: 1 ScottMcG User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
My friend wrote an auto-solver in C++ that he's optimized to one second. Actually, he timestamped it start to finish and it takes about 1/5 of a second. He won't show me the source code either. I can figure out the algorithm, but I'm having trouble with the mouse events.

His program dynamically finds any open instances of minesweeper on the desktop and solves them. You can optionally slow it down and watch the algorithm go to work.....really cool.

Reply With Quote
  #12  
Old June 6th, 2004, 09:15 PM
Marsh8472 Marsh8472 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 3 Marsh8472 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
minesweeper

mine would be that fast too if i wrote it in c++ using registers would be a lot faster i applied every shortcut algorithum in my program.

Reply With Quote
  #13  
Old October 15th, 2004, 01:48 AM
whorush whorush is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 1 whorush User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
thinking about writing a minesweeper solver

hi guys, i'm thinking about writing one for an AI project.

i was thinking about using bayesian networks. think thats a good idea?

wondering has anyone tried this b4? am i opening a can of worms? am i asking for trouble?

wondering if there is an open source MS gui, that i could attach my solver too, i've never written a gui b4.

thanks guys.

Reply With Quote
  #14  
Old January 26th, 2005, 05:38 AM
buckyboy101 buckyboy101 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 2 buckyboy101 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 m 11 sec
Reputation Power: 0
Hi, I have been developing a Minesweeper solver which solves most boards, but is not totally complete, it uses a logic representation of the board. I was reading the posts and saw that one solver did the expert in 2 seconds, isn't this quite slow, I mean mine can do it in 2/3 of a sec? I was also wondering about Safe_Gaz's solver, it seems very fast indeed but is it capable of solving any human solvable Minesweeper instance (complete), or are there certain situations in which it cannot work? Finally for Marsh8472, how does your solver produce the probabilities? I read somewhere on the web that the probabilities of adjacent cells cannot be mathematically combined. So how have you managed it? Or have you got a different method? I originally thought that as each cell is probed new probs could be calulated, by taking the average prob of a mine in any unknown cell and for each cell adding the probability of there being a mine in it by taking into account its adjacent numbers. Ok that may seem a bit messy, here's an example: say there are 102 cells, 2 of which are probed and they are adjacent, there are 10 mines, so the avarage prob is 0.1 (10/100). The two cells are a 2 and a 3, each with 7 neighbours 4 of which overlap:

..........
...???...
...?2?...
...?3?...
...???...
..........

So for the non overlapping ones of the 2, the prob would be 0.1 + 2/7 and for the non overlapping ones of the 3 the prob would be 0.1 + 3/7 then for the overlapping ones 0.1 + 2/7 + 3/7. Get it?! Anyways this doesn't work as sometimes you get probs over 1, so how have you done it?

Thanks.

Reply With Quote
  #15  
Old January 26th, 2005, 05:40 AM
buckyboy101 buckyboy101 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 2 buckyboy101 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 m 11 sec
Reputation Power: 0
Quote:
Originally Posted by Marsh8472
mine would be that fast too if i wrote it in c++ using registers would be a lot faster i applied every shortcut algorithum in my program.


How do you calculate your probs?

Reply With Quote
  #16  
Old May 13th, 2006, 08:22 PM
jocecharland jocecharland is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 1 jocecharland User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 31 sec
Reputation Power: 0
Smile Solver

A classmate and I have also written a solver for an AI class.

You can find the executable and C++ source code at http://www.universitopia.com/AI.html.

The program works with the Windows version. It has solved Expert mode in under half a second on my laptop. On average I would say it solves Expert mode 25-30% of the time. You can tell it to play many games (like 100 or 500) in a row so it's easy to gather stats.

The probabilities could use more work, but we used a method that was more mathematically sound and it resulted in a lower success rate, so who knows!

Feel free to use or modify the source code, but please give credit where credit is due. I'd be interested in knowing about anyone using the code, so feel free to email me.

Reply With Quote
  #17  
Old February 6th, 2008, 12:59 PM
notrog notrog is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 1 notrog User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 9 sec
Reputation Power: 0
Cool i made one

Hi i made one at ZuluK.com/files/TempMSB_Demo_v_I.jnlp Its not as fast as some of the others, but I would be willing to share snippets of the source ie the main part that tells you the minesweeper logic if you email me for it. Instructions for use of the program are - you have to have windows xp and the java runtime - unobstruct the board, hit calibrate, wait a minute, and then click the other buttons after it's calibrated to 'play'.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Auto Minesweeper Solver


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap