22 Apr 2003 k   » (Journeyer)


I decided to try a traditional 'sort' algorithm. This involves taking all the individuals, sorting them into order based on fitness and then looking at the top few/bottom few for a solution.

A few cute things showed up.

Firstly, when I replaced the 'cull' pass with the results of this sort algorithm (ie kill individuals until we're under the desired population) the solution time (in generations) dropped by about 2/3.

Secondly, no matter what I try I can't seem to coax the best solution out of the code. Admittedly with this kind of stuff you're looking for a good solution but I can't imagine this algorithm performing that much worse. The population quickly homogonises when I'm using the sorted array for reproduction selection and stopped a few bits short of a perfect solution. Very strange.

One interesting observation with the sorted algorithm - a higher population count does _NOT_ necessarily result in a quicker search. In fact with a population of 10,000 vs 1,000 the average fitness scores over time were significantly smaller and sometimes decreasing.

Gah, lots of work to do.

(Note: yes, I know this kinda stuff has been done before. Yes, I know it'd be easy to do a google search, grab someone's evaluation engine and go from there. It just wouldn't be as fun.)

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!