subject

IN JAVA There is a 10x10 grid map. Each cell of that grid can either be empty, have a wall, be marked as a starting location, or be marked as a goal location. In this project you will write a search-based agent to create a plan that will lead your agent from the starting location to some goal location without entering cells marked as walls. You may choose any algorithm from chapter 2, but be sure to have a justification as to why you chose that algorithm(depth first search).
Your program will take as a command line argument a file name. This file represents the map, and will contain 100 integers (as text) separated by whitespace. The grid is stored in row major order. That is, the first 10 integers represent the first row of the map. The next 10 integers represent the second row, and so on. Each integer is as follows:
0: This cell is empty
1: This cell is the starting cell. There will be exactly one such cell, and will always appear in the first row.
2: This cell is a goal cell. There could be any number of such cells, and can appear anywhere.
3: This cell is a wall. The agent is unable to enter this space.
Your agent will have four possible actions:
Move Left Move the agent one cell to the left (decrease it’s column number by 1) Move Right Move the agent one cell to the right (increase it’s column number by 1) Move Up Move the agent one cell upwards (decrease it’s row number by 1)
Move Down Move the agent one cell downwards (increase it’s row number by 1)
A move that will cause the agent to leave the map or enter a wall cell will have no affect. The output will be a sequence of actions represented by the direction each on its own line. So as an example, suppose your search results in the following solution: Move Left, Move Down, Move Down, Move Right. The output would look like:
Left
Down
Down
Right

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 19:30, mitalichavez1
When creating a presentation in libre office impress, where does the editing of slides take place? a. the slides panel b. the center panel c. the tasks panel, under the masters pages tab d. the tasks panel, under the layouts tab
Answers: 3
image
Computers and Technology, 23.06.2019 02:30, noah2o2o
These factors limit the ability to attach files to e-mail messages. location of sender recipient's ability to open file size of file type of operating system used
Answers: 2
image
Computers and Technology, 24.06.2019 12:30, stephanieanaya7
Why does the pc send out a broadcast arp prior
Answers: 1
image
Computers and Technology, 24.06.2019 21:40, jose4197
Clunker motors inc. is recalling all vehicles in its extravagant line from model years 1999—2002 as well as all vehicles in its guzzler line from model years 2004—2007. a boolean variable named recalled has been declared. given a variable modelyear and a string modelname, write a statement that assigns true to recalled if the values of modelyear and modelname match the recall details and assigns false otherwise.
Answers: 2
You know the right answer?
IN JAVA There is a 10x10 grid map. Each cell of that grid can either be empty, have a wall, be mark...

Questions in other subjects:

Konu
Mathematics, 03.03.2020 18:27