Title: Aspects of Artificial Intelligence
1Aspects of Artificial Intelligence
2What is AI?
- One definition
- -the application of computers to areas normally
regarded as requiring human intelligence
3Some dictionary games
- Intelligence quickness of understanding
- Understanding ability to perceive the meaning
- Meaning that which is intended to be conveyed
- Intelligence is quickness of ability to perceive
that which is intended to be conveyed !!
4Are these intelligent?
- a simple calculator
- a program to find a path through a network
- a system which 'sees' a component and controls a
robot arm to build it into an assembly - Yes/No--- some say AI is the study of how to
make computers do things which at the moment
humans are better!!!!! - If a computer can do it, it isn't AI
5Another definition
- AI is the study of computations that make it
possible to - - perceive
- - reason
- - act
6AI
- AI is concerned with modelling both the
activities of the brain and the functions of
other parts of human beings - brain -gt recall and reasoning
- ears -gt speech recognition
- mouth -gt speech synthesis
- eyes-gt vision
- arms and legs -gt robotics
7AI is multidisciplinary!Interested parties
- Computer scientists, mathematicians and
electronic engineers - to build more useful
systems - Psychologists, neurophysiologists and
philosophers - to understand (using computer
models) the principles which make intelligence
possible - NB AI is still very much a research area.
8Strong vs Weak AI
- Will it ever be possible to build a complete
computer model of the human brain (mind) ? - Would such a model actually understand the
meaning of anything? Would it be conscious and
self conscious or are these mental qualities
peculiar to humans? - The strong view says
- the brain is a very complicated
information processing machine . Consciousness,
understanding etc are by-products of the
complicated symbol manipulation. We will be able
to model it. - The weak view says
- it will not be possible to model all the
properties of the human brain
9Central Issues in AI
- Knowledge representation
- Reasoning and control
- Learning (Knowledge acquisition)
- Handling uncertainty
- Forming plans
- Vision (object recognition, motion and video
analysis, scene understanding) - Speech (recognition, synthesis, story
comprehension)
10Knowledge Representation
- Symbolic verses sub symbolic
- cf your brain.
- Conscious processing tends to be symbolic
- Low level activity is electrochemical
- sub-symbolic
11Rules for knowledge Representation
- RULES
- IF a person P complains of symptom S
- AND drug D relieves symptom S
- THEN person P should take drug D
- FACTS
- GLOBAL
- aspirin relieves headache
- LOCAL
- john complains of headache
12REASONING with RULES
- involves forward and backward chaining through
rules - forward data driven
- backward goal driven
13Knowledge Rep Semantic Nets
14Semantic Nets
15Knowledge Rep Semantic Nets
- nodes are objects or concepts
- arcs are relations
- Reasoning involves graph search and graph
sub-graph matching
16Typical AI Applications
- Expert Systems
- medical diagnosis
- legal systems
- financial advisors
- fault diagnosis
- Intelligent software agents
- personalised information retrieval agents
- financial agents (automated share
dealing) - Robotics
- automated assembly
- autonomous vehicles
17Typical AI Applications (cont)
- Speech systems
- telephone answering systems
- (use speech recognition and speech
synthesis) - Vision systems
- industrial inspection
- robot guidance
- medical image analysis
- remotely sensed image analysis
18PROLOG
- A Symbolic Approach to AI
- Paul Lewis
19Logic and Computer-Based Reasoning
- Logic - invented by the Greeks to formalise
reasoning - How to spot false arguments
- How to put sound arguments
- How to INFER
- Mathematical Logic
- Propositional Calculus
- A B ? C
- Predicate Calculus
- complains_of(P,S) relieves(D,S)
unsuitable_for(D,P) - ?
should_take(P,D)
20PROLOG
- PROgramming in LOGic
- A declarative programming language
- (cf imperative languages like Basic,
Pascal, C) - Based on the predicate calculus
- Developed in about 1970 by Alain Colmerauer
- Uses resolution, a general rule of inference
21Programming in PROLOG
- Involves declaring facts and rules about objects
and their relationships (predicates) by placing
them in a computer file (the knowledge base) - Then asking questions of the knowledge base
(i.e. asking PROLOG to satisfy goals) - PROLOG uses its own built in reasoning mechanism
to do this - PROLOG programs are backward chaining (goal
driven) rule-based systems
22Facts and Rules in Prolog
- Facts and rules are expressed as clauses in
Prolog. - plays(john,football).
- designed to mean john plays football
- The interpretation is defined by the writer.
- parent(jim, jack).
- Jim is the parent of jack
- Constants begin with lowercase, variables with
upper case. - Rules have a head and a body e.g head-body. If
the body can - be shown to be true, the head is true. body ?
head. - older_than(X,Y) -
- age_of(X,AX),
- age_of(Y,AY),
- AX gt AY.
-
23A small PROLOG Knowledge Base
male(john). / john is male / male(paul). female(
emma). / emma is female / female(cath). likes(p
aul,cycling). / paul likes cycling
/ likes(cath,cycling). likes(john,X) -
female(x),likes(X,cycling). / john likes X if X
is female and X likes cycling /
- ?- consult(knowledgebase).
- yes
- ?- male(john).
- yes
- ?- female(paul).
- no
- ?- likes(paul,Y).
- Ycycling
- more(y/n) y
- no
- ?- likes(john,Something).
- Somethingcath
- more(y/n) y
- no
- ?-
24Recursion in Prolog
- parent(bill,fred).
- / bill is a parent of fred /
- parent(jack,bill).
- parent(jim,jack).
- ancestor(X, Y) - parent(X,Y).
- ancestor(X,Y) - parent(Z,Y),
ancestor(X,Z). - --------------------------------------------
----------- - ?- ancestor(jim,fred).
- yes
- ?-
25Lists in Prolog
- A list consists of a collection of items.
- john,jack,fred,jim
- A list has a head (first element)
- and a tail (LIST of all the other elements)
- HeadTail
- For list above Headjohn
- Tailjack,fred,jim
- A Prolog rule defining list membership.
- / member(X,L) means X is a member of list L /
- member( X , X _ ).
- member( X , _ T ) - member ( X , T ).
26Slightly Larger Knowledgebase
- / Global Facts /
- / Knowledge Base of Pain Killers /
- relieves(aspirin,headache).
- relieves(wonderdrug,headache).
- relieves(aspirin,toothache).
- relieves(penecillin,pneumonia).
- aggravates(aspirin,asthma).
- / Global Rules /
- should_takePerson,Drug)-
- complains_of(Person,Symptom),
- relieves(Drug,Symptom),
- not(unsuitable_for(Drug,Person)).
- unsuitable_for(Drug,Person)-
- aggravates(Drug,Symptom),
- suffers_from(Person,Symptom).
- ?- consult(filename).
- yes
- ?- should_take(john,D).
- Dwonderdrug
- more(y/n) y
- no
- ?-
27A Typical Expert System