fixed stat bugs
updated ai.js