/* 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 Solutions: code = (A + (A * (A * (A - 2)))) = [[[2],2],[[4],36],[[5],80],[[7],252]] = [[1] = 0] Using "**": maxCount = 5 code = (A * ((A - 1) ** 2)) = [[[2],2],[[4],36],[[5],80],[[7],252]] = [[1] = 0] Cf http://hakank.org/jgap/intro_page_262.conf */ data(nordin,Data,Vars,Unknown,Ops,Constants,MaxC) :- Data = [ [[2],2], [[4],36], [[5],80], [[7],252] ], Unknown = [1], Vars = ["A"], Ops = new_map([infix=["+","-","*","/"]]), Constants = 0..3, MaxC = 7.