fixed syntax issue in ai.java