CSE510 Deep Reinforcement Learning (Lecture 17)
Why Model-Based RL?
- Sample efficiency
- Generalization and transferability
- Support efficient exploration in large-scale RL problems
- Explainability
- Super-human performance in practice
- Video games, Go, Algorithm discovery, etc.
Model is anything the agent can use to predict how the environment will respond to its actions, concretely, the state transition and reward .
For ADP-based (model-based) RL
- Start with initial model
- Solve for optimal policy given current model
- (using value or policy iteration)
- Take action according to an exploration/exploitation policy
- Explores more early on and gradually uses policy from 2
- Update estimated model based on observed transition
- Goto 2
Problems in Large Scale Model-Based RL
- New planning methods for given a model
- Model is large and not perfect
- Model learning
- Requiring generalization
- Exploration/exploitation strategy
- Requiring generalization and attention
Large Scale Model-Based RL
- New optimal planning methods (Today)
- Model is large and not perfect
- Model learning (Next Lecture)
- Requiring generalization
- Exploration/exploitation strategy (Next week)
- Requiring generalization and attention
Model-based RL
Deterministic Environment: Cross-Entropy Method
Stochastic Optimization
abstract away optimal control/planning:
Simplest method: guess and check: “random shooting method”
- pick from some distribution (e.g. uniform)
- Choose based on
Cross-Entropy Method (CEM) with continuous-valued inputs
Cross-entropy method with continuous-valued inputs:s
- Sample from some distribution
- Evaluate
- Pick the elites with the highest , where
- Update the distribution to be more likely to choose the elites
Pros:
- Very fast to run if parallelized
- Extremely simple to implement
Cons:
- Very harsh dimensionality limit
- Only open-loop planning
- Suboptimal in stochastic environments
Discrete Case: Monte Carlo Tree Search (MCTS)
Discrete planning as a search problem
Close-loop planning:
- At each state, iteratively build a search tree to evaluate actions, select the best-first action, and the move the next state.
Use model as simulator to evaluate actions.
MCTS Algorithm Overview
- Selection: Select the best-first action from the search tree
- Expansion: Add a new node to the search tree
- Simulation: Simulate the next state from the selected action
- Backpropagation: Update the values of the nodes in the search tree
Policies in MCTS
Tree policy:
- Select/create leaf node
- Selection and Expansion
- Bandit problem!
Default policy/rollout policy
- Play the game till end
- Simulation
Decision policy
- Selecting the final action
Upper Confidence Bound on Trees (UCT)
Selecting Child Node - Multi-Arm Bandit Problem
UCB1 applied for each child selection
- where is the mean reward of selecting this position
- is the number of times current(parent) node has been visited
- is the number of times child node has been visited
- Guaranteed we explore each child node at least once
- is some constant
Each child has non-zero probability of being selected
We can adjust to change exploration vs. exploitation trade-off
Decision Policy: Final Action Selection
Selecting the best child
- Max (highest weight)
- Robust (most visits)
- Max-Robust (max of the two)
Advantages and disadvantages of MCTS
Advantages:
- Proved MCTS converges to minimax solution
- Domain-independent
- Anytime algorithm
- Achieving better with a large branch factor
Disadvantages:
- Basic version converges very slowly
- Leading to small-probability failures
Example usage of MCTS
AlphaGo vs Lee Sedol, Game 4
- White 78 (Lee): unexpected move (even other professional players didn’t see coming) - needle in the haystack
- AlphaGo failed to explore this in MCTS
Imitation learning from MCTS: