For the Grasses-planting problem, there are THREE squares that the farmer robot can be located and three possible actions Move Left (L), Move Right (R) and Plant-grass (P). Move Left (Right) in the Left-Most (Right-Most) square will stay in the same square. A Square can be either "with grasses" or "empty" . the objective of the farmber robot is to plant grasses on all the squares. An example state that the farmer robot located at the LEFT square and there are grasses on both the CENTER and the Right squares is given below.

a) Action sequence to complete the task for the above example:
P
Explanation: As all the other squares are planted it is the only action to plant grass.
b) There are 24 states considering robots position
0- Represents empty(without grass)
1- Represents with grass
R- Represents robot
R0- Represents robot without grass
R1-Represents robot with grass
possible states are:
1) R0, 0, 0
2) 0, R0, 0
3) 0, 0, R0
4) R0, 1, 1
5) 1, R0, 1
6) 1, 1, R0
7) R0, 1, 0
8) 1, R0, 0
9) 1, 0, R0
10) R0, 0, 1
11) 0, R0, 1
12) 0, 1, R0
13) R1, 0, 0
14) 0, R1, 0
15) 0, 0, R1
16) R1, 1, 1
17) 1, R1, 1
18) 1, 1, R1
19) R1, 1, 0
20) 1, R1, 0
21) 1, 0, R1
22) R1, 0, 1
23) 0, R1, 1
24) 0, 1, R1
c)
q1- is the initial state and it moves to left until it gets
stop(
represents to move left and
represents stop).
q2- is the left most side of farm.
q3- it is a state where actions of plant grass() only if land is empty
else it moves to another state without performing
operation(
).
q4- it is a new state after moving to right().
these states are repeated in a similar way for others
-
represents final state where all 3 blocks are filled with grass
d)These is the action sequence which is independent of state
L,L,L,P,R,P,R,P
L- represents move left
P- represents plant grass
R- represents move right
-> no matter where the robot is present it comes to left most position after these sequence L,L,L
->P represents to plant grass if it is empty or filled with grass.
->R action helps to move right.
these sequence is independent of the state.
Hope it is clear please comment for queries.
For the Grasses-planting problem, there are THREE squares that the farmer robot can be located an...
I need help with my programming assignment. The language used should be java and the algorithm should use search trees so that you play against the computer and he chooses the best move. The tree should have all possibilities on the leaves and you could use recursion to so that it populates itself. The game can be a 3*3 board (no need the make it n*n). Please put comments so that I can understand it. Thanks The game of ‘Walls’...
Saving The Universe Again Problem An alien robot is threatening the universe, using a beam that will destroy all algorithms knowledge. We have to stop it! Fortunately, we understand how the robot works. It starts off with a beam with a strength of 1, and it will run a program that is a series of instructions, which will be executed one at a time, in left to right order. Each instruction is of one of the following two types: C...
Java question for two classes: Given the upper limit n as a parameter, the result of both methods is a boolean[] array of n elements that reveals the answers to that problem for all natural numbers below n in one swoop. public static boolean[] sumOfTwoDistinctSquares(int n) Determines which natural numbers can be expressed in the form a 2 + b 2 so that a and b are two distinct positive integers. In the boolean array returned as result, the i...
Using the same information and data as was given in Problem 6, provide an 90% confidence interval for mean time advantage of right-hand over left-hand threads. Do you think that the time saved would be of practical importance if the task were performed many times - for example, by an assembly line worker? To help answer this question, find the mean time for right-hand threads as a percent of the mean time for left-hand threads. Be descriptive. by the same...
Maze Solving with Stacks Problem Statement Consider a maze made up of rectangular array of squares, such as the following one: X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Figure...
The following guidelines outline the basic template for a robot vacuum cleaner game. The game must be implemented in c programming language. It mimics a robotic vacuum cleaner. The code must only use the following libraries: #include <math.h> #include <stdlib.h> #include <string.h> #include <limits.h> and any .graphics and .timers libraries. The guidelines are outlined as follows: Terminal Set-up: you may assume that the terminal will be quite large, for example, on the order of 150×50, or more. Status Display: The...
The following guidelines outline the basic template for a robot vacuum cleaner game. The game must be implemented in c programming language. It mimics a robotic vacuum cleaner. The code must only use the following libraries: #include <math.h> #include <stdlib.h> #include <string.h> #include <limits.h> and any .graphics and .timers libraries. The guidelines are outlined as follows: Terminal Set-up: you may assume that the terminal will be quite large, for example, on the order of 150×50, or more. Status Display: The...
Programming Language: JAVA
Construct a program that uses an agent to solve a Sudoku
puzzle as a Constraint Satisfaction Problem, with the following
guidelines:
1. Since 3 x 3 puzzles are too trivial for a computer, your
program should use 4 x 4 puzzles (also known as Super Sudoku
puzzles; see Figure 2 for an example).
2. The program should read a Sudoku puzzle from a text file. The
user should be able to browse the file system to select...
================Data Structures C++=============== – Implement the Eight Queens Problem This is an object oriented program. This is #1 on page 187 of your book with ONE difference, I’m requiring you add a client program to test your code (a main). If you have the old book the question says “Complete the Queen and Board class for the Eight Queens problem.” On page 179 of your book is a function placeQueens that solves the Eight Queens problem. On page 180 of...
Assignment 2 In this assignment, you will write two short programs to solve problems using recursion. 1. Initial Setup Log in to Unix. Run the setup script for Assignment 2 by typing: setup 2 2. Towers of Hanoi Legend has it that in a temple in the Far East, priests are attempting to move a stack of disks from one peg to another. The initial stack had 64 disks threaded onto one peg and arranged from bottom to top by...