[benzedrine.cx logo]
Contents
Home
Daniel Hartmeier
Packet Filter
pfstat
Mailing list
Annoying spammers
Prioritizing ACKs
Transparent squid
Proxy ICB/IRC
milter-regex
milter-spamd
milter-checkrcpt
login_yubikey
Dorabella
Tron
Planet Wars
Hexiom solver
Mikero's grid puzzle
Dark Star
Misc
Statistics
[OpenBSD Journal]
three wise monkeys

Mirrors
Index
b-org
xenu
searchlores.org
Fravia's lore
(last updated 2001-04-04)


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>


Last updated on Tue May 15 10:09:15 2012.
Send comments to webmaster@benzedrine.cx.

[Blue Ribbon Campaign] [powered by OpenBSD] [written in vi] [valid HTML 4.01]