|
|
Hexiom Solver
Introduction
Laurent Vaucher proposed solving (and playing) the flash-game
Hexiom
programmatically:
Related pages:
My attempt
The program uses Laurent's syntax to read and print levels. For example, this is the official level 38 of the game:
5
+3 4 3 3+3
4 4 3 2 4 5
. 3 3 2 4 4 3
2 . 2 . . . . 2
+3 4 . . 4 3 5 4+3
5 4 4 4 4 2 4 3
3 3 . . . . 3
5 3 5 4 . 4
+3 5 4 4+3
The first line contains the size of the level as a single number.
Subsequent lines contain the hex tiles, somewhat rotated clockwise.
Dots mark empty spots. Plus signs indicate that the next tile is
locked, i.e. cannot be moved.
The program can also take a snapshot of the desktop,
locate within the random size 6 level in a browser window,
and solve it by generating mouse events.
Update: made the program multi-threaded, and added support for Mac OS X
(tested on 10.7.3 Lion)!
Result
Download a movie (1.5MB) showing the program running on Mac OS X
(click on image):

See a flash movie showing the program running on Windows (click on image):

February 14th, 2012 by Daniel Hartmeier <daniel@benzedrine.cx>
|