AI Programming in Lisp
Symbolic Computation

These pages provide resources for students in AI Programming and Lisp on AI and Games AI courses. See also the Lisp resources and the AI Lecture series.

 

"LISP is worth learning [because of] the profound enlightenment experience you will have when you finally get it. That experience will make you a better programmer for the rest of your days, even if you never actually use LISP..."

Eric S. Raymond,
How to Become a Hacker
http://www.catb.org/~esr/faqs/hacker-howto.html

 

AI Programming in Lisp

page contents...

 

an important note: many of the examples here use the matcher, a search mechanism (breadth-search) and some other utility functions. These can all be found in the Lisp Resources section of this site. Check the notes on the Allegro IDE (later on this page) for details about auto-loading these resources.

 

course information

 

AI Programming lecture series

  1. Introduction to Lisp
    lecture - lecture #1 trace
    tutorial work - AIP-T-1.pdf
    For an additional run through the Lisp basics try here and look at the symbolic computation notes below

  2. Legal Move Generators
    lecture - search notes
    trace - LMGs in Lisp
    tutorial work - Legal Move Generators.pdf

  3. Recursion
    lecture - lecture trace
    tutorial work - Recursion-1.pdf and some more recursion problems

  4. Building a simple matcher
    lecture - lecture trace #1 , additional ideas and some examples with trees
    tutorial work - Problem Sheet 4.pdf
    test driven development in Lisp - writing a tester

  5. Tail Recursion
    lecture - lecture trace #1 and trace #2 -- sum-tree
    tutorial work - tail recursion problems
    additional problems - Problem Sheet 6.pdf

  6. the Matcher
    lecture #1 -- an intro to match methods
    tutorial problems -- write your own match methods
    lecture #2 -- reworking LMGs (pdf) (or same file in xhtml)
    tutorial problems -- to follow
    additional -- specifying grammars with match forms grammar in pdf (or same file in xhtml)

  7. mapping
    lecture - lecture trace
    additional -- some other examples of higher order functions
    tutorial work - Mapping Problems

  8. search
    in this section we put a few ideas together (including mapping functions and lambda forms) to investigate producing bounded LMGs then a depth first search and a breadth first search.
    lecture - lecture trace

  9. the first of our more detailed examples: this implements a query mechanism operating over a set of tuples. The result is a fairly small chunk of Lisp code but the programming tools and techniques require a bit of thought so read through the lecture notes thoroughly.
    lecture - Example 1 - query mechanism for tuples

  10. the second detailed example: this examines how it is possible to write mechanisms to apply rules against sets of facts to generate new information.
    lecture - Example 2 - rule apply mechanism

  11. this example considers how to explore a network of connected nodes without getting stuck in circular paths where the network connections are described in tuples.
    lecture - navigating a network

  12. this example examines the definition of state changing operators and shows how they can be used to describe the capabilities of action-based agents
    session #1 -- using operators - an intro to operators and what they do
    session #2 -- the cafe example - using search (you will also need apply-op, etc - download this & load it into the allegro IDE)
    session #3

  13. Rule application with backward chaining
    Lisp definitions & sample rules

  14. Constraint Propagation
    discussion and Lisp definitions
    see also using operators for CP

 

Symbolic Computation - lecture series

  1. Introduction to Lisp
    seminar trace and Lisp definitions
    tutorial
    NB: remember to download the matcher and utils (see Lisp page in the resources section)
    For an additional run through the Lisp basics try here

  2. Search
    Seminar trace
    tutorial
    Lisp definition of the breadth-1st search - download this & load it into the allegro IDE

  3. Operators & world states
    seminar trace
    tutorial
    Lisp definition of apply-op, etc - download this & load it into the allegro IDE

  4. buiding solutions in Lisp
    seminar paper

 

some useful links

 

book list

  1. title: Land of Lisp
    author: Conrad Barski
    publisher: No Starch Press, ISBN: 978-1-59327-281-4
    a recent publication, easy to read with some nice examples - recommended

  2. title: Lisp (3rd Edition)
    author: Winston & Horn
    publisher: Addison Wesley
    a little old but a good text with an AI slant

  3. title: ANSI Common Lisp
    author: Paul Graham
    publisher: Prentice Hall, ISBN: 0-13-370875-6
    a nice introduction to Lisp - recommended

 

some notes on the Allegro IDE

 

course work & assessment...

 

archived: in course assessment 2010/11 - part 1

The first part of the in-course assessment is based on group presentations - you will be organised into groups and given presentation problems as the course progresses. Group work will include peer assessment. For an explanation of how we operate peer assessment and how individual marks are calculated from group marks, see the peer assessment guide.

archived: in course assessment 2010/11 - part 2

archived: in course assessment 2009 part 2 specification

 

hints and tips

 

other stuff of interest...