"Artificial intelligence" is actually an overstatement. The computer opponents simply checks a few conditions on each of their turns, and then decides how to act.