This article will teach you about the minimax algorithm and alpha-beta pruning, from a beginner's perspective.
The only way to learn mathematics is to do mathematics.