RL 003
· 약 10분
Markov Property
- The future is independent of the past given the present state.
- The current state is sufficient to determine the future, without history.
Markov State
- : Time step
- : Next state
- : Current state
- : History (All previous states)
State Transition Probability
- Likelihood or probability of moving from one state to another state in the next time step .
- : Markov State
- : Successor State
- : Time step
- State transition matrix defines the transitions probabilities between all states to all successor states .
State Transition Matrix
- State transition matrix defines the transition probabilities between all states to all successor states .
- Probability of moving from state to is .
Math cal
Reinforcement Learning and Math Major Symbols
- : Transition Probability Matrix
- : State Space
- : Action Space
- : Reward Function
- : Loss Function
- : Normal Distribution
- : Dataset
- : Entropy / Hypothesis Space
Markov Process
Markov Chain
- What is going to be happened next?
- it goes through a sequence of states overtime.
- Stochastic Process: The next state is determined by the current state and the transition probability matrix that exhibits the Markov Property.
- Current state is independent of the past states.
- Memoryless: History of states leading up to the current state is not necessary to predict the next/future state.
- MP: , What states comes next?, Observer's Perspective.
- MRP: , How good/How much reward is this state in the long run?, Evaluator's Perspective.
- MDP: , What action should I take right now to maximize the long-term reward?, Decision Maker's Perspective.
- : a finite set of states.
- : a state transition matrix, defines the transitions probabilities from all states to all successor states .
- NO REWARD, NO ACTIONS.
Transition Diagram

- Box: where it ends
- Arrow: transitions
- Circle: states
- Number: probability of transitioning to the state
- S1: Calibration Site
- S2: Mineral Site
- S3: Water Site
- S4: Drill Site
- S5: Alien Remain Site
- S6: Lander Site
Markov Chain Episode
- A sequence of states from a starting state to a terminal state.
Episodic Task vs Continuous Task
| Feature | Episodic Tasks | Continuing Tasks |
|---|---|---|
| Termination | Has a well-defined terminal state () | Runs indefinitely without termination () |
| Real-World Examples | • Video games (e.g., Super Mario: level clear or death) • Navigation (reaching destination) • Board games (e.g., Chess: checkmate/draw) | • Smart thermostat (HVAC temperature control) • 24/7 industrial robotic process control • Automated trading & server load management |
| Execution Flow | Environment resets to a start state once finished | Operates continuously without automatic resets |
- Episodic Tasks: Tasks with a defined end/terminal state.
- Continuing Tasks: Tasks without a defined end/terminal state.
- It may require different MDP formulation and solution methods for each type of task.
Markov Reward Process
Markov Chain + Reward
- : a finite set of states.
- : a state transition matrix (Transition Dynamics)
- : a reward function to compute expected reward from a state.
- In the state , how much reward can you expect to get in the next time step?
- : a discount factor, to balance the immediate and future rewards.

Return
- : Goal Reward
- The sum of the rewards received from time step .
- : the sequence of rewards received after time step
- : terminal state
- : time step
Discount
- The present value of future rewards.
- : Myopic evaluation for maximizing immediate reward.
- : Far-sighted/Long-term evaluation for maximizing future reward.
Discounted Return
- : Discounted Return
- : Undiscounted Markov Reward Process, if all sequences terminate (like games)
Value Function
- The expected return from state .
- How much total reward can you expect to get starting from this state?
- A function returning the expected cumulative reward starting from state
Markov Decision Process
Markov Reward Process + Actions(Decisions)
- : a finite set of states.
- : a finite set of actions.
- : a state transition matrix
- : a reward function
- : a discount factor

Policy
- Policy specifies what actions to take in each state.
- The agent's playbook for any given state.
- It fully defines the behavior of the agent.
- MDP's policy does not depends on history, only on the current state.
Value Function of a Policy
- The state value function is the expected return starting from state and following policy .
- How good it is to be in state (under policy )?
- The expected return of taking action in state , taking action and then following policy .
- : a quality of action in state (under policy ).
| Feature | State-Value Function () | Action-Value Function () |
|---|---|---|
| Decision Flow | Follows policy right from state | Commits to action first, then follows policy |
| Intuitive Question | "How good is it to be in this state?" | "How good is it to take this specific action in this state?" |
Solving MDPs
Goal: Find optimal policy that maximizes the expected return.
- Using Value Iteration or Policy Iteration.
- Updating value functions and policies iteratively until convergence.
- Evaluation: Compute the value function for a given policy .
- Improvement: Update the policy to choose better actions based on the updated value function.
- To converge to the optimal value function and policy
POMDPs
MDPs with hidden states.
- : a finite set of states
- : a finite set of actions
- : a finite set of observations
- e.g. driving in foggy weather.
- : a state transition matrix
- : a reward function
- : an observation function
- an observation function specifying the probability of receiving observation given state and action
- After taking action and landing in state , how likely is the agent to observe ?
- : a discount factor
- e.g.
- Robot navigation with noisy/uncalibrated sensors.
- Autonomous Driving with Sensor uncertainty due to bad weather conditions and unexpected events.
Finite Horizon MDPs
- Finite Time Steps (): A sequential decision-making process restricted to a fixed, finite number of steps () to maximize cumulative rewards.
- Target Applications: Well-suited for problems with explicit deadlines or time-varying environment dynamics.
- Decision Basis: Optimal decisions are made using current state (), available actions (), transition probabilities (), and immediate rewards ().
- Representative Example: A robot navigating a grid world with a limited step count or battery budget to reach a goal while avoiding obstacles.
- Discount Factor (): Because the horizon is finite, the cumulative return cannot diverge to infinity, allowing the use of undiscounted formulations ().
- Time-Dependent (Non-Stationary) Policy:
- Unlike infinite-horizon MDPs, the optimal action depends explicitly on the remaining time steps ().
- Policy Notation: (indexed by time step ).
- Intuition: An agent may play conservatively early on, but take high-risk, high-reward actions right before the deadline.
| Dimension | Finite-Horizon MDP | Infinite-Horizon MDP |
|---|---|---|
| Time Horizon () | (Explicit terminal step) | (Perpetual / ongoing) |
| Policy Nature | Non-Stationary (, changes over time) | Stationary (, time-invariant) |
| Discount Factor () | ( is valid) | Typically required for convergence |
| Objective Function |
Limitations of MDPs
- Markovian Assumption: Assumes future transitions depend solely on the current state , ignoring past historical trajectories and temporal dependencies that matter in real-world dynamics (e.g., momentum, acceleration).
- State augmentation, frame stacking, RNN/Transformer, POMDP
- Complete Knowledge Requirement: Assumes exact a priori knowledge of transition probabilities and reward functions , which are rarely accessible without sample-based learning in complex environments.
- Model-free RL: Q-learning, SARSA, Policy Gradient
- Finite State and Action Spaces: Restricted to discrete and countable sets, whereas real-world robotics and physical control tasks typically involve continuous states and actions.
- Function approximation, Actor-Critic: DDPG, TD3, SAC, PPO
- Curse of Dimensionality: Tabular value and policy storage scale exponentially as state dimensions grow (), making high-dimensional environments (e.g., raw pixel inputs) computationally intractable.
- Deep RL: neural approximation of , , or
- Partial Observability: Assumes full access to the true ground-truth state (), failing to account for real-world sensor noise, occlusions, and incomplete observations.
- POMDP, belief-state estimation, recurrent policies