Reinforcement Learning MDP Assignment
Reinforcement Learning MDP Assignment
Monte Carlo methods do not require knowledge of transition models and can effectively learn from experiences, which is advantageous in environments where the model is unknown or complex. However, they rely on complete episodes and can have high variance in estimates. Dynamic programming techniques like Value Iteration and Policy Iteration are more efficient in environments with known models, allowing faster convergence to optimal policies with systematic updates but can be computationally expensive for large state spaces. The choice depends on model availability, computational resources, and the complexity of the environment .
The finite Markov Decision Process (MDP) framework can model the student's navigation by defining the states as the three locations: hostel, Bharti Airtel block, and mess. Actions correspond to moving between these locations or staying put, influenced by probabilities (e.g., 50% from hostel to Bharti Airtel block or mess based on hunger). Each transition carries a reward: -1 at the hostel, +3 at the Bharti Airtel block, and +1 at the mess, which reflects the student's satisfaction with each location .
The transition probabilities and reward structure can be represented in a table with states as rows, actions as columns, and cells containing pairs of transition probability and associated reward. For instance, from "Hostel," actions "To Bharti Airtel" and "To Mess" have transition probabilities of 0.5 and 1.0 with rewards of +3 and +1, respectively. Similarly, from "Bharti Airtel," transition to "Mess" has a 0.3 probability with a reward of +1, and staying has a probability of 0.7 with a reward of +3 .
An agent can learn an optimal policy in a grid-world environment using Monte Carlo techniques by implementing Exploring Starts. This method randomly initiates episodes from various states and actions, ensuring sufficient exploration across the state-action space. Incorporating techniques like epsilon-greedy policies can further enhance exploration by allowing occasional selection of non-greedy actions, preventing early convergence to suboptimal solutions. This thorough exploration helps the Monte Carlo approach converge to an optimal policy by adequately sampling diverse environmental dynamics .
The reward system signifies the student's preferences, motivating them to attend classes over staying in the hostel or being in the mess. The negative reward for the hostel (-1) discourages idleness or lack of productive activity, whereas a high reward for the Bharti Airtel block (+3) emphasizes academic engagement. A moderate reward for the mess (+1) reflects basic sustenance. During Policy Iteration, these reward values critically influence state evaluation, guiding the policy to favor transitions toward the Bharti Airtel block and mess, optimizing productivity and nutrition balance in the student's routine .
A quiver plot is chosen for visualization as it effectively represents the direction of optimal actions across multiple states in a grid. This allows viewers to quickly assess the recommended movements and understand the policy's strategy at a glance. Visualizing through quiver plots also helps identify patterns or unexpected behaviors in the policy that might require further investigation or validation. It bridges the computational outcomes with intuitive visual interpretation, facilitating communication of results .
The Monte Carlo method with Exploring Starts differs mainly in not relying on a model of the environment's dynamics. It uses repeated sampling to estimate the returns of states and uses these estimates to improve policies. It allows for randomness in policy exploration, starting episodes from random states and actions, ensuring diverse experiences. Value Iteration and Policy Iteration, however, rely on known transition and reward models to perform deterministic updates, systematically refining state values and policies .
Value Iteration computes the optimal values by iteratively updating state values based on future rewards, converging towards the optimal value function and policy. It provides a direct way to find the maximum expected reward by evaluating all possible actions at each state until the values stabilize. In contrast, Policy Iteration involves two steps: policy evaluation, which computes the value function under the current policy, and policy improvement, which updates the policy to select actions that maximize value. This cycle repeats until the policy is stable and optimal .
Policy iteration might converge faster in practice as it does not require the exhaustive value updates per iteration; instead, it focuses on policy stability. However, each policy evaluation step can be computationally expensive due to the requirement of solving linear systems. Value iteration, while typically requiring more iterations, performs simpler updates and is advantageous when dealing with larger state spaces as it incrementally improves values. Factors influencing choice include the size of the state space, available computational resources, and the trade-off between iteration speed and per-iteration complexity .
The introduction of one-way tunnels affects optimal policy computation by creating unique transition dynamics that need to be accommodated. These tunnels can create shortcuts or traps, which must be accurately modeled in the transition probabilities when performing Value Iteration. As the agent can suddenly relocate from one point to another via the tunnel, the value of states connected by the tunnel can change abruptly affecting the value update process. This unique feature influences path planning and requires careful consideration to accurately determine optimal states and actions .