What is AI?
s Various definitions:
x Building intelligent entities.
x Getting computers to do tasks which require
s But what is “intelligence”?
s Simple things turn out to be the hardest to
x Recognising a face.
x Navigating a busy street.
x Understanding what someone says.
s All tasks require reasoning on knowledge.
Why do AI?
s Two main goals of AI:
x To understand human intelligence better. We
test theories of human intelligence by writing
programs which emulate it.
x To create useful “smart” programs able to do
tasks that would normally require a human
Who does AI?
s Many disciplines contribute to goal of
creating/modelling intelligent entities:
x Computer Science
x Psychology (human reasoning)
x Philosophy (nature of belief, rationality, etc)
x Linguistics (structure and meaning of
x Human Biology (how brain works)
s Subject draws on ideas from each discipline.
Typical AI Problems
s Intelligent entities (or “agents”) need to be able to do
both “mundane” and “expert” tasks:
s Mundane tasks - consider going shopping:
x Planning a route, and sequence of shops to visit!
x Recognising (through vision) buses, people.
x Communicating (through natural language).
x Navigating round obstacles on the street, and
manipulating objects for purchase.
s Expert tasks are things like:
x medical diagnosis.
x equipment repair.
s Often “mundane” tasks are the hardest.
s What is intelligence?
s Can a machine be truly “intelligent”? Is there more to
human intelligence than rules, data and calculations?
s Turing Test: Can someone tell which is the machine,
when communicating to human and to a machine in
another room? If not, can we call the machine
s Chinese room: Searle says no. Describes a thought
experiment where talk in Chinese by looking up what
to say from huge rule book.
s Loebner contest: Contest for most human-like
Example conversation with system
winning Loebner prize
s P: No worries! Hey! I didn’t come here to be subjected to
bad language! How rude!
s J: Sorry, sorry. Didn’t mean to offend. So, how old are
s P: That’s OK. Just don’t do it again. Well, should my age
really matter. Just for the record I’m 24. How old are you
But.. System was based on fairly simple methods, with pre-
stored amusing replies. These simple methods first used
in “Eliza” - a program to emulate psychotherapist.
Try esc-x doctor while in emacs for a version of Eliza.
s Human-like performance doesn’t guarantee intelligence.
About this Module
Covers following AI topics
x AI Programming, using Prolog.
x Knowledge representation:
3 How do we represent knowledge about the world in
a formal manner that can be manipulated in a sound
and efficient manner?
3 How can an AI system go through all the possibilities
in a systematic manner when looking for solutions to
About this Module
x Natural Language:
3 How can a system communicate in a natural
language such as English.
x Machine learning and neural networks:
3 How can a system learn from experience, or
from past case data.
3 How can we develop and use practical
x Knowledge Engineering:
3 How do we elicit the human expertise required
to build intelligent applications.
Labs and Coursework
s Weekly lab, starting Wed 16th April!
s Labs give you experience of two AI programming
languages: Prolog and NetLogo.
s Weeks 1-4: Exercises on AI Programming in
x Some of these must be “ticked off” by Lab
demonstrators and will contribute to your
s Weeks 5-8: NetLogo with assessed exercise.
s “Essence of Artificial Intelligence” by Alison
Cawsey, Prentice Hall.
x Review: “I missed most of the lectures but thanks to this short
and sweet book I passed my first year introduction to AI course.
If you are a slack student taking an AI course - buy this book. “
s Artificial Intelligence: A Modern Approach (second
edition), Russell & Norvig, Prentice Hall. 2003
s Artificial Intelligence: Structures and Strategies for
Complex Problem Solving, Luger, Benjamin Cummings.
s Slides, lab exercises etc for weeks 1-4 on
s Programming (software engineering).
s CS students will benefit from:
x Logic and Proof
s IT students will benefit from
x Cognitive Science.
s Relevant material from logic and proof will be
reviewed again for benefit of IT students.
Getting Started with Prolog
s Prolog is a language based on first order
predicate logic. (Will revise/introduce this later).
s We can assert some facts and some rules, then
ask questions to find out what is true.
s Facts: likes(john, mary).
s Note: lower case letters, full stop at end.
likes(fred, X) :- tall(X).
examines(Person, Course) :- teaches(Person, Course).
x John likes someone if that someone is tall.
x A person examines a course if they teach that
x NOTE: “:-” used to mean IF. Meant to look a bit
like a backwards arrow
x NOTE: Use of capitals (or words starting with
capitals) for variables.
s Your “program” consists of a file containing
facts and rules.
s You “run” your program by asking “questions”
at the prolog prompt.
|?- likes(fred, X).
s John likes who?
s Answers are then displayed. Type “;” to get
more answers: (Note: darker font for system output)
X = john ? ;
X = sue ? ;
Prolog and Search
s Prolog can return more than one answer to a
s It has a built in search method for going
through all the possible rules and facts to
obtain all possible answers.
s Search method “depth first search” with
s AI about creating intelligent entities, with a
range of abilities such as language, vision,
s Intelligence involves knowledge - this must be
represented with and reasoned with.
s Solving problems involves search.
s Prolog is a language geared to representing
knowledge and searching for solutions.
s Prolog programs based on facts and rules, and
run by asking questions.