(XDK) Implement more AI routines