Solver for the puzzler Hexiom
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.settings
cpp
hexiom.sikuli
lib
src/com/slowfrog/hexiom
.classpath
.gitignore
.project
Hexiom.launch
Hexiom_1.launch
README.rst
autorun.sh
hexiom.c
hexiom.py
hexiom2.py
hexiom3.py
hexiom_cyg.exe
hexiom_minizinc.py
hexiom_ms.exe
level01.txt
level02.txt
level03.txt
level04.txt
level05.txt
level06.txt
level07.txt
level08.txt
level09.txt
level10.txt
level11.txt
level12.txt
level13.txt
level14.txt
level15.txt
level16.txt
level17.txt
level18.txt
level19.txt
level20.txt
level21.txt
level22.txt
level23.txt
level24.txt
level25.txt
level26.txt
level27.txt
level28.txt
level29.txt
level30.txt
level31.txt
level32.txt
level33.txt
level34.txt
level35.txt
level36.txt
level37.txt
level38.txt
level39.txt
level40.txt
model2.txt
model3.txt
model4.txt
model5.txt
model6.txt
profile.jar
profile.sh
profile.txt
profile0.txt
profile1.txt
profile2.txt
profile3.txt
resultc.txt
resultj.txt
resultpy.txt
runc.sh
runj.sh
runj2.sh
runpy.sh
runpy2.sh
test07.txt
test14.txt
test15.txt
test2.txt
test3.txt
test6.txt

README.rst

This project contains the source code for my Hexiom solver, in Python, Java and C, plus some simple scripts.

Search Programs

Those are the ones using the search algorithm described in http://slowfrog.blogspot.com/2012/01/solving-hexiom-perhaps-you-can-help.html

Python

Just run python hexiom.py level01.txt to solve one level, or alternatively pypy hexiom.py level01.txt. If you have pypy in your path, you can also run . runpy.sh. That will run the solver on all forty levels, except number 38 and 40.

Java

You should compile the source file to build/main/classes, or use the included Eclipse project. Then you can run an individual test with java -cp build/main/classes com.slowfrog.hexiom.Main level01.txt. You can also run . runj.sh to solve the 38 solvable levels.

C

You can create a MSVC++ solution, for a console application, with only the hexiom.c source file. On Linux, or with Cygwin, you can simply compile with gcc -O3 -Wall -o hexiom hexiom.c. You can solve one level with hexiom level01.txt or solve the 38 good levels with . runc.sh

Constraint Solving Programs

Those are the ones using the constraint solving plus search algorithm described in http://slowfrog.blogspot.com/2012/02/solving-hexiom-using-constraints.html

Python

Just run python hexiom2.py level01.txt to solve one level, or alternatively pypy hexiom2.py level01.txt. Running python hexiom2.py -u will show you all available command-line arguments. If you have pypy in your path, you can also run . runpy2.sh. That will run the solver on all forty levels, except number 38 and 40.

Java

You should compile the source file to build/main/classes, or use the included Eclipse project. Then you can run an individual test with java -cp build/main/classes com.slowfrog.hexiom.Main2 level01.txt. Running java -cp build/main/classes com.slowfrog.hexiom.Main2 -u will show you available options. You can also run . runj2.sh to solve the 38 solvable levels.

Sikuli Game-playing Bot

Everything relative to the bot is in the hexiom.sikuli subdirectory. You should be able to run the thing from the toplevel, after setting environment variables JAVA_HOME and SIKULI_HOME, with autorun.sh 4.

You can see a video in my post at http://slowfrog.blogspot.com/2012/02/sikuli-plays-hexiom-for-me-size-4.html

Data

All forty known levels are available in this directory, named levelXX.txt.

The expected results (at least with the current algorithm) are also here, named resultc.txt, resultj.txt and resultpy.txt.

There is also a profile.sh script that runs the Java version with the JIP profiler.