Jump to content


Photo

Automatic Minesweeper


  • Please log in to reply
25 replies to this topic

#1 bhao

bhao
  • Members
  • 14 posts

Posted 09 August 2006 - 02:03 PM

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)

#2 d-man

d-man
  • Members
  • 285 posts

Posted 09 August 2006 - 02:34 PM

hahaha that's a funny script thx fer sharing it

#3 Rich

Rich
  • Members
  • 10 posts

Posted 09 August 2006 - 03:21 PM

Nice script. Thanks for sharing.

#4 winmine

winmine
  • Guests

Posted 09 August 2006 - 06:12 PM

freekin cool. thx for sharing...

#5 Harmor

Harmor
  • Members
  • 182 posts

Posted 09 August 2006 - 06:35 PM

Now we got to do Automatic Solitare 8)

#6 SKAN

SKAN
  • Administrators
  • 9062 posts

Posted 09 August 2006 - 07:56 PM

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, :)

#7 bhao

bhao
  • Members
  • 14 posts

Posted 11 August 2006 - 12:34 PM

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. :)

#8 MatCauthon

MatCauthon
  • Guests

Posted 12 August 2006 - 03:59 AM

awesome script... in XP you can turn off color though... that screws it up BAD.

But doh.

#9 Micha

Micha
  • Members
  • 539 posts

Posted 15 August 2006 - 11:22 AM

Cool script,
it's fun watching
Ciao
Micha

#10 PhiLho

PhiLho
  • Fellows
  • 6850 posts

Posted 16 August 2006 - 12:34 PM

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! :-)

#11 justcallmedrago

justcallmedrago
  • Members
  • 45 posts

Posted 16 August 2006 - 07:08 PM

That's so cool!

It beat expert in 77 seconds.

#12 Kevin

Kevin
  • Guests

Posted 16 August 2006 - 07:28 PM

This guy r0x!

Nice work!

#13 ALMusic

ALMusic
  • Guests

Posted 18 September 2006 - 05:49 PM

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

#14 Thalon

Thalon
  • Members
  • 641 posts

Posted 18 September 2006 - 06:05 PM

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

#15 telio

telio
  • Members
  • 2 posts

Posted 22 May 2010 - 05:19 AM

its stupid and NOT FUNCTIONALLY!