Module 1 Updated
Module 1 Updated
1
MODULE 1
2
CONTENTS
Artificial Intelligence
Introduction
Definitions
Foundation
History
Applications
Agents
Types of Agents, Structure and functions
Agents and Environment
Knowledge Representation
Introduction, Approaches and Issues
Searching Algorithm in AI
Conceptual graphs:
Methods of Logic representation(POL, FOL)
3
ARTIFICIAL INTELLIGENCE - INTRODUCTION
4
What is AI?
12/09/2023
5
What is AI?
Thinking Humanly Thinking Rationally
“The exciting new effort to make computers “The study of mental faculties through the
think … machines with minds, in the full and use of computational models.”
literal sense.”
“The study of the computations that make it
“Activities that we associate with human possible to perceive, reason and act.”
thinking, activities such as decision-
making, problem solving, learning…”
“The art of creating machines that perform “Computational Intelligence is the study of
functions that require intelligence when the design of intelligent agents.”
performed by
people.” “AI … is concerned with intelligent
behavior in artifacts.”
“The study of how to make computers do
things at which, at the moment, people
are better.”
12/09/2023 6
Thinking humanly: Cognitive Modeling
12/09/2023
7
Thinking humanly: Cognitive Modeling
12/09/2023
8
Thinking Rationally: “Laws of Thought"
12/09/2023
9
Acting humanly: Turing Test
12/09/2023
10
Acting humanly: Turing Test
12/09/2023
11
Acting Rationally: Rational Agent
12/09/2023
12
Definition of AI
Examples:
12/09/2023
13
History of AI
12/09/2023 14
Ref : https://www.javatpoint.com/history-of-artificial-intelligence
Applications of AI
15
Future Perspective
(1) Reducing the time and cost of development is a big plan for AI.
(2) To develop applications towards strong AI.
(3) Allowing students to work collaboratively is another plan from
Researchers.
• Perfect rationality: the classical notion of rationality in decision
theory.
• Bounded optimality: A bounded optimal agent behaves as well as
possible given its computational resources.
• Game theory studies decision problems in which the utility of a given
action depends not only on changing events in the environment but
also on the actions of other agents.
Major Concerns
TA
Y
12/09/2023
17
Singularity
12/09/2023
18
AGENTS
12/09/2023
19
Agents in Artificial Intelligence
12/09/2023
20
The Structure of Intelligent Agents
12/09/2023
21
Agent Terminology
12/09/2023
22
Rationality
• Rationality is nothing but status of being reasonable, sensible, and
having good sense of judgment.
• Rationality is concerned with expected actions and results depending
upon what the agent has perceived. Performing actions with the aim
of obtaining useful information is an important part of rationality.
What is Ideal Rational Agent?
• An ideal rational agent is the one, which is capable of doing expected
actions to maximize its performance measure, on the basis of −
• Its percept sequence, built-in knowledge base
• Rationality of an agent depends on the following −
• The performance measures, which determine the degree of success.
• Agent’s Percept Sequence till now. The agent’s prior knowledge
about the environment.
12/09/2023
23
Rationality
24
Examples of Agent Environment:-
• An agent is anything that can perceive its environment
through sensors and acts upon that environment
through effectors.
• A human agent has sensory organs such as eyes, ears, nose,
tongue and skin parallel to the sensors, and other organs such as
hands, legs, mouth, for effectors.
• A robotic agent replaces cameras and infrared range finders for
the sensors, and various motors and actuators for effectors.
• A software agent has encoded bit strings as its programs and
actions.
12/09/2023
25
Types of Agents
12/09/2023
26
Simple Reflex Agent
• 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.
• These agents only succeed in the fully observable environment.
• The Simple reflex agent does not consider any part of percepts
history during their decision and action process.
• The Simple reflex agent works on Condition-action rule, which
means it maps the current state to action. Such as a Room Cleaner
agent, it works only if there is dirt in the room.
• Problems for the simple reflex agent design approach:
• They have very limited intelligence
• They do not have knowledge of non-perceptual parts of the
current state
• Mostly too big to generate and to store also not adaptive to
changes in the environment.
12/09/2023
27
Simple Reflex Agent
12/09/2023
28
Model-based reflex agent
12/09/2023
29
Model-based reflex agent
12/09/2023
30
Goal-based agents
12/09/2023
31
Goal-based agents
12/09/2023
32
Utility-based agents
• 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.
• Utility-based agent act based not only goals but also the best way
to achieve the goal.
• The Utility-based agent is useful when there are multiple possible
alternatives, and an agent has to choose in order to perform the
best action.
• The utility function maps each state to a real number to check how
efficiently each action achieves the goals.
12/09/2023
33
Utility-based agents
12/09/2023
34
Learning Agents
• A learning agent in AI is the type of agent that can learn from its past
experiences, or it has learning capabilities.
• It starts to act with basic knowledge and then is able to act and adapt
automatically through learning.
• A learning agent has mainly four conceptual components, which are:
• Learning element: It is responsible for making improvements by
learning from the environment
• Critic: The learning element takes feedback from the critic which
describes that how well the agent is doing with respect to a fixed
performance standard.
• Performance element: It is responsible for selecting external action
• Problem generator: This component is responsible for suggesting
actions that will lead to new and informative experiences.
• Hence, learning agents are able to learn, analyze performance, and look for
new ways to improve performance.
12/09/2023
35
Learning Agents
12/09/2023
36
AGENTS AND ENVIRONMENT
• Some programs operate in the entirely artificial
environment confined to keyboard input, database, computer file
systems and character output on a screen.
• In contrast, some software agents (software robots or soft bots) exist
in rich, unlimited soft bots domains. The simulator has a very
detailed, complex environment.
• The most famous artificial environment is the Turing Test
environment, in which one real and other artificial agents are tested
on equal ground.
• The success of an intelligent behavior of a system can be measured
with Turing Test.
• Two persons and a machine to be evaluated participate in the test.
Out of the two persons, one plays the role of the tester. Each of them
sits in different rooms. The tester is unaware of who is machine and
who is a human.
37
Properties/Features of Environment
• Discrete / Continuous
• Observable / Partially Observable
• Static / Dynamic
• Single agent / Multiple agents
• Accessible / Inaccessible
• Deterministic / Non-deterministic
• Episodic / Non-episodic
38
KNOWLEDGE
REPRESENTATION
12/09/2023
39
Introduction to knowledge
• Knowledge is the sort of information that people use to solve
problems.
• Knowledge is having familiarity with the language, concepts,
procedures, rules, ideas, places, customs, facts, and associations.
12/09/2023
Ref : https://nptel.ac.in/courses/126104006/LectureNotes/Week-3_Knowledge%20Representation.pdf https://
40
www.javatpoint.com/knowledge-representation-in-ai
Knowledge
• Definition and Importance of Knowledge
• Knowledge-Based Systems
• Knowledge Organization
• Representation of Knowledge
– Logic
– Associative Networks
– Frame Structures
– Conceptual graphs
12/09/2023
41
12/09/2023 42
Ref : https://nptel.ac.in/courses/126104006/LectureNotes/Week-3_Knowledge%20Representation.pdf
Introduction to Knowledge Representation (KR)
• The method used to encode knowledge in an KBS’s Knowledge base
• The field of AI dedicated to representing information about the world in a
form that a computer system can utilize to solve complex tasks
12/09/2023
https://www.javatpoint.com/ai-techniques-of-knowledge-representation 43
Why do we need Knowledge Representation?
12/09/2023 44
Ref : https://nptel.ac.in/courses/126104006/LectureNotes/Week-3_Knowledge%20Representation.pdf
Knowledge Representation Schemas
12/09/2023 45
Common Techniques/Issues of KR
12/09/2023
46
Object – Attribute – Value Triplets (O-A-V)
12/09/2023
47
Rules
12/09/2023
48
Structure of Rule
12/09/2023 49
Working Memory
12/09/2023 50
Inference Engine
12/09/2023 51
Semantic Networks
12/09/2023 52
Draw a Semantic Network
12/09/2023 53
12/09/2023 54
https://www.slideserve.com/kacy/knowledge-representation-techniques
Semantic Networks
12/09/2023 55
Associative Networks
12/09/2023
56
Associative Networks
Example :
mother(john, sue)
age(john,5)
wife(sue,max)
age(max,34)
mother age
Sue John 5
34 Max
age
12/09/2023
57
Associative Networks
12/09/2023
58
Associative Networks
12/09/2023
59
Knowledge-based agent and its Structure
• Knowledge-based agents are those agents who have the capability
of maintaining an internal state of knowledge, reason over that
knowledge, update their knowledge after observations and take
actions. These agents can represent the world with some formal
representation and act intelligently.
• Knowledge-based agents are composed of two main parts:
• Knowledge-base and
• Inference system.
• A knowledge-based agent must able to do the following:
• An agent should be able to represent states, actions, etc.
• An agent Should be able to incorporate new percepts
• An agent can update and deduce the internal representation of the
world. An agent can deduce appropriate actions.
60
The Structure of knowledge-based agent:
61
• Knowledge base: Knowledge-base is a central component of a
knowledge-based agent, it is also known as KB. It is a collection of
sentences (here 'sentence' is a technical term and it is not identical
to sentence in English). These sentences are expressed in a language
which is called a knowledge representation language. The
Knowledge-base of KBA stores fact about the world.
• Inference system:
• Inference means deriving new sentences from old. Inference system
allows us to add a new sentence to the knowledge base. A sentence is
a proposition about the world. Inference system applies logical rules
to the KB to deduce new information.
• Inference system generates new facts so that an agent can update
the KB. An inference system works mainly in two rules which are
given as:
• Forward chaining
• Backward chaining
62
• Operations Performed by KBA
• Following are three operations which are performed by KBA in
order to show the intelligent behavior:
• TELL: This operation tells the knowledge base what it perceives
from the environment.
• ASK: This operation asks the knowledge base what action it
should perform.
• Perform: It performs the selected action.
63
Knowledge Based Systems (KBS)
• A Knowledge-based system(KBS) is a computer program that
reasons and uses a knowledge base to solve complex problems.
• A system which is built around a knowledge base. i.e. a collection of
knowledge, taken from a human, and stored in such a way that the
system can reason with it.
• Uses AI to solve problems within a specialized domain that
ordinarily requires human expertise.
• Uses Heuristic (cause and effect) rather than algorithms.
• E.g.
– Expert Systems
– Clinical decision-support systems
• MYCIN, for example, was an early knowledge-based system
created to help doctors diagnose diseases
12/09/2023
64
KBS Examples
• Expert Systems
– One in which the knowledge, stored in the knowledge base, has
been taken from an expert in some particular field.
– Expert systems are designed to solve complex problems by
reasoning through bodies of knowledge, represented mainly as if–
then rules rather than through conventional procedural code.
– Therefore, an expert system can, to a certain extent, act as a
substitute for the expert from whom the knowledge was taken.
• Clinical decision-support systems
• MYCIN, for example, was an early knowledge-based system
created to help doctors diagnose diseases.
12/09/2023
65
KBS Architecture
12/09/2023
https://www.researchgate.net/figure/Expert-System-Architecture-23-Knowledge-Base_fig1_319208444 66
KBS Architecture
• User Interface
– Enables the user to
communicate with KBS
12/09/2023
67
KBS Architecture
KBS = Knowledge-Base + Inference Engine
• Knowledge Base
12/09/2023
68
Knowledge base System
Storing knowledge inside the program
#include<stdio.h> int
main()
{
}
Instead write the dob in text file and access the date of birth from
the text file Text file: dob.txt
20/08/1992
12/09/2023
69
KBS Architecture continued
• Inference Engine :
– Tries to derive answers from
knowledge base.
– Brain of KBS that provides a
methodology for reasoning about
the information in the knowledge
base and for formulating
conclusions.
12/09/2023
70
Example 1 for AI system:
Gender Identification Problem
• Male and female names have some distinctive
characteristics.
• Names ending in a, e and i are likely to be female.
• Names ending in k, n, r, s and t are likely to be male.
12/09/2023
71
Architecture of AI
Components of Knowledge base System
12/09/2023
72
List of Common Algorithms:
• Naive Bayes
• Decision Trees
• Linear Regression
• Support Vector Machines (SVM)
• Neural Networks
12/09/2023
73
Example 2 for AI system: Movie Rating
12/09/2023
74
Architecture of AI
Components of Knowledge base System
Input-output: Facebook, twitter and movie site comments about the movie.
12/09/2023
75
Architecture of AI
Components of Knowledge base System
12/09/2023
76
SEARCH ALGORITHM IN AI
77
SEARCH ALGORITHM TERMINOLOGIES
78
PROPERTIES OF SEARCH ALGORITHM
79
A* SEARCH
https://www.youtube.com/watch?
v=tvAh0JZF2YE
80
FRAME STRUCTURES
• Semantic networks morphed into Frame representation
Languages in the ‘70s and ‘80s.
• A frame is a lot like the notion of an
81
Frame
• A frame is a collection of
attributes and associated
values that describe some
entity in the world.
82
FRAME STRUCTURES
Example :
• (Jones)
• (Profession (Value
Lecturer))
• (Age (Value 25 ))
• (City (Value
Yelahanka))
• (State (Value
Karnataka))
* Note : value is a
Keyword.
83
84
85
86
Conceptual Graphs
• Conceptual graph
– A finite, connected, bipartite graph.
– No arc labels, instead the conceptual relation nodes represent relations between concepts
– Concepts are represented as boxes and conceptual relations as ellipses
– Nodes
• Concept Nodes – box nodes
– Concrete concepts:
» These concepts are characterized by our ability to form
an image of them in our minds.
» cat, telephone, classroom
» Concrete concepts include generic concepts such as cat
or book along with concepts of
specific cats and books
12/09/2023
87
Abstract objects:
• » Abstract Concepts that do not
correspond to images in our minds
• » love, beauty, loyalty
• Conceptual Relation Nodes – ellipse nodes
• – Relations involving one or more concepts
• – Some special relation nodes, namely,
agent, recipient, object, experiencer, are used to
link a subject and the verb
• – Arity – number of box nodes linked to
88
Conceptual Graphs
• Example :
12/09/2023
89
Conceptual Graphs
• Example:
Conceptual graph indicating that the dog named Emma is
brown.
12/09/2023
90
Example: Her name was McGill and she called herself
Lil, but everyone knew her as Nancy
12/09/2023 91
Conceptual Graphs
• Example:
• Advantage:
– Single relationship between multiple concepts is easily
representable.
12/09/2023
92
Example: Mary gave John the book
12/09/2023 93
Example: John is going to Boston by bus
• Each of the four concepts has a type
label, which represents the type of
entity the concept refers to: Person,
Go, Boston, or Bus.
• Two of the concepts have names,
which identify the referent: John
or Boston.
• Each of the three conceptual relations
has a type label that represents the
type of relation: agent (Agnt),
destination (Dest), or instrument
(Inst).
• The CG as a whole indicates that the
person John is the agent of some
instance of going, the city Boston is
the destination, and a bus is the
instrument.
12/09/2023
94
Example: John agent eat object soup instrument hand part
12/09/2023 95
Logic
12/09/2023
96
THANK YOU
97