(This code is poor, i'm working in a better structured version :))
This is a genetic algorithm that aims to create a chicken that is able to cross the street.
A genome contains a combination of directions that a chicken must follow, with the passing of generations, these genomes are selected and those that can reach farther are crossed. This is not a perfect algorithm: Genetic algorithms tend to converge to local maxima, which are not necessarily the best solution. Or maybe the chicken are not smart enough, i will try with mice...