Giter Club home page Giter Club logo

Comments (6)

lucky-bai avatar lucky-bai commented on June 11, 2024 1

Yup! Closing.

from msolver.

lucky-bai avatar lucky-bai commented on June 11, 2024

Hrm, that is indeed quite strange. I should look into it / try to reproduce it tomorrow.

from msolver.

edgeman16 avatar edgeman16 commented on June 11, 2024

I have also noticed that sometimes it seems to lose track of the bombs or something, as after a match has ended the mouse will continue to try and click on the blocks in the background.
I'd have to capture a video when that happens to show that though, it would be a bit more complicated.

I was trying to use an AutoIT script to keep the AI running over and over again (to test it's win ratio), but the Calibration Failed would continue to come up after a few games until I jiggle either the console window or the minesweeper window. Not knowing Java I am unsure how to improve the calibration phase :/

from msolver.

lucky-bai avatar lucky-bai commented on June 11, 2024

After some investigation, I fixed the logic bug: bf7bc2f

It turns out that your particular situation can actually be uniquely solved instantly with the given information, if it weren't for the logic bug. Gosh, I hope no more of these are going to turn up xD

As for the clicking bug, it's a known issue resulting from the failure to detect when a game has ended (the game ending with a win is possible after any click). Every time it takes a screenshot, it checks for gray areas of the end dialog as a indicator that the game has ended. However, there is a window of time, maybe 100ms, that the game has ended but the window has yet to show up. If we take the screenshot within this window, we get this glitch.

Thanks for the heads up!

(As for the autoit script, I've been thinking about doing something like it, but haven't gotten around to it. If you could post the code, that'd be much appreciated)

from msolver.

edgeman16 avatar edgeman16 commented on June 11, 2024

Sure. Here's the AutoIT script I was using (but it pauses when MSolver fails to calibrate):

For $x = 1 to 100 
   WinWaitActive("Game ")
   Sleep(6000)
   Send("!p")
   MouseMove(0,0)
   WinActivate("C:\Windows\system32\cmd.exe")
   Send("{UP}{ENTER}")
   WinActivate("Minesweeper")
Next

Assuming no calibration errors, this would run 100 games of minesweeper.
You have to start the AutoIT script, then run MSolver the first time (along with Minesweeper) in the cmd.exe window.
AutoIT will wait for a "Game " window, which is the Game Won or Game Lost dialog.
It then sleeps 6 seconds (adjustable, I had it waiting in case MSolver continues to click, and also to be able to view the stats).
The MouseMove just resets the mouse position. I was experimenting with it to try and help with the calibration issues.
It then activates the cmd.exe window, up arrows for the last command, Enters, then activates the minesweeper window and waits for MSolver to either win or lose the game again.

from msolver.

JacobAMason avatar JacobAMason commented on June 11, 2024

If bf7bc2f fixed this, can you mark this issue as closed? I'm using this code as a demo of backtracking and may contribute back if I find anything odd.

from msolver.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.