Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Automatic Minesweeper


  • Please log in to reply
25 replies to this topic
bhao
  • Members
  • 14 posts
  • Last active: Jul 21 2010 04:37 PM
  • Joined: 09 Aug 2006
hello

a little script that plays minesweeper all by itself.

autosweeper.ahk

i wrote this quite a while ago, shortly after i found autohotkey, so please forgive the obvious clumsiness in some places. i didn't really know how everything worked back then, and i didn't put more than an evening or two into it either.

it was a little difficult to determine where the mine area begins, because of all the different windows styles and font sizes and i'm not sure it will work with every theme, but i tested it under windows 2k default and windows xp classic and xp themes. also, since it uses the colors of the numbers to determine what they are, it might not work with every color depth. i tested with 16 and 32 bit and it seemed to work. the "program name" field is included for all the non-english-version windows users who might need to change the name.

since it is sometimes impossible to determine the position of mines, there is an option to have to script guess. especially once the chance of a mine goes above 20% (like on expert) this becomes quite frequent.

well, anyway, i hope you like it. it sure improved all my best times. 8)

d-man
  • Members
  • 290 posts
  • Last active: Jun 28 2015 09:26 AM
  • Joined: 08 Jun 2006
hahaha that's a funny script thx fer sharing it

Rich
  • Members
  • 10 posts
  • Last active: Dec 24 2005 10:01 AM
  • Joined: 28 Nov 2005
Nice script. Thanks for sharing.

winmine
  • Guests
  • Last active:
  • Joined: --
freekin cool. thx for sharing...

Harmor
  • Members
  • 182 posts
  • Last active: Sep 20 2007 05:09 AM
  • Joined: 06 Nov 2005
Now we got to do Automatic Solitare 8)
//TODO: Create kewl sig...

SKAN
  • Administrators
  • 9115 posts
  • Last active:
  • Joined: 26 Dec 2005
bhao!

Nineteen hundred lines of code :shock: :shock: :shock:
I did not dare to read the code as it would trigger a migraine aura. :wink:

It works for me.. and is amazing! Less than 3 seconds in Win 2000 default.

Nice work!

Regards, :)
kWo4Lk1.png

bhao
  • Members
  • 14 posts
  • Last active: Jul 21 2010 04:37 PM
  • Joined: 09 Aug 2006

Nineteen hundred lines of code :shock: :shock: :shock:
I did not dare to read the code as it would trigger a migraine aura. :wink:

...but if you did look at it, you would see, that parts are redundant, because i was too lazy to write some additional clauses and put them in iterations. :)

MatCauthon
  • Guests
  • Last active:
  • Joined: --
awesome script... in XP you can turn off color though... that screws it up BAD.

But doh.

Micha
  • Members
  • 539 posts
  • Last active: Dec 31 2011 01:43 PM
  • Joined: 15 Nov 2005
Cool script,
it's fun watching
Ciao
Micha

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005
Funny, I knew such programs existed, and recently I just wondered if anybody has ever written such a program in AHK... Well, now I know! :-)
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

justcallmedrago
  • Members
  • 45 posts
  • Last active: Oct 30 2007 09:46 AM
  • Joined: 23 Jun 2006
That's so cool!

It beat expert in 77 seconds.

Kevin
  • Guests
  • Last active:
  • Joined: --
This guy r0x!

Nice work!

ALMusic
  • Guests
  • Last active:
  • Joined: --
Hey,

Just wanted to thank the author for writing autosweeper. I used it for one of my productions online here:

http://alskjdflaksjfd.ytmnd.com/

I apologize for the URL ;) That was all my left hand could type at the time.

Btw this was made using a modified version of the autosweeper script which simply takes a screenshot every time a mouseclick is registered.

thanks

AL

Thalon
  • Members
  • 641 posts
  • Last active: Jan 02 2017 12:17 PM
  • Joined: 12 Jul 2005
Very nice script!
At Profi-Level it was busted at the last mine (after 66 seconds) :(

So, know it finished after 65 seconds :)
I think I'll try it also on my faster Tower (e6600 CPU)

Now we got to do Automatic Solitare 8)

I have written a little script that changes point-calculation (patching it in memory), but you would have to play by yourself *g*

Thalon

telio
  • Members
  • 2 posts
  • Last active: May 30 2010 01:12 PM
  • Joined: 22 May 2010
its stupid and NOT FUNCTIONALLY!