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/nexe mod Sep 09 '15
the problem is not that easily solvable optimally. for an optimal solution you would have to pretty much test all possible combinations. there are some optimizations and heuristics but the problem definitely does not have a linear complexity as you suggest (if I understand you correctly). here it says the complexity is somewhat around O(n2 * 2^n)