
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Explore practical reinforcement learning fundamentals, formulate problems as a Markov decision process, and implement Q-learning, SARSA, and deep Q-learning through hands-on projects in Python.
Outline of four-part course structure, covering reinforcement learning concepts, Markov decision process, Bellman equation, key algorithms (Q-learning, SARSA, Q-network), and maze and stock trading projects.
Set up your development environment by installing python and a virtual environment, then install numpy, pandas, tensorflow, and keras via requirements.txt.
Explore reinforcement learning as a mode of machine learning for optimal control and decision making, where an agent learns from a dynamic environment through actions and reward signals.
Explore deep reinforcement learning applications across video games, health care, finance, robotics, autonomous vehicles, and personalized systems, including chat bots, resource management, and A/B testing for model tuning.
Reinforcement learning trains by interacting with the environment using delayed rewards, unlike supervised or unsupervised learning that rely on data. It maximizes rewards to learn an optimal policy.
Define the Markov decision process and its components—environment, agent, states, actions, rewards, observations, and state transitions—and show how agents learn by interacting with the environment without knowing its internal model.
Explore how an agent learns an optimal policy in reinforcement learning using policy, value function, model concepts, and Q-learning to maximize long-term rewards.
The Bellman equation defines q(s,a) as the immediate reward plus the discounted maximum q-value of the next state over all possible actions.
Learn how the Q-learning algorithm, an off-policy reinforcement method, updates q-values for a state-action table using rewards and the Bellman equation with learning rate during training.
Explore q-learning through a step-by-step frozen lake example, initializing a zero q-table, using epsilon-greedy exploration, and updating q-values with learning rate 0.9 and gamma 0.9 to reach the goal.
Explains how sarsa, an on-policy reinforcement learning algorithm, updates q-values using the policy that chose actions (e.g., epsilon-greedy), unlike q-learning which uses the max next-state value.
Leverage the deep q network to approximate q-values with a neural network, using experience replay and batch training to update via backpropagation in reinforcement learning.
Balance exploration and exploitation in online decision making by gathering new information and using past knowledge, guided by the epsilon-greedy strategy that explores early and exploits later.
Define reinforcement learning problems by specifying environment, states, agent, actions, and a reward function; update Q values via the equation, illustrated by navigation grid and job scheduling.
Maze-based reinforcement learning project on a 6x6 grid features a red circle agent that uses four directions to reach the goal, with rewards +1 for goal and -1 for holes.
Create a reinforcement learning project for a maze problem using a pie chart editor, choosing Q-learning, Python 3.6, and creating a folder in My Documents.
Create the necessary files for the maze environment reinforcement learning agent and app, including maze_environment.py, and set them up.
Create a maze environment class in Python using tkinter, initializing a window with a title and geometry, and define an action space including up, down, left, right, and space.
Create a maze grid by building a canvas, drawing vertical and horizontal lines, defining the origin, and placing the start, walls, goal circle, and a red explorer rectangle.
Test and debug the build_maze method by using the main block and main loop to run the application window, ensuring the function executes correctly and the program starts.
Implement render to redraw vignettes at each episode start and update the window, and implement reset to clear the window, delete and reinitialize the red rectangle.
Implement get state and reward for maze reinforcement learning environment. Map actions 0-3 to up, down, right, left; compute next state with boundary checks and update reward and terminal status.
Create an agent class for q-learning by importing packages, defining a constructor with parameters, initializing epsilon and actions, and building a q-table mapping states to action values.
Implement a function to add states to the queue table in a Python deep reinforcement learning tutorial, checking for new states and initializing actions with zero.
Implement the choose action function with an epsilon-greedy strategy to balance exploration and exploitation, and select either a random action or the best state-action.
Implement the learn method by updating the Q table from transitions using current state, action, reward, next state, terminal check, and gamma with the max next-state Q value.
Create a reinforcement learning app in Python by setting up the agent and environment, importing necessary classes, and running 50 episodes to observe convergence and rewards.
Implement the main function by creating a run_experiment loop with a maze environment and a q_learning_agent. Run episodes: reset, render, take actions, observe rewards, learn from transitions, and log results.
Plot results by creating two subplots: movements per zone and rewards per episode, then save the figure and run the application.
Run and test the reinforcement learning app, observe an agent explore episodes, learn to reach the yellow circle with fewer moves, and run the program from the command line.
Build a stock trading agent with a deep Q network, using a sliding window of closing prices to define states and actions like buy, sell, or hold, aiming for profit.
Start a new Python project, create the market environment, and set up training components to begin a deep reinforcement learning trader application.
Create a data folder, extract the provided zip, and copy its contents into the folder to load data for training and evaluation.
Create a market environment class in Python for deep reinforcement learning, with a two-parameter constructor, stock data loading by name, and a get states method.
Read and parse the data file, skip the header row, and extract the close price as a float to prepare training data for a reinforcement learning model.
Implement a sliding window state construction from time series data by computing price differences over a window of size n, building a list of states for each data point.
Implement get next state and reward for stock trading, updating the index and price data, and returning the next state, reward, and done flag based on hold, buy, or sell.
Implement an agent class for deep reinforcement learning in Python, featuring an experience replay memory, a dense neural network, and training or evaluation modes with epsilon-greedy control and model save/load.
Build a deep learning model for sequential tasks, set input and action outputs, use dense layers with 32 units, and train with MSE loss and Adam optimizer, resetting after episode.
Implement getting action by using an epsilon-greedy strategy to decide between buying, holding, or selling based on the current state and price data, updating inventory accordingly.
Implement buy and sell logic by tracking price data and inventory, computing total profit, formatting prices, and printing profit updates in Python.
Implement experience replay by sampling a mini-batch of transitions from memory, then compute target values from rewards and max next-state Q-values, and update the model while decaying epsilon-greedy policy.
Create training app guides implementing a reinforcement learning training loop by configuring window size and data, running episodes, learning from market interactions, and saving the trained model.
Develop and test a training app in Python for deep reinforcement learning, address missing bank data, implement goods locating logic, and reference timing around 184 seconds.
Evaluate the trained stock-name model by initializing stock-name modeling, creating the model and agent, training and evaluating with the valuation dataset, and plotting the results.
Learn to implement plotting results by visualizing datasets and action signals, selecting metrics, and rendering status indicators to assess reinforcement learning performance.
Train the reinforcement learning model on GSP stock data from 2010 and the first quarter of 2011, adjust the stock name, and run training and evaluation to compare scores.
Extend a stock trading project by adding volume as a feature alongside close price, normalizing values to 0-1, and using the end day window to compute neural network features.
Explore a deep reinforcement learning stock trader built on a deep q learning project, detailing two-feature input, pandas data loading, min-max normalization, and a five-step window for training.
Explore reinforcement learning fundamentals, where agents learn from rewards through interaction with an unknown environment, and see how deep learning enhances large state-action spaces with prioritized experience replay.
In this course we learn the concepts and fundamentals of reinforcement learning, it's relation to artificial intelligence and machine learning, and how we can formulate a problem in the context of reinforcement learning and Markov Decision Process. We cover different fundamental algorithms including Q-Learning, SARSA as well as Deep Q-Learning. We present the whole implementation of two projects from scratch with Q-learning and Deep Q-Network.