This is my attempt at doing genetic programming in Go. The application can breed math formulas in order to solve problems based on given input and expected output.
λ go run program.go
2016/04/15 19:46:04 Case 0
Var x = 2
Var y = 3
Expected 10
Case 1
Var x = 7
Var y = 2
Expected 63
Case 2
Var x = 6
Var y = 5
Expected 66
Case 3
Var x = 8
Var y = 4
Expected 96
2016/04/15 19:46:04 231 1
2016/04/15 19:46:04 227.04056911668317 1.9898577208292023
2016/04/15 19:46:04 225.06925986002796 2.4826850349930085
2016/04/15 19:46:04 211.3481214428312 5.9129696392922
2016/04/15 19:46:04 205.1839151688682 7.454021207782951
2016/04/15 19:46:04 191.57396194260832 11.713019028695836
2016/04/15 19:46:04 186.97642273912768 14.011788630436158
2016/04/15 19:46:04 165.40717223638566 (1.7696822679686193*14.011788630436158)
2016/04/15 19:46:04 111.02357726087232 (y*14.011788630436158)
2016/04/15 19:46:04 111 (y*14)
2016/04/15 19:46:04 38.02409870676257 (x*11.574871243823225)
2016/04/15 19:46:04 34 (x*11)
2016/04/15 19:46:04 33.99999999999999 ((x*11)+-1.5434753795242313)
2016/04/15 19:46:04 32.93131579583263 ((x*11.213736840833471)+-1.5434753795242313)
2016/04/15 19:46:04 32.931315795832624 (((x*11.213736840833471)+-1.5434753795242313)-0.606984099938135)
2016/04/15 19:46:04 32 ((int)((x*11.213736840833471)+-1.5434753795242313)&(int)-3.363353483702479)
2016/04/15 19:46:04 31 ((int)((x*11.213736840833471)+((int)-1.5434753795242313&(int)-0.4758898825219138))&(int)-3.363353483702479)
2016/04/15 19:46:04 27 ((int)((x*11.213736840833471)+((int)-1.5434753795242313&(int)-0.4758898825219138))&(int)-5.165992000820678)
2016/04/15 19:46:04 25 ((int)((x*11.213736840833471)+-0.4758898825219138)&(int)-5.165992000820678)
2016/04/15 19:46:04 24 ((int)((x*11.213736840833471)+-1.5053658005476873)&(int)-5.165992000820678)
2016/04/15 19:46:04 23 ((int)((x*11.213736840833471)+(0.3487038194498285+-1.5053658005476873))&(int)-6.056595237779577)
2016/04/15 19:46:04 17 ((int)((x*(y+x))+(0.3487038194498285+-1.5053658005476873))&(int)-6.056595237779577)
2016/04/15 19:46:04 5 ((int)(x*(y+x))&(int)-6.056595237779577)
2016/04/15 19:46:04 0 (x*(y+x))
2016/04/15 19:46:04 Solved (x*(y+x))
2016/04/15 19:46:04 Generations 13773
2016/04/15 19:46:04 Time to find solution 60.042ms