ICCP project 4, Genetics algorithm