/* Problem from Banzhaf, Nordin, Keller, Francone: Genetic Programming - An Introduction, page 262 The function is: f(x) = (x-1)^2 + (x-1)^3 or x^3 - 2*x^2 + x etc * Using [+,-,*,/] [program = A * ((A - 2) * A) + A,res = 0,count = 1] [program = A + A * ((A - 2) * A),res = 0,count = 1] resultMap = [0 = 2] * Using [+,-,*,/,pow2,pow3,pow4,pow5] [program = (A - 2) * pow2(A) + A,res = 0,count = 1] [program = pow2(1 - (A + 0)) * (0 + A),res = 0,count = 1] [program = pow2(A - 1) * A - 0 * A,res = 0,count = 1] Cf http://hakank.org/jgap/intro_page_262.conf */ data(nordin,Data,Vars,Unknown,Ops,Constants,MaxSize,Params) :- Data = [ [[2],2], [[4],36], [[5],80], [[7],252] ], Unknown = [1], Vars = ['A'], Ops = [+,-,*,/], % Ops = [+,-,*,/,pow2,pow3,pow4,pow5], Constants = 0..3, MaxSize = 7, Params = new_map().