Homework 5

Homework for Lecture 5: Monte Carlo 📝

Instructions:

- Show ALL Work, Neatly and in Order.
- No credit for Answers Without Work.
- Submit a single PDF file including all solutions.
- DO NOT submit individual files or images.
- For coding questions, submit ONE .py file with comments.

Note

For this homework, you only need numpy, gymnasium & pygame.

Coding Exercise 1: On-Policy Monte Carlo Control

For the GridWorldEnv environment, code the On-Policy Monte Carlo Control algorithm using the provided hyperparameters.

Coding Exercise 2: Off-Policy Monte Carlo Control

For the GridWorldEnv environment, code the Off-Policy Monte Carlo Control algorithm using the provided hyperparameters.