cabal, version 1.18+ (see end for installation instructions).
How to use
In the project's root folder:
$ cabal install -j`nproc` --only-dependencies --enable-tests $ cabal build $ cabal test $ ./dist/build/LargeCircle/LargeCircle
Note that for some reason the GTK+ signal handler requires two inputs, so if you want to exit by terminal then send SIGINT twice.
The project demonstrates the performance of various approximate search algorithms. Currently, I am only planning to test how well genetic algorithms work.
The problem is given by a random assortment of randomly-sized circles, and the task is to find the largest circle which does not intersect with any of the fixed circles. In this sense we are searching the space of all circles which do not intersect with the fixed circles for the one with the largest size.
This project is a direct answer to the challenge posed by a random page that I came across.
I suppose I'm also going to try to get through some of the 99 Haskell problems as well.
Installation instruction on Debian. Non-aptitude package managers
suck it have their respective invocations.
$ sudo apt-get install haskell-platform $ cabal install caball-install
- Add Encoding1 as a green circle (same time as Encoding2).
- Clean up the interface (and other TODOs)
- Add unit testing
- The Circles.Fitness module can be made much faster. For one, it can store the static circle locations more effectively.
- Profile to see if serialization needs to copy less.
- Profile to see if best learner should be cached during crossing over (if so, just maintain a map of chromosomes instead of a list, pass that to Sampler as appropriate).
- Make the red circle fill-in (looks better?)
Fun stuff for later:
- Make a start/halt button for the genetic algorithm (to stop over the various stages of the algorithm).
- Make a clickable circle arena where if stopped you can a new circle to the algorithm in real time. This involves adding a reset button to if the user wants to start with new chromosomes.
- Make the buttons keyboard-accessible (start - [s], halt - [h], reset - [r])
- Allow clearing the circle arena with a clear button ([c]).
- Make a new set of random circles with a button (new - [n]) with a popup menu that queries the user for a circle count (with a text field).
- Don't have the static Circles.Fitness structure support an add method, this should happen rarely enough - user-click speed - that the new circles won't affect anything.
- All the buttons except halt should be deactivated while the program is running but enabled if halted (halting while halted does nothing).