It depends on what the game does. If it’s a two-player board game, look into the “Mini-max” search algorithm for games. In most commercial games, the AI is a combination of high-level scripts and low-level efficiently-coded, real-time, rule-based systems. Often, commercial games tend to use finite state machines for computer players. Recently, discrete Markov models have been used to simulate unpredictable human players (the buzzword-compliant name being “fuzzy” finite state machines).