updated ai functions
Merge branch 'master' of https://github.com/throughthegate/4240-ai-final