Computers and Technology

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

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 20:10, ianmartin6080
Assume that minutes is an int variable whose value is 0 or positive. write an expression whose value is "undercooked" or "soft-boiled" or "medium-boiled" or "hard-boiled" or "overcooked" based on the value of minutes. in particular: if the value of minutes is less than 2 the expression's value is "undercooked"; 2-4 would be a "soft-boiled", 5-7 would be "medium-boiled", 8-11 would be "hard-boiled" and 12 or more would be a "overcooked".
Answers: 1
image
Computers and Technology, 22.06.2019 21:10, itsmichaelhere1
Dameas communication challenge is due to which factor
Answers: 2
image
Computers and Technology, 23.06.2019 14:30, Vanesssajohn2962
Norder to receive financial aid at his vocational school, mario must fill out the fafsa. the fafsa is a form that must be completed to determine . in order to complete a fafsa, you must submit . the fafsa can students obtain
Answers: 2
image
Computers and Technology, 23.06.2019 15:30, PlzNoToxicBan
The song about casey jones a railroad engineer who gives his life on the job would most likely gall under the folk song category of? a-work song b-nonsense song c-religious song d-ballad
Answers: 1
Do you know the correct 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
Health, 17.04.2020 21:07
Konu
Chemistry, 17.04.2020 21:07