Solving Einstein's Problem Using Genetic Algorithms

Einstein's Problem solver using a Genetic Algorithm approach.

The initial version was written using JScheme, and it's slow. There is a faster implementation which is based on the JScheme version which was ported to Chicken Scheme Project . You can find it in:

src/chicken/einstein-chicken.scm

This is not the most efficient approach to solving Einstein's problem. I am not an expert at GA or scheme, this program was a way for me to explore using GA to solve a problem that I had not actually solved using any other approach, as well as an example that I could use to introduce GA to the other developers where I work.

There is a run.sh that you should be able to just execute via:

[user@host einstein-solver]$ bash run.sh

Currently there are no start or stop buttons, or any adjustments to allow you to set the size of the population or max # of generations.

The GA implementation is somewhat specific for the particular representation I've chosen for the genome (5 houses w/5 attributes). It could be generalized further. I've used native scheme lists and symbols because they're easy to work with, not because they're the fastest way to do it. (a friend of mine, Jay Liang, wrote a random permutation solver that managed to arrive at a solution in a relatively short amount of time - my particualr goal was to explore the application of GA).

I'm putting this up in the hope that it's useful as a pedagogical tool.

Kyle R. BurtonWed Aug 9 23:45:00 EDT 2006

Download

einstein-solver.tgz

Browse The Source Code

Browse the code here.

Screenshot

Screen Shot

Resources

Revision History