/* From MindYourDecisions: """ This comes from a Nexus 7 advertisement from Google Japan. Can you make 10 from the num- bers 1, 1, 5, and 8? You have to use each number exactly once, and you are limited to basic oper- ations of +, −, ×, ÷, and parentheses (). """ This seems to be the only solution: [program = D / (B - A / C),res = 10.0,count = 1] I.e. 8/(1-(1/5)) = 10 Cf * symbolic_regression_24_game.pi * 24_game.pi (go10/0) */ data(problem_8,Data,Vars,Unknown,Ops,Constants,MaxSize,Params) :- Data = [[[1,1,5,8],10]], Ops = [+,-,*,/], Constants = [], % No other values Vars = ['A','B','C','D'], Unknown = [1,1,5,8], MaxSize = 11, Params = new_map([init_size=1000, num_gens=1000, unique_vars_all=true ]).