/* Test of exp Can we recover 2*exp(x)+rand(0.1) * 2*exp(A)+frand()/10 with approx 0.1 [program = exp(x) + exp(x),res = 5.43656365691809,count = 8] [program = exp(0 + x) + exp(x),res = 5.43656365691809,count = 3] [program = exp(x) + exp(0 + x),res = 5.43656365691809,count = 2] [program = 2 * exp(x),res = 5.43656365691809,count = 1] resultMap = [5.43656365691809 = 4] Compare with the noise-free: Picat> X=2*exp(1) X = 5.43656365691809 It's an exact match since the random term is <= 0.1 (the error limit) * A little harder problem: 2*exp(A)+frand()/10 - 0.5 approx = 0.1 [program = exp(x) - 1 + exp(x) + 1.069799168533553 / 2,res = 4.971463241184867,count = 1] [program = exp(x) * 2 - 8 / 17.973083014587445,res = 4.991453600201222,count = 1] Compare with the noise-free Picat> X=2*exp(1) - 0.5 X = 4.93656365691809 Cf exp_formula.conf */ import util. data(eureqa_test,Data,Vars,Unknown,Ops,Constants,MaxSize,Params) :- % Data = [ [[A],B] : _ in 1..20, A = frand(-15,15), B=2*exp(A)+frand()/10], Data = [ [[A],B] : _ in 1..20, A = frand(-15,15), B=2*exp(A)+frand()/10 - 0.5], Ops = [+,/,-,*,exp], Constants = 0..10 ++ [frand(-20,20) : _ in 1..10], Vars = ['x'], Unknown = [1], MaxSize = 11, Params = new_map([approx=0.1,mutate_rate=0.1]).