CMPS140, Winter 2012, Section 01: Lecture 4 -- 1/19/2012

Super-rational means you consider each agent  in a multiagent situation to be exactly as smart as yourself.

"Perfect rationality" (according to book) is same as what we mean by "intelligent" it means the agent is
rational and all its choices are optimal. This implies that the agent knows all it needs to about the environment.

"Random" means all actions are selected with equal probability. Implies no knowledge is used.

"Meta" means one system level or degree of freedom out.

&optional and &rest and &keyword are used to have varying or optional arguments in a Lisp function.

(defun length (l)
      (if l (+ 1 (length (rest l))) 0]

(defun count (x l)
      (if l
           (if (equal x (first l)) (+ 1 (count x (rest l)))
                (count x (rest l)))

(defun flatten (l)
       (if l
            (if (atom (first l))
                 (cons (first l) (flatten (rest l)))
                 (append (flatten (first l))
                         (flatten (rest l]

(defun append (l1 l2)
      (if (null l1) l2
           (cons (first l1)
                 (append (rest l1) l2]