
This lecture introduces reinforcement learning, covering fundamental concepts and their connection to deep learning and neural networks. The course is structured into two main parts: foundational deep learning principles, including numerical methods and coding exercises, followed by reinforcement learning, exploring different agent types and mechanisms.
Initially, deep learning is introduced to understand the neural networks that reinforcement learning (RL) agents use. Following this, the focus shifts to RL, covering agents, environments, rewards, and punishments. The course aims to make students proficient in understanding RL agents, their neural network models, and how these elements integrate to form effective learning systems.
Key topics include defining RL mechanics and components and comparing RL with supervised and unsupervised learning. A historical overview is given, from RL's origins in robotics to its applications in fields like ChatGPT's model development, where RL plays a crucial role. Practical applications and examples demonstrate how RL agents operate in dynamic scenarios, learning through trial and error to maximize cumulative rewards. The distinction between RL’s dynamic learning versus the static nature of traditional machine learning is highlighted, emphasizing RL's adaptability and real-time learning.
The lecture explains RL's core mechanisms: trial and error, delayed rewards, and sequential decision-making. These are linked to human learning patterns, where agents maximize rewards through situational actions. Comparisons with static machine learning illustrate RL's continuous adaptation in various scenarios, reinforcing its role as an evolving subset within the broader AI domain alongside machine and deep learning.
Deep reinforcement learning overview: an agent interacts with an environment through states, actions, and rewards, aiming to maximize cumulative reward while balancing exploration and exploitation to learn optimal policies.
Compare supervised and unsupervised learning across objectives, data labeling, feedback, training paradigm, temporal dynamics, and applications, and contrast with reinforcement learning's goal of maximizing cumulative rewards.
Trace the evolution of reinforcement learning from 1950s foundations like the Bellman equation and dynamic programming to modern deep reinforcement learning and game playing breakthroughs.
Explore how recent deep reinforcement learning advances span algorithms, theory, and real-world applications in robotics, autonomous vehicles, healthcare, finance, and recommendations, with emphasis on safety and ethics.
Explore the integration of deep learning and reinforcement learning, from artificial neural networks to CNNs, RNNs, and LSTMs, and apply deep reinforcement learning with Python and TensorFlow to complex environments.
Discover how an agent learns to maximize long-term rewards by balancing exploration and exploitation within an environment, guided by policy and value functions.
Explore a nontechnical explanation of training a neural network with hidden layers, from random or smart weight initialization to activation, feedforward, backpropagation, and gradient-descent updates through epochs.
Explore the ann algorithm for a single hidden layer neural network with input X, hidden nodes h, and weights W, using sigmoid feedforward, y_hat, error backpropagation, and eta.
Demonstrate a worked-out neural network example with two inputs and a single output, performing feedforward and backpropagation using sigmoid activation. Explain label encoding and one-hot encoding, and epochs in training.
Explore how neural networks learn from data by adjusting weights through backpropagation across epochs, using activation functions like sigmoid and ReLU, and optimizing with loss functions.
Learn how deep neural networks extend shallow networks using feedforward and backpropagation trained by gradient descent with learning rate, stopping criteria, and convolutional and recurrent networks in TensorFlow with Keras.
Explore major deep learning frameworks, focusing on TensorFlow and PyTorch, with open source tools from Google Brain and Facebook AI. Understand TensorFlow version differences, compatibility mode, and Keras usage.
Explore how TensorFlow uses computational data-flow graphs and tensors to accelerate matrix calculations across CPUs and GPUs, and learn practical installation with Python environments, conda, virtualenv, and Colab.
Explore tensor concepts in TensorFlow, from 1d to 5d tensors and color channels to constant and trainable variables, and outline model building with gradient descent.
Explore how Keras simplifies TensorFlow coding with a high-level API, offering sequential models and built-in training, while TensorFlow provides low-level customization and manual control.
Explore how gradient descent optimizes neural networks by updating random weights toward the negative gradient to minimize error, including batch, stochastic, and mini-batch approaches.
Learn how the learning rate governs weight updates and convergence in neural networks, and configure it in Keras with SGD, decay, momentum, and learning rate schedules for optimal training.
Explore how gradient descent powers neural networks to learn from data, navigate the error surface, and overcome vanishing or exploding gradients with learning-rate strategies and momentum.
Explore how to avoid overfitting and underfitting by managing model complexity, tuning hyperparameters, and improving the training data through augmentation, synthetic data, and preprocessing.
Examine L1 and L2 regularization in regression and neural networks, comparing ridge and lasso methods. See how L1 drives weights to zero while L2 shrinks them to prevent overfitting.
Apply regularization to prevent overfitting by using a large network and constraining weights to stay low, rather than dropping hidden nodes, highlighting hidden layers and nodes as key hyperparameters.
Regularization prevents overfitting by constraining weights in a large deep neural network, keeping hidden layers and nodes but with reduced weights to improve model fit.
Standardize data before applying L1 and L2 regularization to ensure the lambda parameter effectively penalizes weights by scaling inputs to a common range 0-1.
Dropout regularization randomly drops a fraction of hidden layer nodes during training to prevent overfitting and encourage robust, ensemble-like predictions across networks.
Learn how early stopping prevents overfitting by halting training when test accuracy stops improving, and save epoch models using the h5py package to identify the optimal training point.
Build a Keras sequential model with dense layers and sigmoid and softmax activations, compile with categorical cross entropy and accuracy, and save model after each epoch via checkpoint to HDF5.
Learn how to save a machine learning model after each epoch in Python using Keras, via callbacks and the HDF5 format to preserve architecture and the model's learning progress.
Explore loss functions used in classification and regression, including binary cross entropy, hinge loss, mean squared error, mean absolute error, huber, and log cosh, and their role in optimization.
Explore the ReLU activation, often preferred in neural networks, which combats vanishing gradients by using max(0, x) and a derivative of zero for negative values and one for positive values.
Explore tanh, a rescaled sigmoid activation that squashes inputs to -1 to 1. Implement tanh in Keras via tf.keras.activations.tanh to produce an output with the same shape.
Explore the ReLU activation function, its use in deep neural networks to alleviate vanishing gradients, and how ReLU computes max(0, x) with optional max value, threshold, and alpha parameters.
Use softmax for multi-class outputs to produce a probability distribution; for binary outcomes, use sigmoid, and implement softmax in Keras as a dense layer activation or standalone.
Explore stochastic gradient descent and mini-batch gradient descent, learning how gradient estimates from small data batches update weights efficiently, with batch size as a key hyperparameter.
Explore gradient descent optimization, from traditional gradient descent to stochastic and mini-batch approaches, and learn how batch size, powers of two, and trade-offs shape fast, accurate AI training.
Explore how convolutional neural networks analyze visual data by applying convolutional layers to extract local patterns, spatial relationships, and downsample with max pooling.
Compare artificial neural networks and convolutional neural networks for image classification, highlighting how flattening images destroys spatial dependence and how CNNs preserve local correlations for effective feature extraction and classification.
Explore how filters or kernels operate on images by sliding a small matrix over a larger pixel matrix, performing dot products to produce a new, reduced image through convolution.
Explore how convolutional neural networks mimic the visual cortex, learning features through convolutional and pooling layers, shrinking 224 by 224 images to seven by seven, enabling object detection and segmentation.
Compare cross-sectional data and sequential data, explain time series concepts, and show how recurrent neural networks, CNNs, and sequential ANNs handle ordered data through a word prediction case study.
Explore how artificial neural networks handle sequential data, comparing ANN, CNN, and sequential ANN approaches for predicting next words with one-hot encoding and serially connected networks.
Demonstrate predicting the third word from a two-word context using n-gram data from a COCA subset, with examples such as love to see and hate to use.
Compare PyTorch and TensorFlow ecosystems, leverage Keras with TensorFlow backend to build CNNs and RNNs, implement conv2d, pooling, padding, and train on CIFAR-10 and sign language datasets.
Explore TensorFlow and CNNs for image recognition, including sign language, and glimpse RNNs and LSTMs with memory gates for translation and music generation.
Explore reinforcement learning foundations and the overview of Markov decision processes, including state spaces. Highlight value function approximation—from linear to deep neural networks: Bellman equations, policy iteration, and value iteration.
Learn value function approximation to handle large or continuous state spaces in reinforcement learning and MDPs, using compact representations to generalize from observed to unseen states, including epsilon-greedy approaches.
Builds and explains a CartPole setup in OpenAI Gym, initializes random weights, defines a simple policy and a linear value function, and updates weights with SGD across 5000 episodes.
Explore linear function approximation in reinforcement learning and Markov decision processes, using v(s) = theta^T phi(s) to estimate values for large state spaces.
Apply linear function approximation for value estimation in CartPole by fitting a linear regression model to simple data and inspecting the model coefficients.
Learn nonlinear function approximation for reinforcement learning and Markov decision processes to better estimate the value function by capturing complex relationships between states and values beyond linear features.
Demonstrate nonlinear function approximation with deep neural networks in PyTorch by building a simple model with nn.Sequential, ReLU, and linear layers, trained with MSE loss and Adam on sine data.
Explore applications of the value function and approximate value function estimation for learning in large state spaces, and examine limits like approximation bias, generalization error, and the curse of rationality.
Explore MDPs, a powerful framework for decision making that handles uncertainty, rewards, and actions to guide reinforcement learning and related domains.
Implement a grid world MDP in numpy, defining state and action spaces, a four-action policy, and Bellman value function updates with a gamma of 0.9 and a custom reward scheme.
Explore the key components of an MDP, including states, actions, transition probabilities, rewards, and policy, and learn how value functions and the discount factor gamma guide optimal decision making.
Explore how Bellman equations link the value of a state or action to its successor states, forming the foundation of value functions in Markov decision processes and reinforcement learning.
Learn how policy iteration and value iteration solve MDPs to obtain the optimal policy and value function through Bellman equations, with policy evaluation, improvement, and greedy action selection.
Implement value iteration and policy iteration in a gridworld, updating the value function and policies with rewards and gamma, using delta thresholds, and showing different results for both methods.
Explore reinforcement learning and Markov decision processes, covering states, actions, rewards, the reward hypothesis, and foundations like Bellman equation, value and policy iteration, plus deep and multi-agent RL.
Explore how to use the Python gym library to work with diverse environments, from cartpole and mountain car continuous to mujoco robots, including creating custom environments, rendering, and registration.
Explore Bellman equations and value functions, including state value and action value calculations, with intuitive interpretations, and review Markov reward and decision processes, and optimization of Bellman equations in MDPs.
Define state value function v(S) as the expected return from a state, and action value function q(S, a) as the expected return from a state-action pair using discounting.
Learn how Bellman equations compute state value functions in reinforcement learning by updating v(s) with the expected reward plus gamma times the next state's value, until convergence.
Value functions quantify the desirability of states and actions to guide policy learning. The lecture introduces V(s) and Q(s,a) as expected cumulative future rewards, with neural network and CNN examples.
Define and elaborate on Markov decision processes as the fully observable environment for reinforcement learning, and connect them to the Bellman equation, state transitions, and Markov properties.
Define Markov reward processes as Markov chains with rewards and a discount factor, derive their value function and Bellman equation, and outline dynamic programming, Monte Carlo, and TD learning approaches.
Define and analyze Markov decision processes as Markov reward processes with decisions, detailing states, actions, transitions, rewards, gamma, policies, and Bellman equations, culminating in optimal policies and solution methods.
Explore extensions to mdps, including infinite and continuous state and action spaces, continuous time with Hamiltonian Jacobi Bellman equations, and partially observable mdps with belief trees.
Explore how Bellman equations and value functions guide reinforcement learning in MDPs, including state value v(s) and action value q(s,a), with discounting and policy considerations.
Explore q-learning as a model-free reinforcement learning method that learns the q-value function from experience, compares it with policy and value iteration, and reviews deep q-networks, augmentation flow, and limitations.
Explore how q-values are updated in q-learning using observed rewards and max of next-state q-values. Initialize q-values, balance exploration and exploitation (epsilon-greedy), observe reward and next-state, and update until convergence.
Install gym, numpy, and TensorFlow, build a frozen lake environment, and implement Q-learning to update q-values using the Bellman equation over 2000 episodes.
Compare q-learning with policy iteration and value iteration, showing model-free versus model-based approaches; q-learning learns the optimal action-value function, while policy and value iterations converge to optimal policies in MDPs.
Examine the advantages and disadvantages of Q-learning, a model-free method that handles large and continuous state-action spaces via function approximation, including neural networks, while balancing exploration and exploitation.
Explore how the deep q-network combines q-learning with a deep neural network to solve high-dimensional tasks, using a replay buffer, a target network, and td error minimization.
Use activation functions like ReLU, sigmoid, or tanh to introduce nonlinearities and learn mappings, while DQN output layer assigns a Q-learning value to actions and must match actions for convergence.
Explore how to build a DQN in TensorFlow, from raw sensory input and pre-processing to convolutional and fully connected layers, activation functions, and matching output neurons to actions.
Implement a deep q-network for cartpole using TensorFlow and gym, featuring an epsilon-greedy policy, replay buffer, and a trained Keras model with mean squared error loss.
Master Q-learning in a frozen lake environment. Use the Q table and the Bellman equation to learn optimal actions through rewards, states, and exploration.
This course is the integration of deep learning and reinforcement learning. The course will introduce student with deep neural networks (DNN) starting from simple neural networks (NN) to recurrent neural network and long-term short-term memory networks. NN and DNN are the part of reinforcement learning (RL) agent so the students will be explained how to design custom RL environments and use them with RL agents. After the completion of the course the students will be able:
To understand deep learning and reinforcement learning paradigms
To understand Architectures and optimization methods for deep neural network training
To implement deep learning methods within Tensor Flow and apply them to data.
To understand the theoretical foundations and algorithms of reinforcement learning.
To apply reinforcement learning algorithms to environments with complex dynamics.
Course Contents:
Introduction to Deep Reinforcement Learning
Artificial Neural Network (ANN)
ANN to Deep Neural Network (DNN)
Deep Learning Hyperparameters: Regularization
Deep Learning Hyperparameters: Activation Functions and Optimizations
Convolutional Neural Network (CNN)
CNN Architecture
Recurrent Neural Network (RNN)
RNN for Long Sequences
LSTM Network
Overview of Markov Decision Processes
Bellman Equations and Value Functions
Deep Reinforcement Learning with Q-Learning
Model-Free Prediction
Deep Reinforcement Learning with Policy Gradients
Exploration and Exploitation in Reinforcement Learning