RL 006
· 약 4분
Known MDP vs Unknown MDP
| Aspect | Known MDP | Unknown MDP |
|---|---|---|
| Environment Knowledge () | Full knowledge of state transition dynamics and reward function | and are unknown; agent must explore the environment |
| Problem Approach | Well-defined optimization problem Pure planning via computation | Trial-and-error interaction Must learn and optimize simultaneously |
| Primary Goal | Directly compute the optimal policy () | Learn and optimize policies without prior model knowledge |
| Representative Methods | Value Iteration, Policy Iteration (Dynamic Programming) | Monte Carlo, Q-Learning, SARSA (Reinforcement Learning) |
| Paradigm | Model-based (Planning) | Model-free (Reinforcement Learning) |
Model-based vs Model-free
| Aspect | Model-Based Learning | Model-Free Learning |
|---|---|---|
| Model Access () | Has full access to transition dynamics and reward function | No access to environment dynamics ( and are unknown) |
| Optimization Approach | Direct mathematical computation and planning using the known model | Direct learning and trial-and-error optimization through interaction |
| Estimation Source | Computes values and optimal policy via dynamic programming equations | Estimates , and directly from sampled experience |
| Computation vs. Sampling | Pure computation / Planning (requires no real-time environment sampling) | Sample-based learning (requires trajectories / episodic experience) |
| Typical Methods | Policy Iteration, Value Iteration (DP) | Monte Carlo Methods, TD Learning, Q-Learning, SARSA |
Monte Carlo Methods
- A Computational technique that uses random sampling and statistical methods to solve complex problems and estimate numerical results.
- Named after the Monte Carlo Casino in Monaco.
- It means Estimate an unknown quantity by sampling, and averaging what you observe.
- Used fo any estimation method whose operation involves a significant random component.
- Used in mathematics, physics, engineering, finance, computer science, etc.
- It is particularly valuable when an analytical solution is difficult or impossible to obtain.
Estimating by Sampling (Monte Carlo Simulation)
- Mechanism:
- Generate uniform random points .
- Count points falling inside the unit circle ().
- Estimate via area proportions:
- Empirical Validation:
- Total samples (): points
- Estimated value:
- Relative error: from true value ()

Monte Carlo Prediction
- : Mean of the returns/rewards
- Model-Free Learning: Operates without prior knowledge of transition dynamics or reward function .
- Learning from Complete Episodes: Learns state-value functions exclusively from full trajectories under policy . Only works for episodic tasks where termination at step is guaranteed.
- No Bootstrapping: Does not update estimates using other value estimates ; instead, updates rely solely on actual empirical returns observed at the end of the episode.
- Empirical Mean Returns: The value of state is estimated by the sample average of all observed returns starting from :
An Episode of Experience & Return Formulation
- Trajectory Structure:
- Discounted Return ():
- Discount Factor (): For episodic tasks with terminal-only rewards (such as Blackjack), setting is standard practice because the episode length is finite.
First-Visit Monte Carlo
- First-Visit MC estimates the value function by averaging returns following only the first occurrence of state within each sampled episode.
- Algorithmic Flow:
- Initialize counters and accumulate returns:
- Sample a complete episode generated under policy
- Compute return from step to termination.
- Only for the first time step where state appears in episode :
- (Increment counter for total first visits)
- (Increment total return)
- (Update the value by mean return)
| State s | |||
|---|---|---|---|
| A | 1 | 9 | 9.00 |
| B | 1 | 8 | 8.00 |
| C | 1 | 5 | 5.00 |