made some reference impl for ai and creep