AI Algorithms for Game Design with Python
2h 21mAdvanced2025-03-11
Authors

Eduardo Corpeño
Electrical Engineer, Computer Programmer, and Teacher for 15+ years
Course details
In this intermediate-level course, Eduardo Corpeño explores AI algorithms for game design. Dive into powerful strategies like minimax, alpha-beta pruning, and iterative deepening. Learn how to implement these techniques in Python and enhance your game development skills. Discover the historical context, such as the algorithms used in IBM's Deep Blue, which defeated world chess champion Garry Kasparov. By engaging with real-world examples and hands-on coding exercises, you will develop and strengthen your ability to create intelligent game algorithms. Your learning journey is made seamless with GitHub Codespaces, ensuring no setup hassles. Whether you are a game developer, AI enthusiast, or a programmer looking to sharpen your skills, this course offers in-depth knowledge and practical skills to effectively utilize AI in game design.
Skills covered
Game DevelopmentArtificial Intelligence FoundationsPythonArtificial Intelligence (AI)Programming LanguagesOpen SourceSoftware DevelopmentOne-Off
Concepts
Introduction
- Playing against a computer is only fun when it's challenging
- What you should know
- Using the exercise files in GitHub Codespaces
Turn-Based Games
- Some history as motivation
- Different types of games
- Tree-based decision-making
- Time complexity of brute-force approaches
- Time complexity of chess
- The cat trap game
- The Python setting for the cat trap
- Code example - A random cat
The Minimax Algorithm
- Minimax overview
- Minimax example
- The minimax algorithm
- A word on complexity
- Challenge - A perfect cat in a small world
- Solution - A perfect cat in a small world
- Alpha-beta pruning
- The alpha-beta search algorithm
- Challenge - A pruning cat
- Solution - A pruning cat
Depth-Limited Search
- Depth-limited search
- Writing good evaluation functions
- Is alpha-beta pruning still relevant
- Challenge - A depth-limited cat
- Solution - A depth-limited cat
- Challenge - Write your own evaluation function
- Solution - Write your own evaluation function
Iterative Deepening
- The iterative deepening technique
- Is iterative deepening a waste of time
- Challenge - An iteratively deepening cat
- Solution - An iteratively deepening cat
- Is iterative deepening really that good
- Is alpha-beta pruning really that good
Fun with Optimizations
- The negamax algorithm
- Transposition tables
- Monte Carlo evaluation functions
Conclusion
- Next steps