Question Bank of AI Unit Test1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

Question bank of AI Unit test 1

1. Develop a PEAS description of the task environment.’

We need to describe the PEAS for the “bidding on an item at an auction” activity. PEAS
stands for Performance measures, Environment, Actuators, and Sensors. what these
terms mean individually are shown below:
 Performance measures: These are the parameters used to measure the
performance of the agent. How well the agent is carrying out a particular
assigned task.
 Environment: It is the task environment of the agent. The agent interacts with
its environment. It takes perceptual input from the environment and acts on the
environment using actuators.
 Actuators: These are the means of performing calculated actions on the
environment. For a human agent; hands and legs are the actuators.
 Sensors: These are the means of taking the input from the environment. For a
human agent; ears, eyes, and nose are the sensors.
Let us come back to the auction activity.
Performance measures:
1. Cost of the item
2. Quality of the item
3. Value of the item
4. Necessity of the item
Environment:
1. Auctioneer
2. Bidders
3. Bidders Items which are to be bid
Actuators: (means to perform the activity)
1. Speakers
2. Microphones
3. Display items
4. Budget
Sensors: (means to perceive the environment)
1. Camera
2. Price monitor, where prices are being displayed.
3. Eyes
4. Ears of the attendees.
2. PEAS Descriptor of Disputter
Performance − Efficiency, safety (doesn't collide with any people), battery life, recall
(collects all the dirty dishes), accuracy (only collects dirty dishes), damage control
(doesn't damage any kitchen equipment), and recall (collects only dirty dishes)
Environment − a space, a sink, a counter, a stove, a dishwasher, several dish kinds,
dishwashing soap, people, a potentially spill-prone floor, and a counter
Actuators − Wheels, cushioned claws, a music speaker, a battery
Sensors − Lasers to assess room layout and any moving objects to prevent collisions,
vision sensors (for dish type, position, degree of grime, and dishwasher "fullness"), and
a texture sensor for the floor to detect spills.
2. Give complete state space formulation for any problem.

3. Give state space representation for water jug problem.

You are given with 2 Jugs, 4 Gallon and a 3 Gallon


one. Neither of the jugs has any Measuring marks
on it. There is a pump that can be used to fill the
jugs with water. How can we get exactly 2 Gallons
of water in 4 Gallon Jug?

Introduction:

 Water Jug Problem is a classic problem in Artificial Intelligence (AI)


that involves finding a way to measure specific amounts of water
using two jugs with different capacities.
 The goal is to reach a specific target amount of water in one of the
jugs, without exceeding its capacity, by transferring water from one
jug to another.
 This problem can be solved using a state space search algorithm.

State Space Search:

 State space search is a technique used in AI to find the solution to a


problem by searching through the state space of a problem.
 In this approach, the problem is represented as a graph with nodes
as states and edges as transitions.
 The search algorithm starts at an initial state and explores the graph
to reach the goal state.
 In the water jug problem, the state space can be represented as a
tuple (x, y) where x and y are the amounts of water in the two jugs.
 The initial state is (0, 0) and the goal state is (x, y)
Production Rules:

Production rules, also known as rules or heuristics, are used in state space
searches to define the actions that can be taken to move from one state to
another. In the water jug problem, there are six possible actions:

1. Fill the first jug to its capacity.


2. Fill the second jug to its capacity.
3. Empty the first jug.
4. Empty the second jug.
5. Pour water from the first jug to the second jug until either the first
jug is empty or the second jug is full.
6. Pour water from the second jug to the first jug until either the first
jug is full or the second jug is empty.
The operators to be used to solve the problem can be describes as shown below. They are
represented as rules whose left side are matched against the currnent state and whose right side
describes the new state that results from applying the rules.
We have two jugs a 4 gallon and a 3 gallon.
Consider the following Rule set:

1. (x,y)->(4,y) fill the 4 gallon jug

If x<4.

1. (x,y)->(x,3) fill the 3 gallon jug

If x<3

1. (x,y)->(x-d,y) pour some water out of the 4-gallon jug.

If x>0

1. (x,y)->(x-d,y) pour some water out of the 3-gallon jug.

If y>0

1. (x,y)->(0,y) empty the 4-gallon jug on the ground

If x>0

1. (x,y)->(x,0) empty the 3-gallon jug on the ground

If y>0
1. (x,y)->(4,y-(4-x)) pour water from the 3-gallon jug into the 4-gallon

If x+y>=4 and y>0 jug until the 4-gallon jug is full

1. (x,y)->(x-(3-y),3)) pour water from the 4-gallon jug into the 3-gallon

If x+y>=3 and x>0 jug until the 3-gallon jug is full.

1. (x,y)->(x+y,0) pour all the water from the 3-gallon jug into

If x+y<=4 and y>0 the 3-gallon jug.

1. (x,y)->(0,x+y) pour all the water from the 4-gallon jug into

If x+y<=3 and x>0 the 3-gallon jug.


1. (0,2)->(2,0) pour the 2-gallon from the 3-gallon jug into the 4-gallon jug.
2. (2,y)->(0,x) empty the 2 gallon in the 4 gallon on the ground.
Production of the water jug problem:

4. Give complete state space formulation for the


5. List and explain components of AI. What is Turing test?

Artificial intelligence is the simulation of human intelligence processes by machines, especially computer
systems. Specific applications of AI include expert systems, natural language processing, speech
recognition and machine vision.

Learning
Learning in AI occurs when machines or computer systems memorize specific data or new
material. Specifically, advancements in deep machine learning now enable enhancements in
prescriptive and predictive analytics through the use of operational data.
AI Reasoning
AI uses the ability to make inferences when applying reasoning based on commands it is
given or other information at its disposal. For example, virtual assistants will offer restaurant
recommendations based on the specific orders or questions it receives.

The assistant will use reasoning to decide what restaurants to suggest based on the questions it
received and the nearest location of various restaurants.

Problem Solving
In the most basic of terms, an AI's problem-solving ability is based on the application and
manipulation of data, where the solution needs to be x.

Alternatively, in more advanced applications, problem-solving techniques in the context of AI


can include the development of efficient algorithms and performing root cause analysis with
the goal of discovering a desirable solution.

AI implements heuristics when solving problems by devising a solution using trial and error
techniques.

Perception
Perception is when different sense organs, whether real or artificial, scan the environment. For
example, AI scans the environment through sense components such as temperature sensors
and cameras.

Autonomous driving is an example of how AI implements perception. They are able to


perceive and comprehend the environment around them, including traffic lights, road lines,
and weather conditions.

Processing Language
AI processes language in something as seemingly simple as spellcheck and autocorrect.
Computer programs use neural networks to scan large bodies of text for misspelled words and
language irregularities.

Another way AI uses language processing is when it weeds out spam in email systems. For
example, spam filters delegate specific messages as spam when seeing certain words or
combinations of words.
Tuing problem

Alan Turing proposed a simple method of determining whether a machine can


demonstrate human intelligence.
The turning judges the conversational skills of humans. According to this test, a
computer program can think of a proper response for humans. This test matches the
conversational data from the existing data through an algorithm and back respond to
humans.
Imagine a game of three players having two humans and one computer, an
interrogator(as a human) is isolated from the other two players. The interrogator’s job is
to try and figure out which one is human and which one is a computer by asking
questions from both of them. To make things harder computer is trying to make the
interrogator guess wrongly. In other words, computers would try to be indistinguishable
from humans as much as possible.

The “standard interpretation” of the Turing Test, in which player C, the


interrogator, is given the task of trying to determine which player – A or B – is a
computer and which is a human. The interrogator is limited to using the responses
to written questions to make the determination

The conversation between interrogator and computer would be like this:


C(Interrogator): Are you a computer?
A(Computer): No

C: Multiply one large number to another, 158745887 * 56755647


A: After a long pause, an incorrect answer!

C: Add 5478012, 4563145


A: (Pause about 20 seconds and then give an answer)10041157

If the interrogator wouldn’t able to distinguish the answers provided by both humans and
computers then the computer passes the test and the machine(computer) is considered as
intelligent as a human. In other words, a computer would be considered intelligent if its
conversation couldn’t be easily distinguished from a human’s. The whole conversation
would be limited to a text-only channel such as a computer keyboard and screen.

6.Explain different approaches of AI or AI subsystem.


What are the Different Types of Artificial
Intelligence Approaches?
While everything seems green and sunny to a non-specialist, there is a lot of technology to
build AI systems. There are four types of artificial intelligence approaches based on how
machines behave - reactive machines, limited memory, theory of mind, and self-awareness.

1. Reactive machines
These machines are the most basic form of AI applications. Examples of reactive machines
are Deep Blue, IBM's chess-playing supercomputer, and the same computer that defeated the
then-grand master of the world.

AI teams do not use training sets to feed the machines or store subsequent data for future
references. Based on the move made by the opponent, the machine decides/predicts the next
move.

2. Limited memory
These machines belong to the Category II category of AI applications, and Self-propelled cars
are the perfect example. Over time, these machines are fed with data and trained on the speed
and direction of other cars, lane markings, traffic lights, curves of roads, and other important
factors.

3. Theory of mind
It is where we are struggling to make this concept work. However, we are not there yet. Theory
of mind is the concept where bots will understand and react to human emotions, thoughts.
If AI-powered machines are always mingling and moving around with us, then understanding
human behavior is imperative. And then, it is necessary to react to such behaviors accordingly.

4. Self-awareness
These machines are an extension of class III type AI, and it is a step ahead of understanding
human emotions. It is the stage where AI teams build machines with self-awareness factors
programmed into them.

When someone is honking the horn from behind, the machines must sense the emotion, and
only then do they understand what it feels like when they horn someone from behind.

7. Define Agent and its components.

In artificial intelligence, an agent is a computer program or system that is designed to


perceive its environment, make decisions and take actions to achieve a specific goal or
set of goals. The agent operates autonomously, meaning it is not directly controlled by a
human operator.
Agents can be classified into different types based on their characteristics, such as
whether they are reactive or proactive, whether they have a fixed or dynamic
environment, and whether they are single or multi-agent systems.

8. Explain different types of environment and different types of agents.

An environment in artificial intelligence is the surrounding of the agent. The agent takes
input from the environment through sensors and delivers the output to the environment
through actuators. There are several types of environments:
 Fully Observable vs Partially Observable
1. Fully Observable vs Partially Observable
 When an agent sensor is capable to sense or access the complete state of an
agent at each point in time, it is said to be a fully observable environment else it
is partially observable.
 Maintaining a fully observable environment is easy as there is no need to keep
track of the history of the surrounding.
 An environment is called unobservable when the agent has no sensors in all
environments.

 Deterministic vs Stochastic
 The deterministic environment is not random in nature which is unique and be
completely determined by the agent.
 The stochastic environment is random in nature which is not unique and cannot be
completely determined by the agent.

 Competitive vs Collaborative
 An agent is said to be in a competitive environment when it competes against
another agent to optimize the output.
 The game of chess is competitive as the agents compete with each other to win
the game which is the output.
 An agent is said to be in a collaborative environment when multiple agents
cooperate to produce the desired output.

 Single-agent vs Multi-agent
4. Single-agent vs Multi-agent
 An environment consisting of only one agent is said to be a single-agent
environment.
 A person left alone in a maze is an example of the single-agent system.
 An environment involving more than one agent is a multi-agent environment.
 The game of football is multi-agent as it involves 11 players in each team.

Static vs Dynamic

 An environment that keeps constantly changing itself when the agent is up with
some action is said to be dynamic.
 A roller coaster ride is dynamic as it is set in motion and the environment keeps
changing every instant.
 An idle environment with no change in its state is called a static environment.
 An empty house is static as there’s no change in the surroundings when an agent
enters.
TYPES
Agents can be grouped into five classes based on their degree of perceived intelligence and
capability. All these agents can improve their performance and generate better action over the
time. These are given below:

1. Simple Reflex agent:


o The Simple reflex agents are the simplest agents. These agents take decisions on the basis of the
current percepts and ignore the rest of the percept history.
o These agents only succeed in the fully observable environment.
o The Simple reflex agent does not consider any part of percepts history during their decision and
action process.

Problems for the simple reflex agent design approach:


o They have very limited intelligence
o They do not have knowledge of non-perceptual parts of the current state

2. Model-based reflex agent


o The Model-based agent can work in a partially observable environment, and track the situation.
o A model-based agent has two important factors:
o Model: It is knowledge about "how things happen in the world," so it is called a Model-
based agent.
o Internal State: It is a representation of the current state based on percept history.
o These agents have the model, "which is knowledge of the world" and based on the model they
perform actions.

3. Goal-based agents
o The knowledge of the current state environment is not always sufficient to decide for an agent to
what to do.
o The agent needs to know its goal which describes desirable situations.
o Goal-based agents expand the capabilities of the model-based agent by having the "goal"
information.
o They choose an action, so that they can achieve the goal.

4. Utility-based agents
o These agents are similar to the goal-based agent but provide an extra component of utility
measurement which makes them different by providing a measure of success at a given state.
o Utility-based agent act based not only goals but also the best way to achieve the goal.

5. Learning Agents
o A learning agent in AI is the type of agent which can learn from its past experiences, or it has
learning capabilities.
o It starts to act with basic knowledge and then able to act and adapt automatically through
learning.
o A learning agent has mainly four conceptual components, which are:

a. Learning element:
b. Performance element:

c. Critic:

d. Problem generator:

9. Explain informed search techniques with suitable example

The informed search algorithm is more useful for large search space. Informed search algorithm
uses the idea of heuristic, so it is also called Heuristic search.
Heuristics function: Heuristic is a function which is used in Informed Search, and it finds the
most promising path. It takes the current state of the agent as its input and produces the
estimation of how close agent is from the goal.

Pure Heuristic Search:


Pure heuristic search is the simplest form of heuristic search algorithms. It expands nodes based
on their heuristic value h(n). It maintains two lists, OPEN and CLOSED list. In the CLOSED list, it
places those nodes which have already expanded and in the OPEN list, it places nodes which
have yet not been expanded.

In the informed search we will discuss two main algorithms which are given below:

o Best First Search Algorithm(Greedy search)


o 1.) Best-first Search Algorithm (Greedy
Search):
o Greedy best-first search algorithm always selects the path which appears best at that
moment. It is the combination of depth-first search and breadth-first search algorithms. It
uses the heuristic function and search. Best-first search allows us to take the advantages
of both algorithms.
The greedy best first algorithm is implemented by the priority queue.

Advantages:

o Best first search can switch between BFS and DFS by gaining the advantages of both the
algorithms.
o This algorithm is more efficient than BFS and DFS algorithms.

Disadvantages:

o It can behave as an unguided depth-first search in the worst case scenario.


o It can get stuck in a loop as DFS.
o This algorithm is not optimal.

o A* Search Algorithm
o 2.) A* Search Algorithm:
o A* search is the most commonly known form of best-first search. It uses heuristic function
h(n), and cost to reach the node n from the start state g(n). It has combined features of
UCS and greedy best-first search, by which it solve the problem efficiently. A* search
algorithm finds the shortest path through the search space using the heuristic function

(NB)
10. Problem on A* search, DFS and BFS and uniform cost.
11. Explain hill climbing with example. What are its drawbacks? How to overcome from that.
12. Explain genetic algorithm with example.
13. Explain alpa-beta pruning. State its importance in game playing.
14. Write a note on Simulated Annealing, History of AI and AI Applications (Optional)

You might also like