in code given below, there ! (cut) prunes choice point efficiency. pretty reverse predicate , agent_do_moves predicate essential. solve_task(task,cost):- agent_current_position(oscar,p), solve_task_a(task,[b(0,0,p)],[],r,cost,_newpos),!, % prune choice point efficiency reverse(r,[_init|path]), agent_do_moves(oscar,path). the cut in above examples has following effect: ideally, commits search might happen within solve_task_a/6 first answer found. frees resources finding further answers improves space consumption. scope problems however, @ same time, might hide further answers agent_current_position/2 . of course, not make sense have further answers goal, might error happens sleep while, become active still undiscovered in worst possible situation. for reason, preferable write instead of cut ..., once( solve_task_a( ... ) ), ... this limits scope precisely want express. steadfastness problem but not possible source of p...