AI Algorithms for Gaming
2h 6mAdvanced2020-04-10
Authors

Eduardo Corpeño
Electrical Engineer, Computer Programmer, and Teacher for 15+ years
Course details
In 1997, an IBM computer named Deep Blue beat Gerry Kasparov, a world chess champion, after a six-game match. While AI technology has grown in exciting, and often revolutionary, ways since Deep Blue's victory at the chessboard in the late 90s, many of the techniques it implemented are still relevant today. In this course, explore some of these techniques as you learn how to leverage key AI algorithms to create two-player, turn-based games that are challenging enough to keep players guessing. Instructor Eduardo Corpeño covers using the minimax algorithm for decision-making, the iterative deepening algorithm for making the best possible decision by a deadline, and alpha-beta pruning to improve the running time, among other clever approaches. Plus, he gives you a chance to try out these techniques yourself as he steps through the development of a cat trap game using Python.
Skills covered
Real-Time ScriptingGame DevelopmentPythonVisualization and Real-TimeOpen SourceSoftware DevelopmentOne-Off
Concepts
0. Introduction
- 01 - Playing against a computer is only fun when it's challenging
- 02 - What you should know
1. Turn-Based Games
- 03 - Some history as motivation
- 04 - Different types of games
- 05 - Tree-based decision-making
- 06 - Time complexity of brute force approaches
- 07 - Time complexity of chess
- 08 - The cat trap game
- 09 - The Python setting for the cat trap
- 10 - Code example - A random cat
2. The Minimax Algorithm
- 11 - Minimax overview
- 12 - Minimax example
- 13 - The minimax algorithm
- 14 - A word on complexity
- 15 - Code example - A perfect cat in a small world
- 16 - Alpha-beta pruning
- 17 - The alpha-beta search algorithm
- 18 - Code example - A pruning cat
3. Depth-Limited Search
- 19 - Depth-limited search
- 20 - Writing good evaluation functions
- 21 - Is alpha-beta pruning still relevant
- 22 - Challenge - Write your own evaluation function
- 23 - Challenge solution
- 24 - Code example - A depth-limited cat
4. Iterative Deepening
- 25 - The iterative deepening technique
- 26 - Is iterative deepening a waste of time
- 27 - Code example - An iteratively deepening cat
- 28 - Is iterative deepening really that good
- 29 - Is alpha-beta pruning really that good
5. Fun with Optimizations
- 30 - The negamax algorithm
- 31 - Transposition tables
- 32 - Monte Carlo evaluation functions
Conclusion
- 33 - Next steps
Related courses
- AI Algorithms for Game Design with Python
- Python for AI Projects: From Data Exploration to Impact
- AI-Powered Cybersecurity Awareness: Revolutionizing Training with Prompt Engineering
- Machine Learning and AI Foundations: Clustering and Association
- Microsoft Cognitive Services for Developers: 1 Vision
- Microsoft Cognitive Services for Developers: 2 Speech
- Programming Foundations: Algorithms
- Agentic AI Solution Design Patterns
Related learn paths
- Advance Your Skills in AI and Machine Learning
- Data Science Professional Certificate by KNIME
- Generative AI for Supply Chain Professional Certificate by CSCMP
- Develop Your SPSS Skills
- Develop Your Skills with Large Language Models
- Responsible AI Foundations
- Getting Started with Python
- Introduction to Fundamental Skills for Data Work: Data Processing