artificial intelligence assignment 2
TRANSCRIPT
ARTIFICIAL INTELLIGENCEASSIGNMENT 2
Submitted By
Ankit Vij
10103007
CSE
1
INDEXSR. No. QUESTION PAGE No.
1Write a pseudo code to implement the
functioning of a Vacuum Cleaner? 3
2
Write PEAS model for a. Robot Soccer Player
b. Internet Book Shopping c. Mathematical theorem proving assistant
d. Government Also identify the common actuators and
sensors that used in the above cases?
4-5
3 Write PEAS model for mars Rover? 5
2
Q1. Write a pseudo code to implement the functioning of a Vacuum Cleaner?
A1. The functioning of the vacuum cleaner can be represented with the help of a function that takes as parameters the location and condition of the room in which it is and returns an appropriate action according to the following rule:
Percept Sequence Action
[A, Clean][A, Dirty][B, Clean][B, Dirty]
[A, Clean], [A, Clean][A, Clean], [A, Dirty]
::
RightSuckLeftSuckRightSuck
::
The pseudo code of the function performing this action is as follows:
function VACUUM_CLEANER(location, condition) returns action{
if condition = Dirty then return Suckelse if location = A then return Rightelse if location = B then return Left
}
Thus if we provide the above function with an appropriate location and condition of the room the function “VACUMM_CLEANER” with take an appropriate action. The location and condition of the room will have to be sensed by the vacuum cleaner i.e. the environment needs to be sensed. This can be done with the help of sensors. The required action that needs to be taken can be done with the help of actuators.For example:If the vacuum cleaner senses the location as A and condition as dirty the function will perform the Suck action as required from the Vacuum Cleaner.
3
Q2. Write PEAS model for a. Robot Soccer Player b. Internet Book Shopping c. Mathematical theorem proving assistant d. Government Also identify the common actuators and sensors that used in the above cases?
A2.
a. ROBOT SOCCER PLAYER
Performance Environment Actuators SensorsWinning , losing, Accuracy, speed, skills
Football field, players including teammates and opponents, audience, referees
Steering, display, brakes, accelerator, actuator for kicking the ball, Metallic legs, head and upper body
Orientation sensors, Camera, proximity sensor, intensity control sensor, impact sensor, communicators, wheel/joint encoders
b. INTERNET BOOK SHOPPING
Performance Environment Actuators SensorsCost, quality, relevance, correct edition
Internet, browser Add a new order, retrieve existing order information, display information to user
Website interface, Web pages, buttons or hyperlinks clicked by users, camera
c. MATHEMATICAL THEOREM PROVING ASSISTANCE
Performance Environment Actuators SensorsTime requirement, degree of correction
The theorem to prove, existing axioms, library
Display, keyboard Camera, Input device that reads the theorem to prove
4
d. GOVERNMENT
Performance Environment Actuators SensorsWinning the election, inflation control, running country/state, support the people
Opposition, voters, state/country
Display, implementing decisions, collection and analysis of data and problems, transmitting devices
Camera, emotion sensors, touch sensors, receiving devices
COMMON ACTUATORS AND SENSORS:
ACTUATORS:
The common actuator that is used in all the above cases is display devices.
SENSORS:
The common sensor that is used in all the above devices is a camera
Q3. Write PEAS model for mars Rover?
A3.
Performance Environment Actuators SensorsCollect, analyze and explore samples on Mars
Mars, vehicle, lander Collection , analysis, and motion devices, radio transmitter, wheels, legs
Camera, touch sensors, accelerometers, orientation sensors, wheel/joint encoders, radio receiver
5