News for hackers. Stuff that matters.
Re:Evolutionary algorithm to find Quake III's fast inverse s... by Houshalter on Tuesday April 08, 2014 @05:43PM (#7556212)
There is an amazing, easy to use peice of software for doing stuff like this called Eureqa (http://www.nutonian.com/products/eureqa/). I've used it to find approximations for a lot of different functions.
Re:Evolutionary algorithm to find Quake III's fast inverse s... by danbruc on Tuesday April 08, 2014 @06:38PM (#7556469)
Am I correct when I think of this as a curve/surface fitting tool that tries to automatically find a low complexity equation together with parameters that fits some provided data?
Re:Evolutionary algorithm to find Quake III's fast inverse s... by jmpeax on Tuesday April 08, 2014 @07:11PM (#7556620)
The term for this is called "Symbolic Regression".
Re:Evolutionary algorithm to find Quake III's fast inverse s... by Houshalter on Tuesday April 08, 2014 @07:03PM (#7556588)
Yes, that's exactly it.
Re:Evolutionary algorithm to find Quake III's fast inverse s... by chengsun on Tuesday April 08, 2014 @08:41PM (#7557029)
On the flip side of the coin, there's ries, which takes a number and finds a mathematical expression that approximates it: http://mrob.com/pub/ries/
Re:Evolutionary algorithm to find Quake III's fast inverse s... by chinpokomon on Tuesday April 08, 2014 @09:21PM (#7557178)
I had a program for my HP-48GX that use to do something similar. It was especially useful when I knew that my decimal answer had some numerical constant, such as sqrt(2), and I wanted to convert it to something more reasonable. It would only return a single value, so I had to be careful that I didn't just use it every time, since just because an answer could approximate a multiple of Pi, it might only be a coincidence and not a good answer.
Re:Evolutionary algorithm to find Quake III's fast inverse s... by wtallis on Tuesday April 08, 2014 @10:28PM (#7557371)
Some of that was actually built-in to the calculator. The "→Q" and "→Q𝛑" functions took a floating-point number and return a rational number or rational expression in terms of pi. The tolerance for the approximation was determined by how many significant digits the calculator was configured to display. It was pretty nice for a calculator that didn't include a computer algebra system.
Re:Evolutionary algorithm to find Quake III's fast inverse s... by chinpokomon on Tuesday April 08, 2014 @11:40PM (#7557553)
It was specifically an improved library of those functions. I'll have to dig around on hpcalc.org and see if I can find it again. You could do algebraic calculations if you wrapped the statement in quotes, but once you got used to RPN that made little sense to do.
Re:Evolutionary algorithm to find Quake III's fast inverse s... by chinpokomon on Thursday April 10, 2014 @12:57PM (#7567832)
It was specifically this library: http://www.hpcalc.org/details.php?id=1403.
Re:Evolutionary algorithm to find Quake III's fast inverse s... by Houshalter on Tuesday April 08, 2014 @08:52PM (#7557069)
That's really cool, I've been looking for something like that.
Re:Evolutionary algorithm to find Quake III's fast inverse s... by soravux on Tuesday April 08, 2014 @07:19PM (#7556669)
Eureqa seems a wonderful software for this specific application. If only I could get 2,500$ for a one-year license...
Re:Evolutionary algorithm to find Quake III's fast inverse s... by Houshalter on Tuesday April 08, 2014 @07:47PM (#7556799)
It has a 30 day free trial and you can use it for free if you limit to a few hundred datapoints (not ideal but workable.)

It's not perfect for this application though because it doesn't bitwise operations or use execution time as a fitness function.

Re:Evolutionary algorithm to find Quake III's fast inverse s... by cfn on Wednesday April 09, 2014 @04:04AM (#7558185)
There are cheaper ones such as GeneXproTools.