0% found this document useful (0 votes)
57 views

ai-unit-4-notes

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

ai-unit-4-notes

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

lOMoARcPSD|37892957

AI Unit-4 notes

Computer Science and Engineering (Jawaharlal Nehru Technological University,


Hyderabad)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by Prasanthi Tumu ([email protected])
lOMoARcPSD|37892957

Syllabus

ARTIFICIAL INTELLIGENCE

B.TECH IV Year I Sem. L T P C

UNIT - I
Problem Solving by Search-I: Introduction to AI, Intelligent Agents
Problem Solving by Search –II: Problem-Solving Agents, Searching for Solutions,
Uninformed Search Strategies: Breadth-first search, Uniform cost search, Depth-first search,
Iterative deepening Depth-first search, Bidirectional search, Informed (Heuristic) Search
Strategies: Greedy best-first search, A* search, Heuristic Functions, Beyond Classical Search:
Hill-climbing search, Simulated annealing search, Local Search in Continuous Spaces,
Searching with Non-Deterministic Actions, Searching wih Partial Observations, Online
Search Agents and Unknown Environment .

UNIT - II
Problem Solving by Search-II and Propositional Logic
Adversarial Search: Games, Optimal Decisions in Games, Alpha–Beta Pruning, Imperfect
Real-Time Decisions.
Constraint Satisfaction Problems: Defining Constraint Satisfaction Problems, Constraint
Propagation, Backtracking Search for CSPs, Local Search for CSPs, The Structure of
Problems.
Propositional Logic: Knowledge-Based Agents, The Wumpus World, Logic, Propositional
Logic, Propositional Theorem Proving: Inference and proofs, Proof by resolution, Horn
clauses and definite clauses, Forward and backward chaining, Effective Propositional Model
Checking, Agents Based on Propositional Logic.

UNIT - III
Logic and Knowledge Representation
First-Order Logic: Representation, Syntax and Semantics of First-Order Logic, Using First-
Order Logic, Knowledge Engineering in First-Order Logic.
Inference in First-Order Logic: Propositional vs. First-Order Inference, Unification and
Lifting, Forward Chaining, Backward Chaining, Resolution.
Knowledge Representation: Ontological Engineering, Categories and Objects, Events.
Mental Events and Mental Objects, Reasoning Systems for Categories, Reasoning with
Default Information.

UNIT - IV
Planning
Classical Planning: Definition of Classical Planning, Algorithms for Planning with State-
Space Search, Planning Graphs, other Classical Planning Approaches, Analysis of Planning
approaches.
Planning and Acting in the Real World: Time, Schedules, and Resources, Hierarchical
Planning, Planning and Acting in Nondeterministic Domains, Multi agent Planning.

UNIT - V
Uncertain knowledge and Learning
Uncertainty: Acting under Uncertainty, Basic Probability Notation, Inference Using Full
Joint Distributions, Independence, Bayes’ Rule and Its Use,
Probabilistic Reasoning: Representing Knowledge in an Uncertain Domain, The Semantics
Of Bayesian Networks, Efficient Representation of Conditional Distributions, Approximate

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

Inference in Bayesian Networks, Relational and First-Order Probability, Other Approaches to


Uncertain Reasoning; Dempster-Shafer theory.
Learning: Forms of Learning, Supervised Learning, Learning Decision Trees.Knowledge in
Learning: Logical Formulation of Learning, Knowledge in Learning, Explanation-Based
Learning, Learning Using Relevance Information, Inductive Logic Programming.

TEXT BOOKS
1. Artificial Intelligence A Modern Approach, Third Edition, Stuart Russell and Peter
Norvig, Pearson Education.

REFERENCES:
1. Artificial Intelligence, 3rd Edn., E. Rich and K. Knight (TMH)
2. Artificial Intelligence, 3rd Edn., Patrick Henny Winston, Pearson Education.
3. Artificial Intelligence, Shivani Goel, Pearson Education.
4. Artificial Intelligence and Expert systems – Patterson, Pearson Education

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

LECTURE NOTES
Planning
Classical Planning: Definition of Classical Planning

Classical planning concentrates on problems where most actions leave most things unchanged.
Think of a world consisting of a bunch of objects on a flat surface.

Algorithms for Planning with State-Space Search

The following points highlight the two main planning methods used to solve AI problems. The
methods are: 1. Planning with State-Space Search 2. Goal Stack Planning.

Method # 1. Planning with State-Space Search:


The most straight forward approach is to use state-space search. Because the descriptions of actions in
a planning problem specify both preconditions and effects, it is possible to search in either direction:
forward from the initial state or backward from the goal, as shown in Fig. 8.5. We can also use the
explicit action and goal representations to derive effective heuristics automatically.

i. Forward State-Space Search:


Planning with forward state-space search is similar to the problem-solving approach. It is sometimes
called progression planning, because it moves in the forward direction.

We start with the problem’s initial state, considering sequences of actions until we reach a goal state.

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

The formulation of planning problem as state-space search problems is as follows:


ADVERTISEMENTS:

i. The initial state of the search is the initial state from the planning problem. In general each state will
be set of positive ground literals; literals not appearing are false.

ii. The actions which are applicable to a state are all those whose preconditions are satisfied. The
successor state resulting from an action is generated by adding the positive effect literals and deleting
the negative effect literals.

iii. The goal test checks whether the state satisfies the goal of the planning problem.

iv. The step cost of each action is typically 1. Although it would be easy to allow different costs for
different actions, this was seldom done by STRIPS planners.

ADVERTISEMENTS:

Since function symbols are not present, the state space of a planning problem is finite and therefore,
any graph search algorithm such as A * will be a complete planning algorithm.

From the early days of planning research it is known that forward state-space search is too inefficient
to be practical. Mainly, this is because of a big branching factor since forward search does not address
only relevant actions, (all applicable actions are considered). Consider for example, an air cargo
problem with 10 airports, where each airport has 5 planes and 20 pieces of cargo.

The goal is to move all the cargo at airport A to airport B. There is a simple solution to the problem:
load the 20 pieces of cargo into one of the planes at A, fly the plane to B, and unload the cargo. But
finding the solution can be difficult because the average branching factor is huge: each of the 50 planes
can fly to 9 other airports, and each of the 200 packages can be either unloaded (if it is loaded), or
loaded into any plane at its airport (if it is unloaded).

On average, let’s say there are about 1000 possible actions, so the search tree up to the depth of the
obvious solution has about 1000 nodes. It is thus clear that a very accurate heuristic will be needed to
make this kind of search efficient.

ii. Backward State-Space Search:


Backward search can be difficult to implement when the goal states are described by a set of
constraints which are not listed explicitly. In particular, it is not always obvious how to generate a

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

description of the possible predecessors of the set of goal states. The STRIPS representation makes this
quite easy because sets of states can be described by the literals which must be true in those states.

The main advantage of backward search is that it allows us to consider only relevant actions. An action
is relevant to a conjunctive goal if it achieves one of the conjuncts of the goal. For example, the goal in
our 10-airport air cargo problem is to have 20 pieces of cargo at airport B, or more precisely.

At (C1 B) ∧ At (C2 B)……………….. At (C20,


Now consider the conjunct At (C1, B). Working backwards, we can seek those actions which have this
as an effect,
There is only one:
Unload (C1p, B),
where plane p is unspecified.

We may note that there are many irrelevant actions which can also lead to a goal state. For example,
we can fly an empty plane from Mumbai to Chennai; this action reaches a goal state from a
predecessor state in which the plane is at Mumbai and all the goal conjuncts are satisfied. A backward
search which allows irrelevant actions will still be complete, but it will be much less efficient. If a
solution exists, it should be found by a backward search which allows only relevant action.

This restriction to relevant actions only means that backward search often has a much lower branching
factor than forward search. For example, our air cargo problem has about 1000 actions leading forward
from the initial state, but only 20 actions working backward from the goal. Hence backward search is
more efficient than forward searching.

Searching backwards is also called regression planning. The principal question in regression planning
is: what are the states from which applying a given action leads to the goal? Computing the description
of these states is called regressing the goal through the action. To see how does it work, once again
consider the air cargo example. We have the goal

At (C1 B) ˄ At (C2 B) ˄…. ˄ At (C20, B)


The relevant action UNLOAD (C1 ‘ p, B) achieves the first conjunct. The action will work only if its
preconditions are satisfied. Therefore, any predecessor state must include these preconditions: In (C 1,
p) ˄ At (p, B) as sub-goals. Moreover, the sub-goal At (C1, B) should not be true in the predecessor
state which will no doubt be a goal but not relevant one (justify).
Thus, the predecessor description is:
In(C1, p) ˄ At(p, B) ˄ At(C2, B) ˄……………………˄ At (C20,B)
In addition to insisting that actions achieve some desired literal, we must insist that the actions do not
undo any desired literals. An action which satisfies this restriction is called consistent. For example,

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

the action load (C2, p) would not be consistent with the current goal, because it would negate the literal
At (C2, B) (verify).
Given definitions of relevance and consistency, we can now describe the general process of
constructing predecessors for backward search. Given a goal description G, let A be an action which is
relevant and consistent.

Planning Graphs

Principle of the planning graph

A planning graph consists in a sequence of levels that correspond to time steps


 Level 0 is the initial state
 Each level contains a set of literals that could1 be true at this time step
 Each level contains a set of actions that could2 be applied at this time step

Example

The “have cake and eat cake too” problem


Init(Have(Cake))
Goal(Have(Cake) ∧ Eaten(Cake))
Action(Eat(Cake)
PRECOND: Have(Cake)
EFFECT: ¬Have(Cake) ∧ Eaten(Cake)
)
Action(Bake(Cake)
PRECOND: ¬Have(Cake)
EFFECT: Have(Cake)
)

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

Planning graph: explanation


◮ Level A0 contains all the actions that could occur in state S0.
◮ Persistence actions (small boxes) represent the fact that one literal is not modified.
◮ Mutual exclusions (mutexes, gray lines) represent conflicts between actions.
◮ To go from level 0 to the level 1, you pick a set of non exclusives actions (for
instance, action Eat(Cake))
◮ Level S1 contains all the literals that could result from picking any subset of actions in
A0.
◮ Mutexes represent conflicts between literals.

How to build theHow to build the planning graph

How to build the graph


1. Start from S0
2. i = 0
3. Find all the actions of Ai+1 applicable in Si given the
mutexes
4. Compute the mutexes between the actions of Ai+1
5. Compute the literals reachable in Si+1
6. Compute the mutexes in Si+1
7. If Si+1 6= Si , then increment i by 1 and go to 3ut

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

Actions
◮ Inconsistent effects: two actions that lead to inconsistent effects
◮ Interference: an effect of the first action negates the precondition of the other action
◮ Competing needs: a precondition of the first action is mutually exclusive with a
precondition of the second action.

Literals
◮ one literal is the negation of the other one
◮ Inconsistensy support: each pair of action archieving the two literals are mutually
exclusive.

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

Analysis of Planning approaches.


Downloaded by Prasanthi Tumu ([email protected])
lOMoARcPSD|37892957

Planning is an area of great current interest within AI. One reason for this is that it combines
the two major areas of AI we have covered so far: search and logic. That is, a planner can be seen
either as a program that searches for a solution or as one that (constructively) proves the existence of a
solution. The cross-fertilization of ideas from the two areas has led to both improvements in
performance amounting to several orders of magnitude in the last decade and an increased use of
planners in industrial applications. Unfortunately, we do not yet have a clear understanding of which
techniques work best on which kinds of problems. Quite possibly, new techniques will emerge that
dominate existing methods. Planning is foremost an exercise in controlling combinatorial explosion. If
there are p primitive propositionsin a domain, then there are 2 p states.

For complex domains, p can grow quite large. Consider that objects in the domain have
properties (Location, Color, etc.) and relations (At, On, Between, etc.). With d objects in a domain
with ternary relations, we get 2 d 3 states. We might conclude that, in the worst case, planning is
hopeless. Against such pessimism, the divide-and-conquer approach can be a powerful weapon. In the
best case—full decomposability of the problem—divide-and-conquer offers an exponential speedup.

Decomposability is destroyed, however, by negative interactions between actions. Partial-order


planners deal with this with causal links, a powerful representational approach, but unfortunately each
conflict must be resolved with a choice (put the conflicting action before or after the link), and the
choices can multiply exponentially. GRAPHPLAN avoids these choices during the graph construction
phase, using mutex links to record conflicts without actually making a choice as to how to resolve
them. SATPLAN represents a similar range of mutex relations, but does so by using the general CNF
form rather than a specific data structure. How well this works depends on the SAT solver used

Planning and Acting in the Real World: Time, Schedules, and Resources

Planning/acting in Real world

♦ So far only looked at classical planning, i.e. environments are fully observable, static, determinist.
Also assumed that action descriptions are correct and complete.

♦ Unrealistic in many real-world applications: Don’t know everything - may even hold incorrect
information. Actions can go wrong.

♦ Distinction: bounded vs. unbounded indeterminacy: can possible preconditions and effects be listed
at all? Unbounded indeterminacy related to qualification problem

♦ Real world include temporal and resource constraints: • classical planning talks about what to do,
and in what order, but cannot talk about time: how long an action takes • an airline has a limited
number of staff - and staff who are on one flight cannot be on another at the same time

A job-shop scheduling problem

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

Solving scheduling problems

Begin by considering just the temporal constraints, ignoring resource constraints.

Critical path method: to determine the possible start and end times of each action. Critical path is that path
whose total duration is longest Actions have a window of time [ES,LS] ES - earliest possible start time, LS -
latest possible start time Given A, B actions and A ≺ B: ES(Start) = 0 ES(B) = max A ≺ BES(A) + Duration(A)
LS(Finish) = ES(Finish) LS(A) = min B ≻ ALS(B) − Duration(A)

Considering resource constraints

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

Hierarchical Planning,
Principle
 hierarchical organization of 'actions'
 complex and less complex (or: abstract) actions
 lowest level reflects directly executable actions
Procedure
 planning starts with complex action on top
 plan constructed through action decomposition
 substitute complex action with plan of less complex actions (pre-defined plan schemata; or
learning of plans/plan abstraction)
 overall plan must generate effect of complex action

Hierarchical Planning / Plan Decomposition


Plans are organized in a hierarchy. Links between nodes at different levels in the hierarchy denote a
decomposition of a “complex action” into more primitive actions (operator expansion).

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

Multiagent planning

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

Between the purely single-agent and truly multiagent cases is a wide spectrum of problems that exhibit
various degrees of decomposition of the monolithic agent

Multieffector planning: to manage each effector while handling positive and negative interactions among the
effectors

Multibody planning: effectors are physically decoupled into detached units - as in a fleet of delivery robots in a
factory

Decentralized planning: multiple reconnaissance robots covering a wide area may often be out of radio
contact with each other and should share their findings during times when communication is feasible

Planning with multiple simultaneous actions

Assume perfect synchronization: each action takes the same amount of time and actions at each point in the
joint plan are simultaneous Joint action h a 1, ...,a n i, where ai is the action taken by the ith actor

Loosely coupled: focus on decoupling the actors to the extent possible, so that the complexity of the problem
grows linearly with n rather than exponentially.

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

Tutorial questions

(For answers refer lecture Notes)

1) How to measure the performance of an agent?


2) Define ideal Rational Agent.
3) Define Mapping. Give Example.
4) Define Ideal Mapping with example.
5) Write Short notes on Autonomy.
6) Define Agent Program.
7) Give two examples for agent type and write the
corresponding PAGE description.
8) Define Environment Program.
9) List the environment of environment.
10) Define Problem Solving Agent.
11) List the steps involved in simple problem solving technique.
12) List the four different types of problem with an example.
13) Define the term : Problem
14) What is meant by operators?
15) Define State Space.
16) Define Path.

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

Descriptive questions

(For answers refer lecture Notes)

1) Explain classical planning in detail


2) Explain planning graph in detail
3) Explain multiagent planning in detail
4) Explain time,schedule and resources in planning
5) Explain Hierarchical planning with example
6) Explain planning in non deterministic domain
7) Write the algorithm for graph plan
8) Summarize about forward state space search
9) Summarize about backward state space search
10 ) Explain alogithm of graph plan

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

ASSIGNMENT QUSESTIONS

(For answers refer lecture Notes)

1) Define Fringe or Frontier.


2) List the steps to measure the performance of search strategies.
3) Differentiate blind search with heuristic search.
4) Define branching factor.
5) Differentiate Best First Search, Depth First Search with Breadth First Search.
6) What is the use of Heuristic Functions?
7) Explain planning in non deterministic domain
8) Write the algorithm for graph plan
9) Summarize about forward state space search
10) Summarize about backward state space search
11) ) Explain alogithm of graph plan.

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

UNIT TEST –I SET : 1


AI

Max marks:10

I. Answer Any ONE Question.

1) a) Explain Classical Planning


b) Explain Properties of forward search planning?
2) a) Explain Properties of Backward search planning?
b) What is multi agent system? Explain the applications of multiagent system?.

II. Fill in the blanks

1) Sequence of actions to achieve a given goal is called as____________


2) In the Classical planning environment is ______________________
3) Blocks world domain consists of ________________sitting on a table.
4) Forward search for planning search in __________________direction.
5) Backward search for planning search in____________direction.
6) Planning graph ignores the _______________of the actions.
7) Classical planning representation is about ____________
8) A job shop consists of _________________
9) Each job consists of ___________________
10) Actions have a ________________and set of ___________________

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

SET : 2
UNIT TEST –I
AI

Max marks:10

I.Answer Any ONE Question.

1) a) Explain Hierarchial planning?


b) Explain planning graph?

2) a) Explain Action Defination language?


b) Write the differences between strips language and adl language?

II. Fill in the blanks

1) Hierarchial planning is an approach to_____________


2) Planning problems are specified in ________________________.
3) Compound task consists of set of____________
4) Primitive tasks roughly correspond to the action of _____________
5) ADL stands for_______________
6) ADL allows____________________
7) Multi agent system consists of ______________
8) In the multi agent systems each agent generates its own______________
9) Classical planning representation is about ____________
10) A job shop consists of _________________

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

SET : 3
UNIT TEST –I
AI
Max marks:10

I .Answer Any ONE Question.


1) a)Explain planning and acting in non deterministic domains?
b) Explain Hierarchial planning?

2) a) Explain classical planning?


b) Explain planning graph?

II. Fill in the blanks


1) The process by which the brain orders actions needed to complete a specific task is referred as
_____________________________
2) The famous spare tire problem or Scheduling classes for bunch of students or Air cargo transport are the best
example of ___________________
3) To eliminate the inaccuracy problem in planning problem or partial order planning problem we can use
______________ data structure/s.
4) Planning graphs consists of a ____________________
5) _______________algorithms is used to extract the plan directly from the planning graph, rather than using graph
to provide heuristic.
6) The other name of each plan resulted in partial order planning _____________
7) Planning problem combines the two major aspects of AI _____________
8) _____________ algorithm translates a planning problem in to prepositional axioms.
9) _______________planning allows the agent to take advice from the domain designer in the form of
decomposition rules
10) Standard planning algorithms assumes environment to be ________________

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

SET : 4
UNIT TEST –I
AI
Max marks:10

I. Answer Any ONE Question.

1) a) Explain analysis of planning approach?


b) Explain properties of forward search for planning?

2) a) Explain properties of Backward search for planning?


b) Explain hierarchial planning?

II. Fill in the blanks


1) Planning problems are specified in ________________________.
2) Compound task consists of set of____________
3) Primitive tasks roughly correspond to the action of _____________
4) ADL stands for_______________
5) ADL allows____________________
6) Multi agent system consists of ______________
7) The famous spare tire problem or Scheduling classes for bunch of students or Air cargo
transport are the best example of ___________________
8) To eliminate the inaccuracy problem in planning problem or partial order planning problem we
can use ______________ data structure/s.
9) Planning graphs consists of a ____________________
10) Planning problem combines the two major aspects of AI _____________

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

NPTEL LINK VIDEOS

https://nptel.ac.in/courses/106/105/106105077/21

https://nptel.ac.in/courses/106/105/106105077/22

https://nptel.ac.in/courses/106/105/106105077/23

https://nptel.ac.in/courses/106/105/106105077/24

https://nptel.ac.in/courses/106/105/106105077/25

https://nptel.ac.in/courses/106/105/106105077/26

https://nptel.ac.in/courses/106/105/106105077/27

https://nptel.ac.in/courses/106/105/106105077/28

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

UNIVERSITY QUESTIONS

1)Explain classical planning in detail Jntuh may 2017

2) Explain planning graph in detail Jntuh june 2018

3) Explain multiagent planning in detail jntuh may 2017

4) Explain time,schedule and resources in planning jntuh june 2018

5) Explain Hierarchical planning with example jntuh may 2018

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

Objective Questions
Which instruments are used for perceiving and acting upon the environment?
a) Sensors and Actuators
b) Sensors
c) Perceiver
d) None of the mentioned.

Answer: a

What is meant by agent’s percept sequence?


a) Used to perceive the environment
b) Complete history of actuator
c) Complete history of perceived things
d) None of the mentioned

Answer: C

How many types of agents are there in artificial intelligence?


a) 1
b) 2
c) 3
d) 4

Answer: d

What is the rule of simple reflex agent?


a) Simple-action rule
b) Condition-action rule
c) Simple & Condition-action rule
d) None of the mentioned

Answer: b

What are the composition for agents in artificial intelligence?


a) Program
b) Architecture
c) Both Program & Architecture
d) None of the mentioned

Answer: c

In which agent does the problem generator is present?


a) Learning agent
b) Observing agent

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

c) Reflex agent
d) None of the mentioned

Answer: a

Which is used to improve the agents performance?


a) Perceiving
b) Learning
c) Observing
d) None of the mentioned

Answer: b

Which agent deals with happy and unhappy states?


a) Simple reflex agent
b) Model based agent
c) Learning agent
d) Utility based agent

Answer: d

Which action sequences are used to achieve the agent’s goal?


a) Search
b) Plan
c) Retrieve
d) Both Search & Plan

Answer: d

. Which element in agent are used for selecting external actions?


a) Perceive
b) Performance
c) Learning
d) Actuator

Answer: b

Which search strategy is also called as blind search?


a) Uninformed search
b) Informed search
c) Simple reflex search
d) All of the mentioned

Answer: a

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

How many types are available in uninformed search method?


a) 3
b) 4
c) 5
d) 6

Answer: c

Which search is implemented with an empty first-in-first-out queue?


a) Depth-first search
b) Breadth-first search
c) Bidirectional search
d) None of the mentioned

Answer: b

When is breadth-first search is optimal?


a) When there is less number of nodes
b) When all step costs are equal
c) When all step costs are unequal
d) None of the mentioned

Answer: b

How many successors are generated in backtracking search?


a) 1
b) 2
c) 3
d) 4

Answer: a

What is the space complexity of Depth-first search?


a) O(b)
b) O(bl)
c) O(m)
d) O(bm)

Answer: d

How many parts does a problem consists of?


a) 1
b) 2
c) 3
d) 4

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

Answer: d

Which algorithm is used to solve any kind of problem?


a) Breadth-first algorithm
b) Tree algorithm
c) Bidirectional search algorithm
d) None of the mentioned

Answer: b

Which search algorithm imposes a fixed depth limit on nodes?


a) Depth-limited search
b) Depth-first search
c) Iterative deepening search
d) Bidirectional search

Answer: a

. Which search implements stack operation for searching the states?


a) Depth-limited search
b) Depth-first search
c) Breadth-first search
d) None of the mentioned

Answer: b

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

Real time application

Topic: Problem solving agent

Problem solving agent is one kind of goal-based agent, where the agent
decide what do by finding sequences of actions that lead to desirable
states. If the agent understood the definition of problem, it is relatively
straight forward to construct a search process for finding solutions, which
implies that problem solving agent should be an intelligent agent to
maximize the performance measure.

The sequence of steps done by the intelligent agent to maximize the


performance measure:

1. Goal formulation -based on the current situation and the agent‘s


performance measure, is the first step of problem solving.

2. Problem formulation - is the process of deciding what actions


and states to consider, given a goal.

3. Search - An agent with several immediate options of


unknown value can decide what to do by first examining different possible
sequence of actions that lead to states of known value, and then choosing in
best sequence. This process of looking for such a sequence is called search.

4. Solution - a search algorithm takes a problem as input and


returns a solution in the form of an action sequence.

function SIMPLE-PROBLEM-SOLVING-AGENT (percept) returns an action

inputs: percept, a percept

static: seq, an action sequence, initially empty

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

state, some description of the current world state

goal, a goal, initially null

problem, a problem formulation

Real time application 2

Topic: Agents and Environments


An agent is anything that can be viewed as perceiving its environment through sensors

and acting upon that environment through actuators shown in Figure.

Figure: Agents interact with environment through sensors and effectors

The different types of agent are:

Human Agent: A human agent has eyes, ears, and other organs for sensors and hands,
legs, mouth and other body parts for actuators.
Robotic Agent: A robotic agent has cameras and infrared range finders for the
sensors and various motors for the actuators.

Software Agent: A software agent has encoded bit strings as its percepts and
actions.

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

Generic Agent: A general structure of an agent who interacts with the


environment.
The agent function for an agent specifies the action taken by the agent in response to any
percept sequence. It is an abstract mathematical description

Internally, the agent function for an artificial agent will be implemented by an agent
program. An agent program is a function that implements the agent mapping from
percepts to actions. It is a concrete implementation, running on the agent architecture.

Good Behavior: The Concept of Rationality

An agent should act as a Rational Agent. A rational agent is one that does the right thing
that is the right actions will cause the agent to be most successful in the environment.

Performance measures

A performance measures embodies the criterion for success of an agent‘s behavior. As


a general rule, it is better to design performance measures according to what one actually
wants in the environment, rather than according to how one thinks the agent should
behave.

Rationality

What is rational at any given time depends on four things:

The performance measure that defines the criterion of success.


The agent‘s prior knowledge of the environment.
The actions that the agent can perform.
The agent‘s percept sequence to date.

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

Blooms Taxonomy

Topic :DFS algorithm

1) Define Searching ?
Searching is used to find a particular goal node by making root node as initial
node.

2)Explain DFS algorithm

Depth first search (DFS) algorithm starts with the initial node of the graph G, and
then goes to deeper and deeper until we find the goal node or the node which has
no children. The algorithm, then backtracks from the dead end towards the most
recent node that is yet to be completely unexplored.

The data structure which is being used in DFS is stack. The process is similar to
BFS algorithm. In DFS, the edges that leads to an unvisited node are called
discovery edges while the edges that leads to an already visited node are called
block edges.

Algorithm
o Step 1: SET STATUS = 1 (ready state) for each node in G
o Step 2: Push the starting node A on the stack and set its STATUS = 2
(waiting state)
o Step 3: Repeat Steps 4 and 5 until STACK is empty
o Step 4: Pop the top node N. Process it and set its STATUS = 3 (processed
state)
o Step 5: Push on the stack all the neighbours of N that are in the ready state
(whose STATUS = 1) and set their
STATUS = 2 (waiting state)
[END OF LOOP]
o Step 6: EXIT

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

Blooms Taxonomy

Topic :AI

1) Define artificial intelligence


Artificial intelligence is a branch of computer science which is used to make
intelligent machines.
2) Explain types of AI
Artificial Intelligence can be divided in various types, there are mainly two types of main
categorization which are based on capabilities and based on functionally of AI. Following is
flow diagram which explain the types of AI.

AI type-1: Based on Capabilities


1. Weak AI or Narrow AI:
o Narrow AI is a type of AI which is able to perform a dedicated task with
intelligence.The most common and currently available AI is Narrow AI in the world of
Artificial Intelligence.
o Narrow AI cannot perform beyond its field or limitations, as it is only trained for one
specific task. Hence it is also termed as weak AI. Narrow AI can fail in unpredictable
ways if it goes beyond its limits.
o Apple Siriis a good example of Narrow AI, but it operates with a limited pre-defined
range of functions.

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

o IBM's Watson supercomputer also comes under Narrow AI, as it uses an Expert
system approach combined with Machine learning and natural language processing.
o Some Examples of Narrow AI are playing chess, purchasing suggestions on e-
commerce site, self-driving cars, speech recognition, and image recognition.

2. General AI:
o General AI is a type of intelligence which could perform any intellectual task with
efficiency like a human.
o The idea behind the general AI to make such a system which could be smarter and
think like a human by its own.
o Currently, there is no such system exist which could come under general AI and can
perform any task as perfect as a human.
o The worldwide researchers are now focused on developing machines with General AI.
o As systems with general AI are still under research, and it will take lots of efforts and
time to develop such systems.

3. Super AI:
o Super AI is a level of Intelligence of Systems at which machines could surpass
human intelligence, and can perform any task better than human with cognitive
properties. It is an outcome of general AI.
o Some key characteristics of strong AI include capability include the ability to think, to
reason,solve the puzzle, make judgments, plan, learn, and communicate by its own.
o Super AI is still a hypothetical concept of Artificial Intelligence. Development of such
systems in real is still world changing task.

Artificial Intelligence type-2: Based on functionality

Downloaded by Prasanthi Tumu ([email protected])


lOMoARcPSD|37892957

1. Reactive Machines
o Purely reactive machines are the most basic types of Artificial Intelligence.
o Such AI systems do not store memories or past experiences for future actions.
o These machines only focus on current scenarios and react on it as per possible best
action.
o IBM's Deep Blue system is an example of reactive machines.
o Google's AlphaGo is also an example of reactive machines.

2. Limited Memory
o Limited memory machines can store past experiences or some data for a short
period of time.
o These machines can use stored data for a limited time period only.
o Self-driving cars are one of the best examples of Limited Memory systems. These
cars can store recent speed of nearby cars, the distance of other cars, speed limit,
and other information to navigate the road.

3. Theory of Mind
o Theory of Mind AI should understand the human emotions, people, beliefs, and be
able to interact socially like humans.
o This type of AI machines are still not developed, but researchers are making lots of
efforts and improvement for developing such AI machines.

4. Self-Awareness
o Self-awareness AI is the future of Artificial Intelligence. These machines will be super
intelligent, and will have their own consciousness, sentiments, and self-awareness.
o These machines will be smarter than human mind.
o Self-Awareness AI does not exist in reality still and it is a hypothetical concept.

Downloaded by Prasanthi Tumu ([email protected])

You might also like