The AI uses a minimax search with pruning to explore three moves into the future, applying a fitness function to the state of the game after the third move.