artificial intelligence
-
Upload
rajendra-akerkar -
Category
Education
-
view
7 -
download
0
description
Transcript of artificial intelligence
Fundamentals of ARTIFICIAL INTELLIGENCEARTIFICIAL INTELLIGENCE
Rajendra Akerkar
2
INTRODUCTION
• What is “intelligence”?What is intelligence ?
▫ no single exact definition▫ what seems intelligent to one person may what seems intelligent to one person, may
not be so, for another person
• Intelligence is studied from many
3
perspectives▫ hardcore AI: computer scientists
creating theories and programs to solve creating theories and programs to solve computationally difficult problems
h l h l i i d i ▫ psychology: psychologists interested in human intelligence
▫ cognitive scientists: similar to AI and psych schools, except they want to implement human models of intelligence implement human models of intelligence on the computer (ie. simulate neurology behind vision)
• Following characteristics are
4
gsuggestive of essential abilities for possessing intelligence▫ responding to situations, flexibly▫ making sense of ambiguous/noisy
messagesmessages▫ assigning relative importance to
elements of a situation▫ finding similarities in situations even
though the situations might be differentd i di i i b i i▫ drawing distinctions between situations even though there may be many similarities between themsimilarities between them
• Assuming that the mentioned
5
gcharacteristics suggest the possession of intelligence, following are examples
f k h i i lliof tasks that require intelligence
h ti d d t di▫ speech generation and understanding▫ painting a sensible picture▫ recognizing the face of a friendrecognizing the face of a friend▫ understanding a story or a fairy tale▫ understanding a moral delivered in a g
discourse▫ making decisions, e.g. a doctor or a
di tcompany director
▫ finding the shortest tour to visit a
6
▫ finding the shortest tour to visit a number of places
▫ playing chess well▫ moving in a dynamic obstacle filled
spaceh i l h i▫ mathematical theorem proving
▫ giving explanations▫ writing a program etc▫ writing a program, etc.
With this overview, some of the With this overview, some of the definitions of “Artificial Intelligence” are as follows
• Artificial Intelligence (AI), is the study
7
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 f i d li i h of computer science dealing with
symbolic methods of problem solving.• Artificial Intelligence (AI) is the study • Artificial Intelligence (AI) is the study
of how to make computers get knowledge from information, store, knowledge from information, store, update, and use it for problem-solving in an environment, so as to reach the desired goal.
8
But why computers?y p• Numerical computations▫ computers are definitely faster and
more accurate• Information storage
t t h t ▫ computers can store very huge amounts of information
• Repetitive operations• Repetitive operations▫ computers don’t get fatigued or bored
9
How does the computer become artificially intelligent?artificially intelligent?• The program running on the computer
makes it seem intelligentmakes it seem intelligent• in fact it is this program which is
artificially intelligentartificially intelligent• such programs are called artificial
intelligence(ai) programsg ( ) p g
10
AI Programsg• A complete AI program consists of two
components, namely,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 purpose artificial intelligence languages like, Lisp, Prolog, etc.
• The knowledge base represents the
11
• The knowledge base represents the knowledge of the problem domain. Several knowledge representation g pmodels exist.
• The inference/reasoning engine is an algorithm which embodies the capability to “search” for a solution in th i k l d b f th the given knowledge base, for the relevant situation.
• In principle the AI languages provide • In principle, the AI languages provide in-built search capabilities.
INFERENCE ENGINEINFERENCE ENGINE
13
Definition• An algorithm that▫ concludes by LOGICAL DEDUCTION using ▫ concludes by LOGICAL DEDUCTION using
the Knowledge Base▫ SEARCHES for conclusion in the S C S
Knowledge Base▫ GENERATES the conclusion by a mixed
h d f dmethod of LOGICAL DEDUCTION and SEARCH techniques
14
Logical DeductiongExample Assume that we have the following factsAssume that we have the following factsF(1): If it is hot and humid, then it will rainF(2): If it is humid then it is hotF(2): If it is humid, then it is hotF(3): It is humid nowThe question is: Will it rain?The question is: Will it rain?
The gi en facts are in English
15
The given facts are in EnglishWe shall use symbols to represent them. LetLet
P <=> It is hotP <=> It is hotQ <=> It is humidR <=> It will rainR < > It will rain^ <=> and-> <=> implyp y
i h b l i d h f
16
Using the symbols mentioned, the facts stated can be represented as follows
F(1) : P ^ Q -> RF(2) : Q -> PF(2) : Q -> PF(3) : QIn the above form of representation the In the above form of representation, the
facts are now called as logical formulas, hence the deduction is ,operating on “symbolic logic”
17
ConclusionF(2) follows F(3)F(3) says it is humid F(2) says since it isF(3) says it is humid, F(2) says, since it ishumid, it is hot.F(1) follows F(2)F(1) follows F(2).Since F(2) says it is hot, and F(3) says it ishumid hence F(1) says “it will rain”humid, hence F(1) says it will rain .
18
LogicgLOGIC is the ART OF “CORRECT”
REASONING/INFERENCINGREASONING/INFERENCING
butbut
What is meant by “CORRECT”?What is meant by CORRECT ?
19
CORRECTNESSFor the reasoning process to be called
“CORRECT” it should possess the CORRECT , it should possess the following two properties
COMPLETENESSSOUNDNESS
20
COMPLETENESS
This is the property of a reasoning process p p y g 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!
DefinitionA “ iti ” i d l ti A “preposition” is a declarative
statement which is either TRUE or FALSE but not both.FALSE but not both.
23
Logical Consequencesg qDefinitionGiven formulas F1 F2 Fn and a Given formulas F1, F2, … , Fn and a
formula G, G is said to be a logical consequence of F1, F2, … , Fn (or G 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 1Given formulas F1, F2, … , Fn , and a
formula G G is said to a “logical formula G, G is said to a logical consequence” of F1, F2, … , Fn, if and only if, the formula if, the formula
((F1 ^ F2 ^ … ^ Fn) -> G)is valid
25
Theorem 2Given the formulas F1, F2, … , Fn and a
formula G G is said to be a “logical formula G, G is said to be a logical consequence” of F1, F2, … , Fn, if and only if, the formulaif, the formula
(F1 ^ F2 ^ … ^ Fn ^ ~G) is inconsistent
KNOWLEDGE BASEKNOWLEDGE BASE
27
Knowledge Representation Schemes• Logical representation• Procedural representationProcedural representation• Network representation• Structured Representation schemesStructured Representation schemes
28
Logical Representation Schemesg p• Representation in formal Logic▫ Prepositional▫ Prepositional▫ Predicate
• Rules can be considered as a subset of Predicate Rules can be considered as a subset of Predicate logic
• Prolog is an ideal language for implementing g g g p gthis.
29
Procedural Representation Scheme
• Represents Knowledge as a set of instructions for solving a problemfor solving a problem
• Rule based system is an example of this
Network Representation Schemes
30
Network Representation Schemes• Semantic Network▫ Maps of relationships utilizing nodes and linksMaps of relationships utilizing nodes and links
• Conceptual Graphs▫ Nodes in the maps are concepts or conceptual
l tirelations.Associationist theories define the meaning of an
object in the terms of a network of associations with 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 i l i i d d h representing relations using arcs and nodes, have
proved to be an ideal vehicle for formalizing associationist theories of knowledge.associationist theories of knowledge.
Some Principles of Semantic 31
Networks• Semantic nets describe relationship
between things that are represented as between things that are represented as nodes
• The nodes are circles that have namesh l i hi b d• The relationship between nodes re
represented by arcs that connect the circles.• A semantic net can be used to generate se a t c et ca be used to ge e ate ▫ structures and objects.▫ Rules for a knowledge base
Thus a semantic network represents Thus a semantic network represents knowledge as a graph with the nodes corresponding to facts or concepts, and arcs to relations or associations between to relations or associations between concepts.
Conceptual Graphs32
A conceptual graph is a finite, connected, bipartite graph.graph.
Features• Concept nodes represents either concrete or
abstract objects in the world of discourseabstract objects in the world of discourse.• Conceptual relation nodes indicate a relation
involving one or more conceptsh l h i l• Each conceptual graph represents one single
proposition. A typical KB may contain a number of such graphs. Graph may be arbitrarily complex, but
b fi imust be finite• Theory of Conceptual graphs includes a number of
operations that allow us to form new graphs from p g pexisting graphs
S d R i S h
33
Structured Representation Schemes -FRAMES
• Extends semantic net in a number of important ways
• Procedural attachment is an important • 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, and quickly infer facts that p , q yare not explicitly observed.
• One problem with frames is the difficulty for establishing default value for a frame for establishing default value for a frame accurately.
Structured Representation
34
Structured Representation Schemes - SCRIPTS
A representation describing stereo type sequence of p g yp qevents in particular context.
Components• Entry conditions - Description of the world that 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
terminatedterminated.• Props - Things that make up the context of the
script.R l A ti f th i di id l ti i t th t • Roles - Actions of the individual participant that form the actions of the scripts.
• Scenes - Subparts of the script, Formed by breaking h i i l the script into parts on temporal aspect.
35
Technique for dealing with complexitycomplexity• Certainty▫ A mathematical property that attaches a ▫ A mathematical property that attaches a
confidence factor to the conclusion reached by rules
• Modularization▫ Partitioning the rule base into modules
l kb d• Blackboard▫ Concept is similar to a group of experts working
out the problem by standing around a black boardout the problem by standing around a black board
Technique for Dealing with 36
Complexity• Blackboard▫ Control Blackboard
Means of controlling the flow of a KB system by allowing the module to schedule and prioritize processingp p g
▫ Data BlackboardMeans of processing information from one module of a system to anotherto 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 ▫ The retreat of the IE from the examination of the current
hypothesis in order to pursue another.
Knowledge Based Systems 37
g 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+heuristicsKnowledge beliefs+facts+heuristics
• To achieve necessary successSuccess = finding a good solution with the available g g
resources.
Intelligent Problem Solving 38
Factor responsible for efficient solutionsActivity
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 abstractionabstraction
Factor which lead to difficulties• Wrong and errorful knowledge • Number of possibilities mighty be large• Complex procedures to rule them out• Complex procedures to rule them out• Dynamically changing problem
Architecture of a Knowledge Based System
39
Facts and RulesLanguageProcessor
g y
Justifier
Processor
InterpreterPlan p
S h d l
Plan
SchedulerAgenda
Consistency EnforcerSolution
Ideal Architecture of a Knowledge Based
40
Language Interface
gSystem
g gTo help the user to communicate in a problem oriented way, handles user questions, commandsProvide justifications and request for data when neededProvide justifications, and request for data when needed.
PlanA General method to attack problems in the domain
AgendaVarious actions that are applicable at any stage of the problem solving p g
SolutionRecord the partial solution of the problem.
Ideal Architecture of an Knowledge Based
41
Scheduler
gSystem
SchedulerMaintains control of the agenda and determines which pending action has to be executed next.
I t tInterpreterExecutes a chosen agenda item by applying the corresponding KB rule. Validates the relevant conditions.
Consistency EnforcerIt tries to maintain consistent representation of the emerging solutionsolution
JustifierProvides Explanation facility, answering user questions regarding
t tisystem actions
Knowledge Based Systems vsConventional ProgramsConventional KB SystemsConventional 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 Large control and few dataFew control and Large data, kept seperately
Large control and few data kept together
42
43
Generic Knowledge Based System Architecture
User
Inference Engine
UserInterface
Knowledge Base
Generic Knowledge Based System 44
g yArchitecture
User Interface (UI)•Editor to Input KnowledgeK l d d b
User
•Knowledge debugger•Display conclusion•Request for dataUser
Interface•Request for data•Explanation of actions
Knowledge Base
Generic Knowledge Based System45
Generic Knowledge Based System Architecture
Knowledge Base• Represents the knowledge of the problem domaindomain. • Several knowledge representation models exist.
Inference/Reasoning Engine•Algorithm which embodies the capability to“search” for a solution in the given knowledgebase, for the relevant situation.
AI l id i b ilt h• AI languages provide in-built search capabilities.
Knowledge Based System
46
Knowledge Based System Development Phases
Identifying Problem
Find concepts to
y gCharacteristics
C
Requirements
IDENTIFICATION
Design structures to
Find concepts toRepresent K.B.
Structures
Concepts
CONCEPTUALIZATIONReformulation
organize knowledge
Formulate rules to
Structures
FORMALIZATION
RedesignReformulation
embody knowledge
Validate rules
RulesIMPLEMENTATION
Redesign
TESTING
Representation and ImplementationAcquisition and Organisation
Knowledge Based System 47
g yDevelopment Phases
• Identification– Participants– Problem
• Class of problems ES expected to solve• Definition and characterization
S b bl d titi i f th t k• Sub problems and partitioning of the tasks• Data available• Important terms and interrelationsp• Required kind of solutions• Aspect of human expertise essential
– Resource– Goal
Knowledge Based System 48
Development Phases• Conceptualizationp
– 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 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 ?
Knowledge Based System 49
Development Phases• Formalisation• Formalisation
– Involves mapping the key concepts, subproblems, and information flow characteristics identified in theinformation 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
Knowledge Based System 50
g yDevelopment Phases
• Formalisation• 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 ?D t d l d d– Data model depends on
• Completeness, consistency• Is there any relationship between logical interpretation and their order
of occurrence over time ?of occurrence over time ?
Knowledge Based System 51
g yDevelopment Phases
• Implementation– Mapping the formalized knowledge from the
i i i fprevious stage into the representational frame work.Development of a prototype system is extremely– Development of a prototype system is extremely important
Knowledge Based System 52
Development Phases• Testing
– Evaluating the prototype and representational forms.
– Test the prototype with examples– Test with real world problems.
C f f– Causes of poor performance• 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)Test example selection (Homogeneous examples)
53
Intelligent Agents
• What is an Agent ?What is an Agent ?• What are a multi agent systems ?
H i i d f l i bl ?• How it is used for solving problems ?• Stages involved in the development
process.
What is an Agent ?54
gA 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-activeness• Pro activeness▫ Ability to take initiative and exhibit goal directed
behaviour. • Reactivity• Reactivity▫ Ability to perceive the environment respond to it’s
changes• Intelligence• Intelligence▫ Have human like mentalistic notions of knowledge,
beliefs, intentions and obligations
What is an Agent ?55
• 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 restthe rest• Robustness▫ Ability to cope up with failures and tolerate
imperfections
A close look at an Agent reveal that basically it is an Knowledge Based System with inherent processing g y p g
powers besides deduction.
Multi Agent Systems56
g y• Systems Comprising of multiple
autonomous agentsautonomous agents.
ISSUESISSUES• Homogeneity of the Knowledge
representationp• Agent Communication Protocol• Topology• Reliability and Security of Communication
System Status Monitor
57
System Status Monitor
id d i l• Consider a Production Plant• It may have many complex sub systems
St t f th l t ill d d • Status of the plant will depend on status of all the subsystems
• Each subsystem can have various states• Each subsystem can have various states• Based on the state of each sub system,
certain action has to be taken for certain action has to be taken for smooth functioning of the Plant
System Status Monitor58
- An Agent based Perception
System MonitorAgent
Agent -1 Agent -2 Agent -n
Sub system1
Sub system1
Sub system1
Multi Agent Systems59
- Hierarchical
Agent - 0
Agent -1/1 Agent -2/1
Agent -4/2Agent -1/2 Agent -2/2 Agent -3/2
. . . . . . . . .
Agent Oriented Analysis & Design
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 h li i i f l Agent has mentalistic structure consists of mental component such as beliefs .Messages in OO Systems are coded in application • Messages in OO Systems are coded in application specific manner but Agent Communication Language can be application independent.Language can be application independent.
Agent Oriented Analysis & 61
ge O e ed 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 l i d i h l d dindividually as explained in the Knowledge Based Systems development process.All th i d biliti h ld b i l t d th• All the required abilities should be implemented as the part of the Knowledge Based System to make it as an AgentAgent.