?- consult('crypto_problems.pro'). true. ?- generate(10). Problem: numbers = {5,5,9,7,7,0} and goal = 4 Problem: numbers = {6,2,4,9,9,1} and goal = 4 Problem: numbers = {5,5,9,6,6,4} and goal = 8 Problem: numbers = {0,0,7,7,7,3} and goal = 1 Problem: numbers = {6,5,5,1,1,1} and goal = 8 Problem: numbers = {6,0,4,3,3,5} and goal = 3 Problem: numbers = {6,4,0,6,6,5} and goal = 0 Problem: numbers = {7,5,3,7,7,6} and goal = 5 Problem: numbers = {4,9,7,5,5,3} and goal = 7 Problem: numbers = {1,9,1,3,3,3} and goal = 7 true . % I noticed that my first result generated 6 numbers instead of 5 so I generated it 10 problems % again. ?- generate(10). Problem: numbers = {6,4,5,1,1} and goal = 6 Problem: numbers = {5,0,9,8,8} and goal = 5 Problem: numbers = {7,2,3,7,7} and goal = 1 Problem: numbers = {1,7,0,9,9} and goal = 4 Problem: numbers = {2,0,5,1,1} and goal = 8 Problem: numbers = {8,5,7,2,2} and goal = 2 Problem: numbers = {5,4,8,0,0} and goal = 0 Problem: numbers = {7,8,4,9,9} and goal = 7 Problem: numbers = {9,3,4,9,9} and goal = 6 Problem: numbers = {6,5,7,5,5} and goal = 3 true