You are on page 1of 61

Fundamentals of

ARTIFICIAL INTELLIGENCE
Rajendra Akerkar

INTRODUCTION
What is intelligence?
intelligence ?
no single exact definition
person may
what seems intelligent to one person,
not be so, for another person

Intelligence is studied from many


perspectives
hardcore AI: computer scientists
creating theories and programs to solve
computationally difficult problems
psychology:
h l
psychologists
h l i
interested
i
d in
i
human intelligence
cognitive scientists: similar to AI and
psych schools, except they want to
implement human models of intelligence
on the computer (ie. simulate neurology
behind vision)

Following
g characteristics are
suggestive of essential abilities for
possessing intelligence
responding to situations, flexibly
making sense of ambiguous/noisy
messages
assigning relative importance to
elements of a situation
finding similarities in situations even
though the situations might be different
drawing
d
i
distinctions
di i
i
between
b
situations
i
i
even though there may be many
similarities between them

Assuming
g that the mentioned
characteristics suggest the possession
of intelligence, following are examples
off tasks
k that
h require
i intelligence
i
lli

speech
h generation
ti
and
d understanding
d
t di
painting a sensible picture
recognizing the face of a friend
understanding a story or a fairy tale
g a moral delivered in a
understanding
discourse
making decisions, e.g. a doctor or a
company director
di
t

finding the shortest tour to visit a


number of places
playing chess well
moving in a dynamic obstacle filled
space
mathematical
h
i l theorem
h
proving
i
giving explanations
writing a program,
program etc.
etc

With this overview, some of the


definitions of Artificial Intelligence
are as follows

Artificial Intelligence (AI), is the study


of how to make computers do things, at
which, at the moment, humans are
better.
Artificial Intelligence (AI) is the branch
off computer science
i
dealing
d li
with
ih
symbolic methods of problem solving.
Artificial Intelligence (AI) is the study
of how to make computers get
knowledge from information, store,
update, and use it for problem-solving
in an environment, so as to reach the
desired goal.

But why
y computers?
p
Numerical computations
computers are definitely faster and
more accurate

Information storage
computers
t
can store
t
very h
huge amounts
t
of information

Repetitive operations
computers dont get fatigued or bored

How does the computer become


artificially intelligent?
The program running on the computer
makes it seem intelligent
in fact it is this program which is
artificially intelligent
such programs are called artificial
intelligence(ai)
g
( ) programs
p g

10

AI Programs
g
A complete AI program consists of two
components, namely,
knowledge base, and,
inference/reasoning engine

AI programs can be written in high level


languages like, C, C++, etc., or in special
purpose artificial intelligence languages
like, Lisp, Prolog, etc.

11

The knowledge base represents the


knowledge of the problem domain.
Several knowledge
g representation
p
models exist.
The inference/reasoning engine is an
algorithm which embodies the
capability to search for a solution in
th given
the
i
knowledge
k
l d base,
b
for
f the
th
relevant situation.
In principle
principle, the AI languages provide
in-built search capabilities.

INFERENCE ENGINE

13

Definition
An algorithm that
concludes by LOGICAL DEDUCTION using
the Knowledge Base
SEARCHES
C
S for conclusion in the
S
Knowledge Base
GENERATES the conclusion by a mixed
method
h d off LOGICAL DEDUCTION and
d
SEARCH techniques

14

Logical
g
Deduction
Example
Assume that we have the following facts
F(1): If it is hot and humid, then it will rain
F(2): If it is humid
humid, then it is hot
F(3): It is humid now
The question is: Will it rain?

15

The given
gi en facts are in English
We shall use symbols to represent them.
Let
P <=> It is hot
Q <=> It is humid
R<
<=>
> It will rain
^ <=> and
-> <=> imply
py

16

Using
i
the
h symbols
b l mentioned,
i
d the
h facts
f
stated can be represented as follows
F(1) : P ^ Q -> R
F(2) : Q -> P
F(3) : Q
In the above form of representation
representation, the
facts are now called as logical
formulas,, hence the deduction is
operating on symbolic logic

17

Conclusion
F(2) follows F(3)
F(3) says it is humid,
humid F(2) says,
says since it is
humid, it is hot.
F(1) follows F(2).
F(2)
Since F(2) says it is hot, and F(3) says it is
humid hence F(1) says it
humid,
it will rain
rain .

18

Logic
g
LOGIC is the ART OF CORRECT
REASONING/INFERENCING
but
What is meant by CORRECT?
CORRECT ?

19

CORRECTNESS
For the reasoning process to be called
CORRECT
CORRECT , it should possess the
following two properties
COMPLETENESS
SOUNDNESS

20

COMPLETENESS
This is the p
property
p y of a reasoning
g process
p
to conclude ALL the true facts over the
given set of statements

21

SOUNDNESS
This the property of the reasoning process,
to conclude no WRONG fact over the
given set of statements

22

Prepositional Logic
Simplest form of symbolic logic
Here we are interested in declarative
statements that can be either TRUE or
FALSE, but not both!
Definition
A
preposition
iti iis a declarative
d l
ti
statement which is either TRUE or
FALSE but not both.

23

Logical
g
Consequences
q
Definition
Given formulas F1,
F1 F2,
F2 , Fn and a
formula G, G is said to be a logical
consequence of F1, F2, , Fn (or G
logically follows from F1, F2, , Fn) if
and only if, for any interpretation I in
which F1 ^ F2 ^ ^ Fn is TRUE, G is also
TRUE

24

Theorem 1
Given formulas F1, F2, , Fn , and a
formula G
G, G is said to a logical
logical
consequence of F1, F2, , Fn, if and only
if, the formula
((F1 ^ F2 ^ ^ Fn) -> G)
is valid

25

Theorem 2
Given the formulas F1, F2, , Fn and a
formula G
G, G is said to be a logical
logical
consequence of F1, F2, , Fn, if and only
if, the formula
(F1 ^ F2 ^ ^ Fn ^ ~G)
is inconsistent

KNOWLEDGE BASE

27

Knowledge Representation Schemes

Logical representation
Procedural representation
Network representation
Structured Representation schemes

28

Logical
g
Representation
p
Schemes
Representation in formal Logic
Prepositional
Predicate

Rules can be considered as a subset of Predicate


logic
Prolog
g is an ideal language
g g for implementing
p
g
this.

29

Procedural Representation Scheme


Represents Knowledge as a set of instructions
for solving a problem
Rule based system is an example of this

30

Network Representation Schemes


Semantic Network
Maps of relationships utilizing nodes and links

Conceptual Graphs
Nodes in the maps are concepts or conceptual
relations.
l ti

Associationist theories define the meaning of an


object in the terms of a network of associations with
other objects in the mind or a KB.
Graphs by providing a means of explicitly
representing
i relations
l i
using
i arcs and
d nodes,
d h
have
proved to be an ideal vehicle for formalizing
associationist theories of knowledge.

31

Some Principles of Semantic


Networks

Semantic nets describe relationship


between things that are represented as
nodes
The nodes are circles that have names
The
h relationship
l i
hi between
b
nodes
d re
represented by arcs that connect the circles.
se a t c net
et can
ca be used to generate
ge e ate
A semantic
structures and objects.
Rules for a knowledge base

Thus a semantic network represents


knowledge as a graph with the nodes
corresponding to facts or concepts, and arcs
to relations or associations between
concepts.

32

Conceptual Graphs
A conceptual graph is a finite, connected, bipartite
graph.
Features
Concept nodes represents either concrete or
abstract objects in the world of discourse.
discourse
Conceptual relation nodes indicate a relation
involving one or more concepts
Each
h conceptuall graph
h represents one single
i l
proposition. A typical KB may contain a number of
such graphs. Graph may be arbitrarily complex, but
must be
b finite
fi i
Theory of Conceptual graphs includes a number of
p
that allow us to form new graphs
g p from
operations
existing graphs

33

Structured
S
d Representation
R
i S
Schemes
h
FRAMES
Extends semantic net in a number of
important ways
Procedural attachment is an important
feature of frames.
Representing knowledge with frame
system allows us to reason at least to some
extent, even though the information is
incomplete,
p
, and quickly
q
y infer facts that
are not explicitly observed.
One problem with frames is the difficulty
for establishing default value for a frame
accurately.

34

Structured Representation
Schemes - SCRIPTS

A representation
p
describing
g stereo type
yp sequence
q
of
events in particular context.
Components
Entry conditions - Description of the world that
must be true for the script to be called
Results - Fact that are true when the script is
terminated.
terminated
Props - Things that make up the context of the
script.
Roles
R l - Actions
A ti
off the
th individual
i di id l participant
ti i
t that
th t
form the actions of the scripts.
Scenes - Subparts of the script, Formed by breaking
the
h script
i into
i
parts on temporall aspect.

35

Technique for dealing with


complexity
Certainty
A mathematical property that attaches a
confidence factor to the conclusion reached by
rules
Modularization
Partitioning the rule base into modules
Blackboard
l kb
d
Concept is similar to a group of experts working
out the problem by standing around a black board

Technique for Dealing with


Complexity
Blackboard
Control Blackboard
Means of controlling the flow of a KB system by allowing the
module to schedule and p
prioritize p
processing
g
Data Blackboard
Means of processing information from one module of a system
to another

External Data Sources


Making use of sensors, historical data, data bases, etc. to avoid
asking the users

Back tracking
The retreat of the IE from the examination of the current
hypothesis in order to pursue another.

36

37

Knowledge
g Based Systems
y
- Desired Features
Ideal KB System should
Construct solutions selectively and efficiently from a space of
alternatives.
Identify useful ones and explore them further.
Keep eliminating not so useful ones till an optimal solution is
obtained
Intelligent Problem solving activity
Uses knowledge about that domain
Knowledge = beliefs+facts+heuristics
To achieve necessary success
Success = finding
g a good
g
solution with the available
resources.

38

Intelligent Problem Solving


Activity
Factor responsible for efficient solutions
Applicable, correct and discriminatory knowledge
Elimination of unproductive views
Multiple cooperative sources of knowledge
Dividing the solution at various levels of
abstraction

Factor which lead to difficulties


Wrong and errorful knowledge
Number of possibilities mighty be large
Complex procedures to rule them out
Dynamically changing problem

39

Architecture of a Knowledge
g Based System
y
Language
Processor

Facts and Rules

Justifier

Plan

Interpreter
p

Agenda

S h d l
Scheduler

Solution

Consistency
Enforcer

40

Ideal Architecture of a Knowledge


g Based
System
Language
g g Interface
To help the user to communicate in a problem oriented
way, handles user questions, commands
Provide justifications,
justifications and request for data when needed.
needed
Plan
A General method to attack problems in the domain
Agenda
Various actions that are applicable at any stage of the
problem solving
p
g
Solution
Record the partial solution of the problem.

41

Ideal Architecture of an Knowledge


g Based
System
Scheduler
Maintains control of the agenda and determines which pending
action has to be executed next.
I t
Interpreter
t
Executes a chosen agenda item by applying the corresponding
KB rule. Validates the relevant conditions.
Consistency Enforcer
It tries to maintain consistent representation of the emerging
solution
Justifier
Provides Explanation facility, answering user questions regarding
system
t actions
ti

Knowledge Based Systems vs


Conventional Programs
Conventional

KB Systems

Data Processing

Knowledge Processing

Representation and use of


static data

Representation and use of


data+control=knowledge

Algorithms

Heuristics

Repetitive Process

Inferential Process

Few control and Large data


data, Large control and few data
kept seperately
kept together
42

43

Generic Knowledge Based System


Architecture

Inference Engine
User
Interface
Knowledge Base

44

Generic Knowledge
g Based System
y
Architecture
User Interface (UI)
Editor to Input Knowledge
Knowledge
K
l d debugger
d b
Display conclusion
Userdata
Request for
Interface
Explanation
of actions
Knowledge Base

45

Generic Knowledge Based System


Architecture
Knowledge Base
Represents the knowledge of the problem
domain.
domain
Several knowledge representation models exist.
Inference/Reasoning Engine
Algorithm which embodies the capability to
search for a solution in the given knowledge
base, for the relevant situation.
AI llanguages provide
id iin-built
b ilt search
h
capabilities.

46

Knowledge Based System


Development Phases
Identifying
y g Problem
Characteristics

Requirements

IDENTIFICATION

Find concepts to
Represent K.B.
Reformulation

C
Concepts

CONCEPTUALIZATION

Design structures to
organize knowledge

Structures

FORMALIZATION

Reformulation
Redesign

Formulate rules to
embody knowledge

Rules

IMPLEMENTATION

Validate rules
TESTING
Acquisition and Organisation

Representation and Implementation

47

Knowledge
g Based System
y
Development Phases
Identification
Participants
Problem

Class of problems ES expected to solve


Definition and characterization
S b problems
Sub
bl
and
d partitioning
titi i off the
th ttasks
k
Data available
p
terms and interrelations
Important
Required kind of solutions
Aspect of human expertise essential

Resource
Goal

48

Knowledge Based System


Development Phases
Conceptualization
p
Make concepts and relationship identified in the
earlier stages more explicit

What type of data available ?


What is given and what has to be inferred ?
Do sub tasks have names ?
Do strategies have names ?
Are there identifiable partial hypothesis that are
commonly used ? If so what are they ?
Can we represent concepts and relationships
diagrammatically
d
g
c y?
What are the constrain on these processes ?
What is the information flow pattern ?

49

Knowledge Based System


Development Phases
Formalisation
Involves mapping the key concepts, subproblems, and
information flow characteristics identified in the
previous stage into more formal representation based
on various knowledge engineering tools.
Knowledge Engineer has to identify the suitable shell.
Knowledge Representation Format
Data types provided
Inferencing strategy

50

Knowledge
g Based System
y
Development Phases
Formalisation

Concepts are structured objects or primitives ?


Is casual or spatio-temporal relationships among concepts inportant ?
Are the concept and hypothesis space finite or not?
Are there uncertainties and other judgemental elements related to the final
and intermediate hypothesis ?
Is hypothesis hierarchy present or not?
Type of process model purely judgemental or mathmatical and
judgemental ?
Data
D t model
d ld
depends
d on
Completeness, consistency
Is there any relationship between logical interpretation and their order
of occurrence over time ?

51

Knowledge
g Based System
y
Development Phases
Implementation
Mapping the formalized knowledge from the
previous
i
stage into
i
the representational
i
frame
f
work.
Development of a prototype system is extremely
important

52

Knowledge Based System


Development Phases

Testing

Evaluating the prototype and representational


forms.
Test the prototype with examples
Test with real world problems.
Causes
C
off poor performance
f
I/O characteristics which refers to knowledge acquisition and
conclusion presentation
Incorrect, incomplete, and inconsistent inference rules
Control strategy (sequencing the rules)
Test example selection (Homogeneous examples)

53

Intelligent Agents

What is an Agent ?
What are a multi agent systems ?
H it
How
i is
i used
d for
f solving
l i problems
bl
?
Stages involved in the development
process.

54

What is an Agent
g
?

A simple way to conceptualize an agent is that of a


process (software) which has some properties
listed below.
Autonomy
Ability to operate without direct intervention of
humans or others.

Social Ability
Ability to communicate with human and other agents

Pro
Pro-activeness
activeness
Ability to take initiative and exhibit goal directed
behaviour.

Reactivity
Ability to perceive the environment respond to its
changes

Intelligence
Have human like mentalistic notions of knowledge,
beliefs, intentions and obligations

What is an Agent ?
Veracity
Not knowingly communicating false information.

Benevolence
Assumption that agents do not have conflicting goals

Rationality
Acting to achieve its goals and not preventing their
achievement.
achievement

Selectivity
Ability to focus attention on what is needed and ignoring
the rest

Robustness
Ability to cope up with failures and tolerate
imperfections

A close look at an Agent reveal that basically it is an


g Based System
y
with inherent p
processing
g
Knowledge
powers besides
deduction.

55

56

Multi Agent
g
Systems
y
Systems Comprising of multiple
autonomous agents.
agents
ISSUES
Homogeneity of the Knowledge
representation
p
Agent Communication Protocol
Topology
Reliability and Security of Communication

57

System Status Monitor


Consider
id a Production
d
i
Plant
l
It may have many complex sub systems
Status
St t off th
the plant
l t will
ill d
depend
d on
status of all the subsystems
Each subsystem can have various states
Based on the state of each sub system,
certain action has to be taken for
smooth functioning of the Plant

58

System Status Monitor


- An Agent based Perception
System Monitor
Agent

Agent -1

Agent -2

Sub system
1

Sub system
1

Agent -n

Sub system
1

59

Multi Agent Systems


- Hierarchical
Agent - 0

Agent -1/1

Agent -1/2

...

Agent -2/1

Agent -2/2

Agent -3/2

...

Agent -4/2

...

60

Agent Oriented Analysis & Design


Extension of Object Oriented Analysis & Design
Only Agents can perceive events, perform actions.
Objects are passive entities with no such capacities.
State of an Object has no generic structure but an
A
Agent
has
h mentalistic
li i structure consists
i off mentall
component such as beliefs .
Messages in OO Systems are coded in application
specific manner but Agent Communication
Language can be application independent.

61

Agent
ge O
Oriented
e ed Analysis
ys s &
Design
Abstraction level of Object Oriented Analysis & Design
should be level at which each object represents an Agent
(Knowledge Based System).
Based on the structure, each agent can be developed
i di id ll as explained
individually
l i d in
i the
h Knowledge
l d Basedd
Systems development process.
All the
th required
i d abilities
biliti should
h ld be
b implemented
i l
t d as the
th
part of the Knowledge Based System to make it as an
Agent.
Agent

You might also like