5 ms·
if you ever care, the wizard book[1] can get you started with a toy implementation of prolog. it's just searching through a big state space, really not much to
by jfoutz 10y ago
if you ever care, the wizard book[1] can get you started with a toy implementation of prolog. it's just searching through a big state space, really not much to it. The key idea is unification. PAIP builds up to it in a nice way, and the scheme language spec has (had?) a nice unifier as an example[2].
it's also pretty reasonable to just say to hell with prolog, and go do other fun things with your life. But if you do care at some point, it's not magical. it's just a fancy search.
[1] https://mitpress.mit.edu/sicp/full-text/book/book-Z-H-29.html#%_sec_4.4 https://mitpress.mit.edu/sicp/full-text/book/book-Z-H-29.htm...
[2] http://www.scheme.com/tspl4/examples.html#./examples:h10 http://www.scheme.com/tspl4/examples.html#./examples:h10