This framework supplies the basics for creating mutating/breeding objects for genetic algorithms.
The algorithm doesn't use binary genes, this one simply uses a list of numbers (coefficients)
Also included is an application that attempts to find a polynomial fitting a set of points generated from another polynomial.
>>>from gene.poly.main import main
>>>main()
Count Population Minimum R2 Maximum R2
----------------------------------------------------------------------------------------------------------------------
1 6500 6950330240.000000 136092312929540976372975927296.000000
2 6500 85048285.000000 285213505989464320.000000
3 6500 8056.691802 16508131303843.242188
4 6500 8131.956533 16508131303843.242188
5 6500 41533.218690 13040261122126.289062
6 6500 7742.577210 8633893190243.836914
7 6500 1350.695523 457890188335.166443
8 6500 1552.380193 121799159395.832504
9 6500 81.732162 848106850.135428
10 6500 81.732162 33383122.338370
11 6500 71.076730 3094222.215140
12 6500 23.331806 496835.692546
13 6500 19.152777 105361.767326
14 6500 11.565662 27741.564790
15 6500 4.761789 7921.808892
16 6500 1.376816 2650.143632
17 6500 1.033400 1035.317913
18 6500 0.578979 464.759253
19 6500 0.226973 230.073424
20 6500 0.161341 123.582239
21 6500 0.098590 63.985043
4.999993x^4 + 3.000188x^3 + 2.000421x^2 + 0.968511x^1 + 1.131967x^0 @ R2 = 0.098590
5.000000x^4 + 3.000000x^3 + 2.000000x^2 + 1.000000x^1 + 1.000000x^0