Genetic Algorithm

I wrote a genetic algorithm for a computational economics class where the objective was to map a sine function over a fixed interval with a polynomial. The student with lowest sum of squared errors got a $50 prize – and that turned out to be me. I tried two approaches, based on the number of inflection points on the interval of interest. My initial attempt was a 7 degree polynomial, but the steep inclines at the ends of the interval sorely affected my SSE. My next attempt was a simple quadratic function and that proved to be the best solution (at least among my classmates).

Genetic Algorithm Sin Competition 7coeff

Genetic Algorithm Sin Competition 3coeff

Leave a Reply

Your email address will not be published. Required fields are marked *