The Hardest Challenge in M-Prolog: Recursive Backtracking and AI as a Research Partner

One of the most difficult problems I encountered while developing M-Prolog involved recursive nondeterministic predicates such as quot/4.