Clojure

HOME     TOP             

resources & downloads


 

AI Programming in Clojure - the course


 

other links



 

AI Programming in Clojure

 

course details

 

lecture series

these will develop over the next few weeks...

  1. introduction
    lecture: intro slides (first & last ppt?)
    lecture: first trace
    reading: Clojure from the ground up - check the first couple of pages
    tutorial: AIP-T1
    other: start thinking about which book will suit you best

  2. legal move generation & search
    lecture: lmgs1 and definitions
    reading: (i) clojure maps (ii) search - any AI book or cambridge (stop when you get to prolog)
    tutorial: Legal Move Generators

  3. recursion (head)
    lecture: recursion-trace-1
    lecture: using trace
    lecture: more examples
    tutorial: recursion-1 then recursion extra if you have time
    reading: pick up an AI book & read about the travelling salesman problem

  4. destructuring, variadic args, etc
    lecture: destructuring
    lecture: putting ideas together
    reading: one of the clojure books (i) destructuring let (ii) map assignment (iii) variadic args
    reading: form an opinion about when to use vectors & when to use lists
    tutorial: develop your own solutions to the current Part I & II presentation problems

  5. recursion (tail & recur)
    lecture: recursion-2 - tail recursion & recur
    reading: one of the clojure books: variadic arguments & "recur"
    tutorial: tail & recur

  6. working with trees
    lecture: trees-1
    reading: if you have not already covered Big O notation check out A Beginner's Guide
    -- Big O notation is used to analyse the performance & complexity of algorithms
    -- including those that search & traverse trees.
    tutorial: develop solutions to Questions 2.x and 3.x of Part I & II presentation problems

  7. using the matcher
    lecture: matcher-1
    reading: the tutorial in the matcher documentation
    tutorial: 1st matcher tutorial

  8. representing world states & operators
    lecture: step 1 -- the cafe example
    reading: read the matcher documentation to see what is available
    -- read about Clojure "for" and "doseq"
    tutorial: extend the cafe example with additional rules and objects
    -- look at the review section of the lecture. Can you answer the questions?

  9. means-end analysis & planning
    lecture: functions & definitions and some sample output
    tutorial: check out the operator search in the Clojure tools section

  10. assessment part 5 -- operators
    part 5 of the assessment involves writing state change operators for a given problem (see assessment specification). For this work you will use the Operator Search engine (not the planner) -- while this is less optimal (in processing time) it is more forgiving with operators containing logical inconsistencies.
    Please read the following (these are mostly references into the documentation of the Clojure matcher)...

  11. a query mechanism for tuples
    lecture: this brings a few ideas together, see: tuple search
    reading: the Clojure matcher overview check (i) searching and selection (ii) iteration and collection
    tutorial: -- provided in class

  12. applying rules (+ fwd & bwd chaining)
    lecture:
    • a detailed look at forward chaining: Ian's lecture
    • fwd & bwd chaining -- a simple approach without matching which also uses atoms and forces evaluation of lazy structures.
    reading:
    • fwd & bwd chaining inference engines are described in most AI text books, read one!
    • read a bit about Prolog and its approach to backward chaining.
    tutorial: develop the bwd chainer so it handles multiple antecedents and allows matching rules

  13. higher order fns & mapping
    lecture: higher order fns
    reading: there is a variety of material worth reading, most of it associated with specific languages:
    -- clojure -- lisp -- wikipedia -- erlang -- haskell (ppt)
    tutorial: write a fold for recursing on numbers & populate a map of partials for...
    (i) factorial
    (ii) sum-up-to
    (iii) count-down where count-down of 5 is '(5 4 3 2 1)
    (iv) 2^n
    (v) foo, where foo is a suitable function that you think up.

  14. more about search
    lecture: refer to the quick guide for breadth search and A* search on the Clojure tools page

  15. constraint propagation
    lecture: 17-AIP-sudoku-1.clj
    reading: a lecture from Stanford
    tutorial: adapt the example in the lecture so it uses additional rules

  16. interoperating with Java & other subsystems
    lecture:
    1. sample code for using Java UI classes
    2. an example linking subsystems with sockets clojure side NetLogo side, you will also need the sock2 extension for NetLogo
    reading: check out Java interoperability from any of the books
    tutorial: build a UI with two text elements and an "eval" button to provide a Clojure REPL

 

course work & assessment...



 

books & reference