This module introduces basic AI programming techniques and explains
how these can be used to write programs to solve typical AI problems
(e.g., those introduced in G51IAI and G52PAS). The programming
techniques are introduced through the AI programming language Prolog,
however the emphasis is on transferrable AI programming skills rather
than language specific details.
Lectures
Lectures are on Wednesdays at 12:00 and Thursdays at 14:00 in C60
(CS). Note that there are no lectures on the 9th and 10th of May.
Labs
Labs are on Tuesdays between 15:00-17:00 in B52 (Networking Lab) in CS.
Labs start on the 14th of February and continue until the end of the
Spring term. Note that there are no labs in the Summer term.
There are two lab groups
- group 1: 15:00 - 16:00
- group 2: 16:00 - 17:00
you can find your lab group
here. To
ensure that there are enough PCs, please attend the lab for your
group. If you would prefer to be in the other group, you can arrange
to swap with a student in the other group (please email me if you
arrange a swap with another student).
Dates and exercises for each lab can be
found below. On days when labs are scheduled I'll
be in the lab to answer questions - you will get more out of the labs
if you prepare beforehand and know which questions you want to ask.
Assessment
Assessment is by coursework (25%) and exam (75%).
Coursework
A description of the coursework can be
found here, and model
solutions to the coursework here.
Submissions
Submissions are due at 16:00 on Monday the 2nd of April
and should be made electronically using
the coursework
submission system. The ID for the coursework is 470.
Recommended Reading
- Bratko (2001),
Prolog Programming for Artificial Intelligence, (3rd
edition), Pearson.
or the 2nd edition, which covers all the material required for the module.
- Sterling & Shapiro (1994), The Art of Prolog, (2nd
Edition), MIT Press.
Further Reading
- Russell & Norvig (2010),
Artificial Intelligence: A Modern Approach, Prentice Hall.
or the first or second editions, which cover all the material needed for the
module (though the treatment of planning is better in the 3rd edition).
- Blackburn, Bos & Striegnitz
(2006)
Learn Prolog Now! College Publications.
Focuses on Natural Language Processing, but there is a free online
version of the book.
Note that there is also a version of
the reading
list with links to the University Library catalogue.
Prolog Implementations
The version of Prolog used in the lectures and labs is SICStus Prolog
version 4. The SICStus documentation is available here in a
variety of formats. If you want to use the Emacs interface to SICStus
prolog (recommended), add the following two lines to the file
~/.emacs.d/init.el
(load "/usr/packages/sicstus4.1.3/lib/sicstus-4.1.3/emacs/sicstus_emacs_init.el")
(setq prolog-indent-width 4)
SICStus Prolog is a commercial product, and is
only available on the CS Linux servers (e.g., bann). However there are
many free versions of Prolog available for most operating systems that
you can use on your own PC. These are mostly compatible with SICStus
Prolog, except for some of the libraries. A useful list of free Prolog
implementations can be found on the
Learn Prolog Now!
web page (follow the "Prolog Implementations" link).
Other Resources
The AAAI Springboard
page also has lots of references to AI topics.
Suggested Reading
Note that the following list of suggested reading is provisional,
as it may necessary to change the order in which topics are presented.
- Lecture 1 Introduction: Russell & Norvig (2010), chapter 1;
Bratko (2001), chapter 1.
- Lecture 2 Prolog syntax: Bratko (2001), chapter 1.
- Lecture 3 Prolog execution: Bratko (2001), chapter 2.
- Lecture 4 Recursive programs: Bratko (2001), chapter 3.
- Lecture 5 Lists: Bratko (2001), chapter 3.1, 3.2.
- Lecture 6 Backtracking: Bratko (2001), chapter 1.4; chapter 5.
- Lecture 7 Second order programming: Bratko (2001), chapter
7.6.
- Lecture 8 Depth first search in Prolog: Bratko (2001), chapter
11.1, 11.2
- Lecture 9 Iterative deepening search: Bratko (2001), chapter 7.
- Lecture 10 Breadth first search: Bratko (2001), chapter 11.3.
- Lecture 12 Informed search: Bratko (2001), chapter 12.
- Lecture 13 Local search: Bratko (2001), chapter 12.
- Lecture 14 (Forward) Planning: Bratko (2001), chapter 17.
- Lecture 15 Regression planning: Bratko (2001), chapter 17.
- Lecture 16 Further regression: Bratko (2001), chapter 17.
Lecture Slides
- Lecture 1 Introduction:
Slides
- Lecture 2 Prolog syntax:
Slides
- Lecture 3 Prolog execution:
Slides
family.pl example Prolog program
- Lecture 4 Recursive programs:
Slides
- Lecture 5 Lists:
Slides
- Lecture 6 Backtacking:
Slides
- Lecture 7 Second order programming:
Slides
- Lecture 8 Depth first search in Prolog:
Slides
- Lecture 9 Iterative deepening search:
Slides
- Lecture 10 Breadth first search:
Slides
- Lecture 11 Representing states:
Slides (with typo fixed)
- Lecture 12 Non-path problems:
Slides (with cut on
slide 30 fixed)
- Lecture 13 (Forward) Planning:
Slides (STRIPS operator
preconditions fixed)
- Lecture 14 Regression planning:
Slides
- Lecture 15 Further regression:
Slides
- Lecture 16 Partial order planning:
Slides
- Lecture 17 Coursework model solutions:
Slides
- Lecture 18 Revision: Slides
- Lab 1: Getting started on Tuesday the 14th of February.
Slides
family.pl example Prolog program. For
the first lab, you should read at least sections 3.1-3.8 of the
SICStus prolog documentation.
- Lab 2: Lists on Tuesday the 21st of February.
Slides
- Lab 3: Second order programming on Tuesday the 28th of February.
Slides
route.pl example Prolog program.
- Lab 4: A* search in Prolog on Tuesday the 6th of March.
Slides
- Lab 5: Eight puzzle in Prolog on Tuesday the 20th of March.
Slides
- Lab 6: Coursework on Tuesday the 27th of March.
Copyright © 2012
Brian Logan
This file is maintained by Brian Logan
Last modified: 8-Jan-2012, 18:53