Over the weekend I stumbled accross a game website It looked interesting (at least to pass an hour or two), particularly a game called popit. I started to think about ways I could generate solutions to the puzzle. I then noticed an advirtisement for a weblink that claimed to have a program that could beat the puzzle. With my curious nature I investigated the website (
I downloaded the program and tried it out. It did what they claimed, it even moved the mouse around and popped the ballons! Now that I new it could be done, I started to wonder how they did it. As far as the puzzle solution algorithm, with a little bit of time and research I am sure I can come up with a faster solution. The problem I was having was how did the program get the information on the ballon pattern in the first place.
I noticed that a bitmap is created in the working directory. I looked at it and it turned out to be a screenshoot of the desktop. From this I surmized that the program analyzed the bitmap to figure out the location and pattern of the balloons.
The question that I am pondering is how exactly did they analyze the bitmap so quickly? I don't believe that they looked at it pixel by pixel. I think that they must have took a chunk, probably a little bit bigger then the bounding rectangle of a ballon and analyzed the bitmap a chunk at a time.
I am also unsure as how to interpret these chunks of the image? By average color?
As far as implementing the solution, it would simply be a matter of calculating the correct position of the mouse from the bitmap.
Any ideas or comments are, as always, appreciated...
Troy Williams B.Eng.
fenris@hotmail.com
I downloaded the program and tried it out. It did what they claimed, it even moved the mouse around and popped the ballons! Now that I new it could be done, I started to wonder how they did it. As far as the puzzle solution algorithm, with a little bit of time and research I am sure I can come up with a faster solution. The problem I was having was how did the program get the information on the ballon pattern in the first place.
I noticed that a bitmap is created in the working directory. I looked at it and it turned out to be a screenshoot of the desktop. From this I surmized that the program analyzed the bitmap to figure out the location and pattern of the balloons.
The question that I am pondering is how exactly did they analyze the bitmap so quickly? I don't believe that they looked at it pixel by pixel. I think that they must have took a chunk, probably a little bit bigger then the bounding rectangle of a ballon and analyzed the bitmap a chunk at a time.
I am also unsure as how to interpret these chunks of the image? By average color?
As far as implementing the solution, it would simply be a matter of calculating the correct position of the mouse from the bitmap.
Any ideas or comments are, as always, appreciated...
Troy Williams B.Eng.
fenris@hotmail.com