CSE 151 Introduction to Artificial Intelligence Programming Assignment 2 Reinforcement learning in the Grid world Due date to be specified. 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 algorithm. Part 1: The Grid World For the first part of the assignment, you will be constructing the basic framework for the grid world. Write a function called "read_grid" that takes the name of 4 files and the number of rows and columns and reads the grid specified in the files (you may find the read_bn_file.m from last assignment useful for writing this function). 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: