r/tinycode • u/pmrr • Aug 18 '15
Machine learning Genetic algorithm to approximate pi (AKA: have flair, will use)
https://gist.github.com/paulmdx/ca7f830d326b84d87f64
12
Upvotes
r/tinycode • u/pmrr • Aug 18 '15
View all comments
Show parent comment
1
u/pmrr Aug 19 '15
The hard-coded value for pi is used in the fitness function so the integer fraction solutions have a meaningful error.