player AI ported to Prolog