...we perform a depth-first search of the amb choice tree, and whenever we brush against failure, we backtrack to the most recent node of the tree that offers a further choice
in reply to Re: How implement AMB in perl?
in thread How implement AMB in perl?
That statement screams, regexes, or rather a creative use of them, akin to:
The N-queens problem using pure regexes
Pure regex Hamiltonian Circuit solution