anchor.diff:  
   ;added n counter
   (defun num-live-neighbors (n width height x y last-gen)
  -   (if (= n 9)
  +   (if (or (= n 0) (not (natp n))) ; this should be just (if (= n 0)), but this way makes ACL2 happy
          0
  -       (if (= n 4)
  -           (+ 0 (num-live-neighbors (1+ n) width height x y last-gen))
  -           (let* ((i (mod (+ (1- x) (floor n 3)) width))
  -                  (j (mod (+ (1- y) (mod n 3)) height))
  +       (if (= n 5)
  +           (+ 0 (num-live-neighbors (1- n) width height x y last-gen))
  +           (let* ((i (mod (+ (1- x) (floor (1- n) 3)) width))
  +                  (j (mod (+ (1- y) (mod (1- n) 3)) height))
                     (key (get-avl-key i j width))
                     (live (if (null (avl-retrieve last-gen key)) 0 1)))
  -                 (+ live (num-live-neighbors (1+ n) width height x y last-gen))))))
  +                 (+ live (num-live-neighbors (1- n) width height x y last-gen))))))
   
   (defun build-next-generation-cell (width height x y last-gen next-gen)
  -   (let* ((n (num-live-neighbors 0 width height x y last-gen))
  +   (let* ((n (num-live-neighbors 9 width height x y last-gen))
             (result (if (null (avl-retrieve last-gen (get-avl-key x y width)))
                         (if (= n 3) "x" nil)
                         (if (or (< n 2) (> n 3)) nil "x"))))
  
positive.code:       (let ((avl-tree (car things))
              (width (cadr things))
              (height (caddr things)))
             (string-list->stdout (avl-tree->output-lines width height 0 (build-next-generation width height 0 avl-tree
  		                                                           (empty-tree))) state))))
negative.code:        last-gen))
  
  (defun strings->char-lists (lst)
     (if (endp lst)
         nil
         (cons (coerce (car lst) 'list) (strings->char-lists (cdr lst)))))
  
  