Update AI.js

Is should really put some commit messages here