How would you output the number of steps a logic program took to get the desired output?
e.g. https://github.com/clojure/core.logic/wiki/Examples#a-classic-ai-program
How can you find how many times moveo needs to be run for each success?
Use trace-lvar ? log ? Or embed a counter as an lvar and inc it? (not sure how to do that)?
Extend a basic logic function?
dunno, but thinking about it, for an "execution to succeed" it will have to execute the last goal from run, that means it reached a leaf, but the only thing that is threaded through all branches is the substitution map. I imagine trying to hack the substitution in core.logic to count the times it makes a unification, but that's not exactly how many goals/relation have been executed
also you could hack the substitution to count how many times it executed bind
, that is how many relations the substitution has executed
Add trace binding, conjo to it the name of the move taken