
Learn to create artificial intelligence driven games through tutorial videos and exercises, starting from a solid foundation and avoiding heavy math while exploring practical problem solving.
Install Anaconda to set up a cross-platform Python environment with dependencies needed to run the course code, and access built-in packages like NumPy.
Learn to create and activate a conda virtual environment in Anaconda to isolate project dependencies. Prevent library version conflicts when multiple AI game projects run on the same machine.
Install and manage course dependencies by activating a dedicated conda environment, installing from the libraries/requirements file, and validating the setup with a demo Python run.
Download and install Visual Studio Code, set the Python interpreter, and run basic Python code to begin creating games with Python.
Discover how Python unlocks data science, machine learning, web development, and game development with an easy-to-read language, vast libraries, and a scalable ecosystem used by big tech companies.
Explore Python data types, including integer, float, string, boolean, and list, and learn that everything in Python is an object, with topics like variables and loops forming data types.
Learn basic arithmetic in Python, covering addition, subtraction, multiplication, division, and modulo, with integers and floats and using type and print to inspect data types.
Learn to perform addition, subtraction, division, and multiplication in Python, with examples showing decimals and whole numbers, and use modulus and integer division to get remainders and whole parts.
Learn to create and display strings in Python, fix broken strings, apply basic string methods, and understand quotes and character access for game interactions.
Learn to access characters in a Python string using positive indexing (left to right starting at zero) and negative indexing (right to left starting at minus one) with practical examples.
Explore string formatting in Python, using the format method and f-strings to insert variables into sentences and control placement for clear, dynamic text.
Learn to create variables in Python, understand dynamic typing, valid variable names, and case sensitivity, and how information is stored and retrieved in variables.
Create variables in Python by assigning integers, floats, and strings to memory and retrieving them. See how Python's dynamic typing lets a variable change type during execution.
Explore Python booleans, storing and accessing true or false values, and applying boolean logic, conditional statements, and logical operators (and, or, not) in games.
Learn to use Python's equality and inequality operators to compare values, including strings and numbers. Determine when quantities are equal or not, returning true or false.
Explore how to compare variable content in Python using the is operator and equality, with practical examples showing when x and y are equal or not.
Explore boolean expressions and logical operators in Python, including not, and, or, to combine comparisons and evaluate true or false in game logic.
Learn to create conditional statements in Python using if statements to control the flow of execution by running different statements when conditions are met or not met.
Learn to implement conditional statements in Python using if and else, guided by boolean expressions and syntax. Practice with examples that compare values, printing outcomes greater than or less than.
See why data structures matter by comparing a single variable to lists. Learn to create a structured list and use list building methods in Python, handling heterogeneous data types.
Explore Python arithmetic and data types like integer and float. Use the type function and print to reveal whether values are int, float, str, list, or dictionary.
Learn how to access items from a Python list using positive and negative indexing, with zero-based starts, and see examples retrieving specific elements.
Explore why loops matter in programming, mastering the for loop and its use with lists, and learn to write powerful one-liner Python code called list comprehension.
Explore the infinite while loop as a game loop, using a counter and a stopping condition to print numbers without duplicating code.
Master controlling a while loop in Python to prevent infinite iterations, using break to stop at a finite count. Apply this pattern to game loops and user input handling.
Explore Python for loops to iterate over iterables, print list items, and perform operations, including using range to generate numbers from 1 to 20 and applying simple examples like primes.
Learn Python list comprehension to write elegant one-line code, replacing loops with expressions. Explore syntax, loops, and conditionals through examples like adding 100 to list items and selecting even numbers.
Explore how functions group related statements to perform tasks, breaking a Python program into organized, reusable parts. Learn to create functions, define user-defined functions, and use default arguments.
Learn to define user defined functions in python using def, name, and parameters, call the function to run tasks, and reuse it with different arguments.
Learn how return statements exit a Python function and return values to the caller, using an even or odd example to show control flow and function return.
Learn to create classes and objects in Python 3, exposing attributes and methods, and apply constructors, supporting methods, and inheritance to model real-world entities.
Explore how object oriented programming replaces procedural programming and spaghetti code by grouping data and functions into objects with properties and methods, using encapsulation and abstraction to simplify interfaces.
Convert procedural programs to object oriented programming by defining classes and attributes, creating objects, and accessing properties with the dot operator in a practical employee example.
Learn to define and use classes and objects in Python, access attributes with self, and implement the get wages method to compute salary from base salary, overtime, and rate.
Define an employee class, instantiate multiple objects, and use the constructor (__init__) to initialize base salary, overtime, and rate, then use a method to calculate salary.
Learn how inheritance in python lets a child class extend a base class, sharing attributes and methods like salary calculations, using the super method, and pursuing single and multiple inheritance.
Demonstrates multiple inheritance in Python by defining a doctor class that inherits from employee, uses super to call the base constructor, and shows method overriding.
this lecture introduces python game development with the pygame library, showing how to install pygame via pip and create a simple 2d game in visual studio code.
Master the Pygame coordinate system, where the origin is the top-left, x grows to the right and y downward, and learn to render colored rectangles on a display surface.
Learn to draw shapes in Pygame using rect, line, and circle methods. Specify surface, color, and coordinates (x, y, width, height) with the top-left origin.
Choose colors using an online color picker, convert RGB values to color codes, and render colored circles on a display surface by setting position, radius, and stroke width.
Explore the fundamentals of pygame with a reusable skeleton template that covers imports, a main game loop, event handling, screen initialization, and rendering updates.
Learn to render a player rectangle on screen by creating a window surface, importing modules, and drawing a colored rect at x, y with width and height.
Move a rectangle in a python-based game by updating x and y in 50-unit steps using keyboard input (a, d, w), handle boundaries, and learn about timing for smoother motion.
Control a rectangle in an 800 by 600 window using keyboard input, and smooth its movement with a 30 fps update loop to prevent rapid exit from the boundary.
Learn to restrict a game's player movement within the window boundary by checking x and y coordinates, accounting for the object's width, and preventing crossing walls.
Explore artificial intelligence in board game design, study alternating moves, game states, and the Minimax theory with tic tac toe and backgammon to build unbeatable artificial intelligence.
Represent each game state as a node and each move as a branch in a game tree, then apply minimax backtracking on alternating moves (tic tac toe) to optimize outcomes.
Explore the lookahead problem in games like tic tac toe and chess, illustrating exponential growth of possible moves and states, and introduce heuristics to manage this complexity.
Explore the look ahead problem in turn-based games with alternating moves and apply a holistic heuristic to evaluate each possible move, guiding the AI toward winning board configurations.
Learn how heuristic evaluation guides moves by comparing board configurations and selecting the move with the highest heuristic value, using a capped look-ahead depth to prune the tree.
Explore how a heuristic evaluates tic tac toe boards, assigning two points for a one-move win and one point for a two-move win, guiding a minimax-driven AI.
Explore the minimax algorithm for two-player games like tic-tac-toe, comparing max and min roles, utility scores, and heuristic-based move selection.
Demonstrate a three level minimax lookahead using a backtracking bottom up tree, showing max and min players alternating and propagating values to select moves.
Explore a tic tac toe minimax example, with a max player maximizing the score and a human min player minimizing it, using a lookahead depth of two.
Explore the min-max algorithm with recursion, applying heuristic measures and traversing child nodes to maximize or minimize scores, and implement an AI detector player to compete against a human.
Develop a tic tac toe game with an artificially intelligent agent using the Minimax algorithm in Python3, competing against a human player. Install dependencies and run the game from resources.
The lecture shows implementing a Minimax-based artificially intelligent player to compete with a human, starting from an indecisive random baseline via an abstract base class and nine moves.
Implement the minimax algorithm by creating a minimax player that inherits an indecisive player, defines next actions as abstract, and uses a look ahead depth to evaluate moves.
Implement the minimax algorithm to choose optimal moves in a tic-tac-toe style game by evaluating heuristic values of empty cells, maximizing for the AI and minimizing for the human player.
Learn to set up an autoplayer using a minimax algorithm in a tic tac toe game, configure lookahead, and integrate the minimax player into the game code.
Test a tic tac toe game against an artificially intelligent player using minimax, tune the lookahead value, and explore neural network training to beat the ai.
Discover how artificial intelligence creates data through environment interaction, beyond input-output patterns, using deep neural networks and reinforcement learning for robotics, sensor-to-action mappings, and AlphaGo games.
Reinforcement learning learns by interacting with an environment, creates its own data without external inputs, evaluates actions through simulation, and improves when analytic solutions are unavailable.
Explore how an agent navigates an environment made of states, performing exploration to identify which states are good or bad and training to move between them within defined boundaries.
Learn how rewards guide an agent in an environment. Negative rewards punish bad states, while positive rewards reinforce good states, shaping the agent's learning through action choices.
The agent randomly explores the environment, moves through states, receives positive rewards, and backtracks to seek paths that lead to better rewards.
Explore the typical reinforcement learning scenario where an agent acts in an environment, transitions between states in a maze, and earns positive, negative, or zero rewards.
Define a simple policy in reinforcement learning to decide actions in blackjack, using a condition to hit or extend, and follow the policy in the game environment.
Explore how reinforcement learning uses rewards to tell the agent how good a given situation is, with negative rewards signaling bad outcomes and positive rewards guiding decision making.
Explore how value measures what is good in a state, guiding the agent toward higher-value states and the goal, with rewards and returns shaping the policy.
Contrast model-based and model-free reinforcement learning, noting that known probabilities define a model-based approach while unknown dynamics require Monte Carlo simulation in model three, with blackjack as an example.
Explore the Markov property and Markov chains, learn about transitional probabilities, and visualize state transitions with weather-based examples and transition matrices, for creating artificially intelligent games.
Explore the Markov reward process, extending the Markov property with a reward function and transition probabilities between states, where states carry a reward that may be zero, positive, or negative.
Model environments with a Markov decision process by defining states (estates), actions, transition probabilities, and rewards in a grid world; distinguish model-based and model-free approaches.
Explore reinforcement learning concepts like optimal policy, rewards, and return, and learn value and policy iteration using the Bellman equation and dynamic programming.
Explore the Bellman equation within the Markov decision process to find the optimal policy, illustrating exploration and rewards, including positive and negative outcomes in a maze.
Explore how value functions guide learning in reinforcement scenarios, assigning rewards to states, backtracking paths, and addressing ambiguities with the Bellman equation to derive optimal policies.
Learn how the Bellman equation computes the value of the current state by maximizing over actions the sum of rewards and gamma times the value of the next state.
Explore how the discount factor gamma shapes state value updates via the Bellman equation, guiding an agent to maximize rewards and select the optimal policy toward the goal.
Apply the Bellman equation, using gamma times the value of the next state, to compute rewards and select the action that maximizes value to form an optimal plan.
Compare deterministic environments with non deterministic (stochastic) ones and explain how agent actions yield probabilistic outcomes, such as up, left, or right moves varying in 0.8, 0.1, or 0.1 chances.
Learn how the Bellman equation extends to non-deterministic environments in Markov decision processes, incorporating rewards, discount factors, and multiple possible next states with probabilities.
Explore Q-learning by comparing Q-values for actions like up, left, right, and down in a state, defining Q as the quality of performing an action toward an optimal policy.
Explore the q-learning equation in a deterministic environment, where the Q value equals reward plus gamma times the max Q value of the next state, linking value and Q-value.
Learn how the Q value is computed in deterministic and non-deterministic environments by incorporating reward, discount factor, probability, and the maximum Q value of the next state.
Learn temporal difference learning to update Q-values with reward and gamma, using Bellman equations, alpha as learning rate, and exploration during training.
Train an artificially intelligent player with Q learning in a grid environment. Explore rewards, penalties, including living penalties, and obstacles like walls, bombs, and water, then implement a from-scratch algorithm.
Load sprite-based environments, set rewards and penalties (including bomb penalties), and implement a Q-learning agent with a 100-state Q-table initialized to rewards and updated by temporal-difference learning.
Create a Q-learning implementation in Python by building an environment, initializing a reward board and q-table, and updating values via temporal-difference learning and the Bellman optimality equation.
Explore how a 10 by 10 grid defines 100 states, with zero as start and rewards finish line and explosives, while Q tables update state–action values via temporal differential learning.
Explore a 10 by 10 box matrix and its Q-table of state-action values, from zero to ninety-nine, with bombs and a finish-line reward, updated by temporal difference learning.
Identify valid actions from the current position by evaluating moves up, down, left, right (and diagonals if rewarded), keeping only nonzero-reward moves.
Create a q-learning model by instantiating a q object with alpha and gamma, then train over 1000 iterations, preparing states, rewards, and actions, and applying temporal-difference updates to optimize learning.
Learn to select the optimal action by returning the maximum Q value among A1, A2, A3 using a simple max value strategy, updating index and value via a max function.
Implement temporal difference learning in a q-learning setup, updating the q-table via the Bellman equation with reward, gamma, max Q value, and alpha over 1000 iterations.
Explore q-learning with a q-table updated by temporal difference, select the best action via max q value, and train over epochs in a maze environment with alpha and gamma.
If you’re interested in learning how to make your own Artificially Intelligent games using Python, then this is the course for you!
This course is full of tutorial videos along with materials which one can run to get familiar with this discipline. You no longer need to read complex research papers and have a solid foundation in mathematics to get going. Just follow this course and materials and you’re on your way.
Let's take a look at the structure of this course:
We are going to start with a simple game that implements popular board game algorithm: MinMax. In this game we are going to create TicTacToe and write an algorithm that plays against human player and tries to beat human player.
Next we are going to learn about gym module: a popular library which can be used to write and test our AI algorithms.
After that, we are going to learn about Bellman Equation and Dynamic Programming. We are going to learn how to find the optimal value of the states using Bellman equations through model dynamics. We are going to implement maze game to implement Q-learning algorithm.
Then, we are going to learn about Monte-Carlo Simulation. We are going to check how value function can be predicted using Monte Carlo simulation when model dynamics is unknown.
Similarly, we are going to implement following games throughout this course:
1. BlackJack game using Monte-Carlo and Q-Learning
2. Pacman using Deep Convolution Neural Network
3. Make unbeatable AI TicTacToe player using Tensorflow and Keras (Human Vs AI)
4. MinMax algorithm for Board game
General Q/A's:
When most people hear the term artificial intelligence, the first thing they usually think of is robots. That's because big-budget films and novels weave stories about human-like machines that wreak havoc on Earth. But nothing could be further from the truth.
Artificial intelligence is based on the principle that human intelligence can be defined in a way that a machine can easily mimic it and execute tasks, from the most simple to those that are even more complex. The goals of artificial intelligence include mimicking human cognitive activity. Researchers and developers in the field are making surprisingly rapid strides in mimicking activities such as learning, reasoning, and perception, to the extent that these can be concretely defined. Some believe that innovators may soon be able to develop systems that exceed the capacity of humans to learn or reason out any subject. But others remain skeptical because all cognitive activity is laced with value judgments that are subject to human experience.
Artificial intelligence (AI) refers to the simulation of human intelligence in machines that are programmed to think like humans and mimic their actions. The term may also be applied to any machine that exhibits traits associated with a human mind such as learning and problem-solving.