Lecture 16: ICA Wrap-up and Introduction to Reinforcement Learning
Stanford CS229 lecture 16 notes: ICA Wrap-up and Introduction to Reinforcement Learning.
- cs229
- machine-learning
- course-notes
On this page
A bit more on ICA#
Quick recap: ICA finds the that unmixes the signals, assuming independent non-Gaussian sources. The only thing to add is that ICA works well beyond audio, for example in separating brain signals (EEG) from artifacts like eye blinks.
Reinforcement Learning: the big picture#
In supervised learning, we are given the right answer for each input. RL is different: an agent interacts with an environment, takes actions, and gets a reward at some points. It must figure out for itself which actions led to good outcomes.
There's a hard part called the credit assignment problem. If you lose a chess game after 60 moves, which move was the mistake?
Examples:
- Flying a helicopter (reward for staying stable, big negative for crashing)
- Playing games (win = +1, lose = -1)
- Robot walking
graph LR
A["Agent"] -->|"action a"| E["Environment"]
E -->|"new state s', reward r"| AMarkov Decision Processes (MDPs)#
An MDP is the standard formal model. It's a tuple :
- : set of states
- : set of actions
- : transition probabilities. is the probability of landing in state if you take action in state .
- : discount factor
- : the reward function
The "Markov" part means the next state depends only on the current state and action, not on the whole history.
A grid world example#
Imagine a grid. The agent starts somewhere, and one square gives +1, another gives -1, and there's a wall. If the agent tries to move North, with probability 0.8 it goes North, and with probability 0.1 each it slips to the left or right. The agent has to find a good plan despite this randomness.
Discounting#
The total payoff from a sequence of states is:
Because , rewards now are worth more than rewards later. It also makes the infinite sum finite. You could also think of as an "interest rate" or as a probability of the process randomly ending.
Policies#
A policy tells the agent which action to take in each state.
The goal: find the policy that maximizes the expected total discounted payoff:
Next lecture: how to actually compute it.