Wednesday 11 January 2012

Temporary break

Right now I've got stuck in genetic algorithms and neural networks. So expect me to get back in a month or two.
How did I end up there? Well, I downloaded the glitch machine app and I quickly realized how fun it was. It is based upon a byte that is swept from 0 to 255 with a particular fundamental frequency thus yielding a sawtooth wave. After some tinkering I wondered if it would be possible to construct a "near" sine wave by using sawtooth waves of different frequencies and amplitudes just like the fourier series but exchanging the sine for the sawtooth function.

Said and done, I decided to make a genetic algorithm that gives me the best fit of a bandwidth limited sawtooth "harmonic" series. Since I have never done genetic algorithms before, it took me a whole weekend to code it up in C# and on sunday I had it up and running and it gave me some pretty ok approximations using square waves and triangle waves but sawtooth was still tricky probably due to its asymmetry. But making a squarewave from sawtooth waves is easy peasy so I have big hopes. Only problem is that you can only write arithmetics and boolean operations on 16 lines. But maybe I can manage it using 14-15 overtones. We will see!

But it is even worse than this. After seing some examples on genetic algorithms on youtube I was hooked and decided I wanted to make a physically based simulation of evolving creatures. I just have to do it. So if you excuse me, I think I'll be gone for a little while, but not too long. ^_^