Note that the position of rovers is (x,y), but the grid world is represented differently. (0,0) in the gird world represents the top left corner rather than the bottom left that it normally is. In other words, think of the grid world as the fourth quadrant (positive x, negative y) rather than the first quadrant. This was done to mirror the indexing of arrays. Also note that since the grid world is represented as a 2-D array, the indecies of x and y position are flipped. This means that a robot at position (x,y) is at index grid[y, x] since arrays are [column, row]. This is also relevant when visualizing the graph (visualize function) where the grid is an array of arrays. We put robot at position (x,y) in grid[y][x]. The step function in GridWorld will check that the result of the actions don't put a robot out of bounds. If it does, it just snaps the robot to the boundary. Thus, invalid actions can be passed to the step function, but the positions of the robots should never be invalid.
venkateshsripada/multiagent-learn
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|