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

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 00:40
Consider the following statements: struct nametype{string first; string last; }; struct coursetype{string name; int callnum; int credits; char grade; }; struct studenttype{nametype name; double gpa; coursetype course; }; studenttype student; studenttype classlist[100]; coursetype course; nametype name; mark the following statements as valid or invalid. if a statement is invalid, explain why.a.) student.course.callnum = "csc230"; b.) cin > > student.name; c.) classlist[0] = name; d.) classlist[1].gpa = 3.45; e.) name = classlist[15].name; f.) student.name = name; g.) cout < < classlist[10] < < endl; h.) for (int j = 0; j < 100; j++)classlist[j].name = name; i.) classlist.course.credits = 3; j.) course = studenttype.course;
Answers: 1
question
Computers and Technology, 23.06.2019 01:20
Write a function balancechemical to balance chemical reactions by solving a linear set of equations. the inputs arguments are: reagents: symbols of reagents in string row array products: symbols of products in string row array elements: elements in the reaction in string row array elcmpreag: elemental composition of reactants in two dimensional numeric array elcmpprdcts: elemental composition of prducts in two dimensional numeric array hint: the first part of the problem is setting up the set of linear equations that should be solve. the second part of the problem is to find the integers from the solution. one way to do this is to mulitiply the rational basis for the nullspace by increasing larger integers until both the left-and right-side integers exist. for example, for the reaction that involves reacting with to produce and : reagents=["ch4", "o2"]; products =["co2", "h2o"]; elements =["c","h", "o"] elcmpreag=[1,4,0;
Answers: 3
question
Computers and Technology, 23.06.2019 18:00
File account.java (see previous exercise) contains a definition for a simple bank account class with methods to withdraw, deposit, get the balance and account number, and return a string representation. note that the constructor for this class creates a random account number. save this class to your directory and study it to see how it works. then write the following additional code: 1. suppose the bank wants to keep track of how many accounts exist. a. declare a private static integer variable numaccounts to hold this value. like all instance and static variables, it will be initialized (to 0, since it’s an int) automatically. b. add code to the constructor to increment this variable every time an account is created. c. add a static method getnumaccounts that returns the total number of accounts. think about why this method should be static - its information is not related to any particular account. d. file testaccounts1.java contains a simple program that creates the specified number of bank accounts then uses the getnumaccounts method to find how many accounts were created. save it to your directory, then use it to test your modified account class.
Answers: 3
question
Computers and Technology, 23.06.2019 22:30
Janice usually works on a particular workbook that contains all business related data. she decides to keep a backup of all the data in a separate workbook. she opens a new workbook to transfer the data. which option should she use to copy all the data from one workbook to another workbook?
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
question
English, 10.03.2020 01:39
question
Biology, 10.03.2020 01:39