subject

Vaccum World Agent In this part of the assignment you will be writing a model-based reflex agent for the vacuum cleaner world. Implement in Python a performance-measuring environment simulator for the vacuum-cleaner world. Your implementation should be modular so that the sensors, actuators, and environment characteristics (size, shape, dirt placement, etc.) can be changed easily.
Continuum Vacuum World
Consider that the geography of the environment is not just two squares but a grid. The agent can go Up and Down as well as L and R. Consider also that the dirtiness of a grid square is not binary but is a continuum; thus the value is between 0 and 1. The objective is to pick up the maximum amount of dirt it can, within some time constraint, which is specified in terms of the number of moves. Your input includes a grid in the text file environ. txt, with a format like:
GRID: 8 5
DIRT:
0 0.5 0.8 0.1 0.1
0.1 0 0.5 0.5 0.5
0.3 0.5 0.4 0.3 0.2
0.3 0.1 0.7 0.8 0.2
0 0 0.2 0.8 0.3
0 0 0 0.5 0.1
0 0 0 0.5 0.1
0 0 0 0.2 0
MOVES: 30
INITIAL: 35
The grid starts from (1,1) so the robot is initially on the last square of row 3 (value is 0.2).Note that the performance measure in the book allows a 1000 moves, but we have far fewer moves here. "Suck" (S) empties all the dirt in a square, but constitutes a separate move from R, L, U, D. You have to implement your robot in Python.
The input interface must read this text file from the program line: vacuum_agent < environ. txt
At each step it should print out the move it makes and its performance score (e. g. S 0.2). Every 5 steps, it should print out a grid, with a "[ ]" on the square where the robot is now. Thus, with the above input, if the robot has done S U S L S, the output would be:
S 0.2
U 0.2
S 0.7
L 0.7
S 1.2
0 0.5 0.8 0.1 0.1
0.1 0 0.5 [0] 0
0.3 0.5 0.4 0.3 0
0.3 0.1 0.7 0.8 0.2
0 0 0.2 0.8 0.3
0 0 0 0.5 0.1
0 0 0 0.5 0.1
0 0 0 0.2 0
Please don't use any other interactions, so we can take a dump of all your output with: vacuum_agent < environ. txt > output. txt
Performance Measure: Cleaning a dirty square = value of dirt for that square
To-do List
1. Write a reflex program as in the ordinary vacuumWorld - it has no memory, no state and can only sense the present square. It can sense the value of dirt present in and also if any of the boundary edges are walls.
2. Consider that your robot can see the four neighbouring squares, and use a greedy algorithm to decide which square to go to. It should move randomly when choices are equal.
3. Consider that the robot has a knowledge of its grid square (state) and also has a memory (squares visited earlier and their values etc). It can see the four neighbouring squares. Design the best-performing robot. Also provide a comparison table showing how your robots A, B and C perform.

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 21:30, willwhitlock803
Write code using c . (take input from user) calculate the size of a given file in kbs. in this task you will complete the function with the following prototype: float get_file_size(char * filename); the function takes the file name (address to the start of a null terminated character array) as input. the function should then open the file and find the number of bytes it contains till eof. the number of bytes divided by 1024 will give the size in kbs. if the file cannot be opened the function should return -1.
Answers: 2
image
Computers and Technology, 22.06.2019 15:00, miracle9704
Atool that matches persoal skills qualities interests and talets to a career is called a
Answers: 1
image
Computers and Technology, 25.06.2019 01:00, jimmymurray29
When a new name is registered on the internet, the process can take two hours to four hours four hours to three days two hours to two days one hour to eight hours
Answers: 1
image
Computers and Technology, 25.06.2019 06:00, carolinagarciap8kgmi
In 2 to 3 sentences, describe how you would change the background of a group of cells
Answers: 1
You know the right answer?
Vaccum World Agent In this part of the assignment you will be writing a model-based reflex agent fo...

Questions in other subjects: