Question: Task 2: The Table Driven Agent The table agent uses a simple look-up table to od the agent's actions. In this task, you will code

 Task 2: The Table Driven Agent The table agent uses a

Task 2: The Table Driven Agent The table agent uses a simple look-up table to od the agent's actions. In this task, you will code up a very simple agent program that uses the table to guide the agent to the goal location. Write an agent program MyTableAgent.java. The table itself will be an array of directions in which the agent should face in order to proceed towards the goal. For example, create an agent MyTableAgent.java and declare an integer array directionTable: int[][] directionTable-new int[5] [5]; For example, the table should direct the agent right if it resides in the first grid cell (0,0): direction Tablelo1i]-Right; Fill in the rest of the table so that agent wil make its way to the goal in the environment. Use this table with the moveLeft0, moveRight0, moveUp) and moveDownO to get your agent to the goal. Confirm the agent program works (all dirt cleaned). Note: Read chapters in the book about the Table Driven Agent

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!