AI Algorithms, Data Structures, and Idioms in Prolog, Lisp, and Java