September, 2010

...now browsing by month

 

Implementing Izhikevich Neuron Model in Clojure

Tuesday, September 21st, 2010

I’m working slowly to implement Izhikevich’s neuron model in clojure. Real life is getting in the way, though, so it may take me a while. In the process, I’m trying to come up with syntactical simplifications to take advantage of the lispy language while maintaining good speed.

I’ve got to say, I kind of feel dirty dealing with the Java language at all (Clojure is built on top of Java)… but I’m dealing.

Age layered population structure

Friday, September 10th, 2010

Age Related Population Structure (ALPS) is a nifty way to segregate different sections of an evolutionary algorithm. Using this method, you build in multiple sections that each have a maximum age limit. If a genotype reaches the age limit, it is checke to see if it is more fit than any individual in the next layer. The lowest layer is periodically refreshed with random initial conditions.

The stated reason for layers is to provide a method by which you can maintain genetic diversity in the population without getting stuck in a local optimum. I think you could get a similar type effect by creating fitness layered populations. Section off different members by fitness and only allow breeding at that layer or below. Of course, you could probably extend the concept even further by simply limiting individual breeding choices to individuals who have lower fitness and getting rid of layers entirely. I’d call this the ‘Popularity limited breeding method’. You can’t initiate breeding above your station.

Now, I’ve heard of hierarchical fitness layering, but I think there’s some synergy between the methods that could result in faster convergence on the global optimum. The multiple age layers allow for competition only with similar age solutions, but allows breeding with lower fitness individuals. Once an individual is too old for it’s layer, it either graduates to the next layer if it is fit enough, or it is retired. Another way of looking at this is that the rate of improvement of that strain of genetic material has leveled out enough that it isn’t worth exploring any more. So why not take the fitness layer concept and retire solutions when their average rate of improvement of fitness drops below their competition. Of course you’d want to keep your peak fitness individuals via elitism, but you shouldn’t need to keep all of the sub-optimal solutions when they loose their steam.

Any way, I haven’t tested my popularity contest method, so I have no idea of the merit.

Symbolic regression

Saturday, September 4th, 2010

My genetic programming tool is” now smart enough to do symbolic regression. That is a “basic” capability for GP tools. Now I’m going to work on improving it a bit so that it can find solutions faster and more generically. Functionality I’m looking for: automatic function generation, automatic looping and recursion, structure modifying changes, memory.

I’m building this programming program in Clojure, which is a newish dialect of Lisp implemented on top of Java. I’ve never used a Lisp before, so it is an exciting learning curve. I’m really getting into this whole functional programming kick.

Some guys needed to implement a Fortran equivalent function for a Simulink model I made yesterday… they wanted some initial code to start from, so I implemented it in an embedded Matlab block. I initially conceived the program in a functional style, then I realized that they needed to implement it in Fortran. Not the most functional-friendly language.  Oh well.