20CB603 - Unit 1
20CB603 - Unit 1
This document is confidential and intended solely for the educational purpose of RMK
Group of Educational Institutions. If you have received this document through email
in error, please notify the system manager. This document contains proprietary
information and is intended only to the respective group / learning community as
intended. If you are not the addressee you should not disseminate, distribute or copy
through e-mail. Please notify the sender immediately by e-mail if you have received
this document by mistake and delete this document from your system. If you are not
the intended recipient you are notified that disclosing, copying, distributing or taking
any action in reliance on the contents of this information is strictly prohibited.
Digital Notes
20CB603 ARTIFICAL INTELLIGENCE
Department: CSBS
Batch/Year: 2020-24/III
Created by: Mr.B.Jayaram / AP
Date: 08.02.2023
Table of Contents
S NO CONTENTS PAGE NO
1 Contents 5
2 Course Objectives 6
5 Course Outcomes 9
7 Lecture Plan 11
9 Lecture Notes 13
10 Assignments 39
11 Part A (Q & A) 40
12 Part B Qs 46
16 Assessment Schedule 50
PREREQUISITE
UNIT I INTRODUCTION 9
Problems of AI, AI technique, Tic - Tac - Toe problem. Intelligent Agents, Agents &
environment, nature of environment, structure of agents, goal based agents, utility
based agents, learning agents. Problem Solving, Problems, Problem Space & search:
Defining the problem as state space search, production system, problem
characteristics, issues in the design of search programs.
Problem solving agents, searching for solutions; uniform search strategies: breadth
first search, depth first search, depth limited search, bidirectional search, comparing
uniform search strategies. Heuristic search strategies Greedy best-first search, A*
search, AO* search, memory bounded heuristic search: local search algorithms &
optimization problems: Hill climbing search, simulated annealing search, local beam
search
Local search for constraint satisfaction problems. Adversarial search, Games, optimal
decisions & strategies in games, the minimax search procedure, alpha-beta pruning,
additional refinements, iterative deepening.
TOTAL: 45 PERIODS
Course Outcomes
Cognitive/
Affective
Expected
Course Level of
Course Outcome Statement Level of
Code the
Attainment
Course
Outcome
Course Outcome Statements in Cognitive Domain
PO PO PO PO PO PO PO PO PO PO PO PO PS PS PS
1 2 3 4 5 6 7 8 9
10 11 12 O1 O2 O3
CO1 3 3 2 1 2 1 1 1 1 1 1 1 2 2 1
CO2 3 3 2 1 2 1 1 1 1 1 1 1 2 2 1
CO3 3 3 2 1 2 1 1 1 1 1 1 1 2 2 1
CO4 3 3 2 1 2 1 1 1 1 1 1 1 2 2 1
CO5 3 3 2 1 2 1 1 1 1 1 1 1 2 2 1
9
Lecture Plan
UNIT – I
of delivery
Actual lecture Date
S No Topics
of
Proposed date
pertaining CO
Taxonomy
Periods
Mode
level
No
1 CO1 K2 PPT
1 Problems of AI, AI technique,
1
CO1 K2 PPT
Tic - Tac - Toe problem. Intelligent
2 Agents,
1
Problem Space & search: CO1 K2 PPT
1
CO1 K2 PPT
Defining the problem as state space
8 search,
S NO TOPICS
At any instant of time the system will contain a collection of these symbol
structures. Besides the structure the system also contains a collection of processes
of that operate on expression to produce expression: processes of creation,
modification, reproduction and destruction.
Computer provides the perfect medium for this experiment since they can be
programmed to simulate any physical symbol system.
Instead situation that share important role or properties are grouped together. If
knowledge does not have this property, inordinate amount of memory and
updating will be required.
It can easily be modified to correct errors and to reflect changes in the world and
our world view.
Tic-Tac-Toe is a simple game for two players that we enjoyed playing as kids
(especially in boring classrooms). The game involves 2 players placing their
respective symbols in a 3x3 grid. The player who manages to place three of their
symbols in horizontal/vertical/diagonal row wins the game.
Disadvantages
We can imagine tabulating the agent function that describes any given
agent; The table is, of course, an external characterization of the agent.
Internally, the agent function for an artificial agent will be implemented
by an agent program.
Rational Agent
Unobservable
Taxi driving is clearly stochastic in this sense, because one can never
predict the behavior of traffic exactly; moreover, one’s tires blow out
and one’s engine seizes up without warning. The vacuum world as we
described it is deterministic
Uncertain
Non Deterministic
If the environment itself does not change with the passage of time but
the agent’s performance score does, then we say the environment is
semidynamic.
The simplest kind of agent is the simple reflex agent. These agents
select actions on the basis of the current percept, ignoring the rest of
the percept history.
RANDOMIZATION
Escape from infinite loops is possible if the agent can randomize its actions. For
example, if the vacuum agent perceives [Clean], it might flip a coin to choose
between Left and Right .
Model Based Reflex Agent
The most effective way to handle partial observability is for the agent to keep track
of the part of the world it can’t see now. That is, the agent should maintain some
sort of internal state that depends on the percept history and thereby reflects at least
some of the unobserved aspects of the current state.
In other words, as well as a current state description, the agent needs some sort
of goal information that describes situations that are desirable—for example,
being at the passenger’s destination. The agent program can combine this with
the model (the same information as was used in the model based reflex agent)
to choose actions that achieve the goal. Figure 2.13 shows the goal-based
agent’s structure.
Although the goal-based agent appears less efficient, it is more flexible because
the knowledge that supports its decisions is represented explicitly and can be
modified
Searching
Planning
Partial observability and stochasticity are ubiquitous in the real world, and so,
therefore, is decision making under uncertainty. Technically speaking, a rational
utility-based agent EXPECTED UTILITY chooses the action that maximizes the
expected utility of the action outcomes—that is, the utility the agent expects to
derive, on average, given the probabilities and utilities of each outcome
1.3 Problems, Problem Spaces and Search
•A problem space encompasses all valid states that can be generated by the
application of any combination of operators on any combination of objects.
•The problem space may contain one or more solutions. A solution is a combination
of operations and objects that achieve the goals.
To solve the problem of building a system you should take the following steps:
•1. Define the problem accurately including detailed specifications and what
constitutes a suitable solution.
•2. Scrutinize the problem carefully, for some features may have a central affect on
the chosen method of solution.
•3. Segregate and represent the background knowledge needed in the solution of the
problem.
•4. Choose the best solving techniques for the problem to solve a solution.
In this problem, we use two jugs called four and three; four holds a maximum of four
gallons of water and three a maximum of three gallons of water. How can we get
two gallons of water in the four jug?
The state space is a set of prearranged pairs giving the number of gallons of water in
the pair of jugs at any time, i.e., (four, three) where four = 0, 1, 2, 3 or 4 and three
= 0, 1, 2 or 3.
The start state is (0, 0) and the goal state is (2, n) where n may be any but it is
limited to three holding from 0 to 3 gallons of water or empty. Three and four shows
the name and numerical number shows the amount of water in jugs for solving the
water jug problem. The major production rules for solving this problem are shown
below:
•A set of rules each consisting of a left side that determines the applicability of the
rule and a right side that describes the operation to be performed if the rule is
applied.
•A database of current facts established during the process of inference.
•A control strategy that specifies the order in which the rules will be compared with
facts in the database and also specifies how to resolve conflicts in selection of
several rules or selection of more facts.
•A rule firing module.
Control Strategies
Algorithm DFS
Advantages of DFS
Heuristic Search
1. Define the problem precisely. Specify the problem space, and the starting and
goal state (s).
2. Analyze the problem to determine where it falls with respect to seven important
issues.
3. Identify and represent the knowledge required by the task.
4. Choose one or more techniques for problem solving , and apply those
techniques to the problem.
Problem Characteristics
•Is the problem decomposable into a set of smaller or easier sub problems?
•Can solution steps be ignored or at least undone if proved unwise.
•Is the problems universe predictable.
•Is a good solution to the problem obvious without comparison to all other possible
solutions.
•Is the desired solution a state of world or path of state?
•Is the large amount of knowledge absolutely required to solve the problem, or
knowledge is important only to constrain the search?
•Can the computer that is simply given the problem return the solution, or will the
solution of the problem require interaction between the computer and a person?
– 8-puzzel (yes)
– bridge (no) but we can use probabilities of each
possible outcomes
• controlling robot arm gear of the arm might stuck
• helping the lawyer to decide how to defend his client
against a murder charge.
Is Marcus alive?
5. Is the solution a state or a path ?
solitary/ conversational
2 CO1 K2
Explain different types of agents and environments
4
Part-A Questions
It can be very memory intensive since it needs to keep track of all the nodes in the
search tree.
It can be slow since it expands all the nodes at each level before moving on to the
next level.
It can sometimes find sub-optimal solutions since it doesn’t explore all possible paths
through the search tree.
Define Heuristic Search. Give Example. CO1 K1
Heuristic is a technique that improves the efficiency of the search process.
• - It is often useful to introduce heuristics based • on relatively unstructured
knowledge.
• - can not use Mathematical analysis.
• Heuristic function : is the function that maps from problem state descriptions to
measures of desirability, usually represent as number.
List out the steps to solve problem using Heuristic Search. CO1 K1
1. Define the problem precisely. Specify the problem space, and the starting and
goal state (s).
2. Analyze the problem to determine where it falls with respect to seven
important issues.
3. Identify and represent the knowledge required by the task.
4. Choose one or more techniques for problem solving , and apply those
techniques to the problem.
List down the characteristics of a problem. CO1 K1
Is the problem decomposable into a set of smaller or easier sub problems?
Can solution steps be ignored or at least undone if proved unwise.
Is the problems universe predictable?
Is a good solution to the problem obvious without comparison to all other possible
solutions?
Is the desired solution a state of world or path of state?
Is the large amount of knowledge absolutely required to solve the problem, or
knowledge is important only to constrain the search?
Can the computer that is simply given the problem return the solution, or will the
solution of the problem require interaction between the computer and a person?
List out the characteristics of production systems. CO1 K1
List out the issues in design of search program. CO1 K1
The direction to which to conduct search? (forward or Backward)
How to select applicable production rules?
How to represent each node of the search process?
Define partially commutative production system. CO1 K1
Partially Commutative Production System: In this production system if a set of rules
is used to change state A to state B then any allowable combination of these rules
will also produce the same results.
What is monotonic reasoning in AI? CO1 K1
In monotonic reasoning, once the conclusion is taken, then it will remain the same
even if we add some other information to existing information in our knowledge
base. In monotonic reasoning, adding knowledge does not decrease the set of
prepositions that can be derived.
What is non monotonic reasoning in AI? CO1 K1
Non-monotonic Reasoning is the process that changes its direction or values as the
knowledge base increases. It is also known as NMR in Artificial Intelligence. Non-
monotonic Reasoning will increase or decrease based on the condition.
Part-B Questions
1
Real Time Applications in Day
to Day life and to Industry
Sl. No. Real Time Application
Banking
1
2 Hospital
3 Share market
4 Educational Institutions
Content Beyond the Syllabus
Machine Learning Model
Before discussing the machine learning model, we must need to understand the
following formal definition of ML given by professor Mitchell −
“A computer program is said to learn from experience E with respect to some class of
tasks T and performance measure P, if its performance at tasks in T, as measured by
P, improves with experience E.”
The above definition is basically focusing on three parameters, also the main
components of any learning algorithm, namely Task(T), Performance(P) and
experience (E). In this context, we can simplify this definition as −
ML is a field of AI consisting of learning algorithms that −
Name of the
S.NO Start Date End Date Portion
Assessment
1 FIAT Unit 1 & Unit 2
50
PRESCRIBED TEXT BOOKS AND REFERENCE BOOKS
TEXT BOOKS:
REFERENCE BOOKS:
2. Saroj Kaushik, “Logic & Prolog Programming”, First Edition, New Age International,
2008.
51
MINI PROJECT SUGGESTIONS
52
Thank you
Disclaimer:
This document is confidential and intended solely for the educational purpose of RMK Group of Educational
Institutions. If you have received this document through email in error, please notify the system manager.
This document contains proprietary information and is intended only to the respective group / learning
community as intended. If you are not the addressee you should not disseminate, distribute or copy through
e-mail. Please notify the sender immediately by e-mail if you have received this document by mistake and
delete this document from your system. If you are not the intended recipient you are notified that disclosing,
copying, distributing or taking any action in reliance on the contents of this information is strictly
prohibited.