Update AI.js

A bit more AI functionality