implemented simple AI