CSE 151 Introduction to Artificial Intelligence Programming Assignment 2 Markov Decision Processes in the Grid world Due date is specified in the referencing page. RULES: - You will be responsible for any updates to the assignment that are posted to the discussion board, so please check it regularly. - The programs must be written in Matlab - Programs must be submitted using the turnin procedure by 11:59pm on the due date - You may work in groups of two or three - Turn in a writeup and all the source files (see what to turn in below) - Make sure to comment your code! This means have comments describing each function as well as comments throughout the code. In this assignment, you will begin constructing an infrastructure for reinforcement learning methods, as well as implement the value iteration and policy iteration algorithms. Infrastructure: The Grid World We will provide you with the function "read_grid", which will do the boring stuff of reading in a grid world description. This constructs the basic framework for the grid world. "read_grid" takes as parameters the number of rows and columns and the names of 4 files which describe the world. (This is clunky, but it is easier than starting from scratch). It reads the grid specified in the files. NOTE: We will NOT be using the same labeling convention as the book. We're going to use a row, column representation so that it matches up with matlab. The top left corner is 1, 1 and the bottom right corner is rows, columns. Specifically, function grid_world = read_grid(rows, columns, obstacles_file, terminals_file, rewards_file, moves_file) rows: the number of rows in the grid world columns: the number of columns in the grid world obstacles file: File containing row, column coordinates for the obstacles in the grid row column . . . row column terminals_file: File containing x, y coordinates for the terminal squares in the grid row column . . . row column rewards_file: The reward for each square (state) of the grid world reward(1, 1) reward(1, 2) ....reward(1, columns) . . . reward(rows, 1) reward(rows, 2) ... reward(rows, columns) moves_file: We'll use the same actions in the book (i.e. North, South, East, West) with a probabilistic move formulation. The moves file specifies the probability of moving in each of the four directions, given that the agent has chosen to go in a given direction. There should be one line for each of (N, S, E, W) and each line should consist of the following: