anchor.diff:        )
         (setf *play-so-far* (snoc move *play-so-far*))
         (if (game-over-p *play-so-far*) (return nil))
  +   )
  +   *play-so-far*
  +)
  +
  +(defmethod generic-play-with-stats ((x player) (o player) (report t) &aux move)
  +   (setf *avail* '(nw n ne w c e sw s se))
  +   (setf *play-so-far* ())
  +   (dolist (player '(x o x o x o x o x))
  +      (visualize *play-so-far*)
  +      (cond
  +         ((eq player 'x)
  +            (setf move (make-move x report))
  +         )
  +         ((eq player 'o)
  +            (setf move (make-move o report))
  +         )
  +      )
  +      (setf *play-so-far* (snoc move *play-so-far*))
  +      (if (game-over-p *play-so-far) return nil)
  +   )
  +   (cond
  +      ((eq (analyze *play-so-far* 'w)
  +         (cond
  +            ((eq *most-recent-hmp-move 'random)
  +               (setf *nr-random-moves-wins-by-hmp* (+ 1 *nr-random-moves-wins-by-hmp*))
  +            )
  +            ((eq *most-recent-hmp-move 'heuristic)
  +               (setf *nr-heristic-move-wins-by-hmp* (+ 1 *nr-heristic-move-wins-by-hmp*))
  +            )
  +         )
  +      )
      )
      *play-so-far*
   )
  
positive.code:    move
  )
  
  ; a generic play method
  (defmethod generic-play ((x player) (o player) (report t) &aux move)
     (setf *avail* '(nw n ne w c e sw s se))
  
negative.code:    (format t "~A~%" (analyze p))
     nil
  )
  ; a heuristic machine player and a human play one game
  (defmethod demo-heuristic-human ((nr-rules integer) &aux p x o)
     (setf *nr-random-moves-by-hmp* 0)
     (setf *nr-heuristic-moves-by-hmp* 0)
     (setf *nr-random-moves-wins-by-hmp* 0)
     (setf *nr-heuristic-moves-wins-by-hmp* 0)
     (setf x (make-instance 'heuristic-machine-player :name 'hm))
     (add-rules x nr-rules)
     (display x)
     (setf o (make-instance 'human-player :name 'hu))
     (display o)
     (setf p (generic-play-with-stats x o t))
     (format t "Game Summary~%")
     (format t "Play of the game = ~A~%" p)
     (visualize p)
     (format t "~A~%" (analyze p))
     (format t "heuristic use summary~%")
     (summarize-heuristic-use)
     nil
  )
  ; a heuristic machine player and a random machine player play one game
  (defmethod demo-heuristic-random ((nr-rules integer) &aux p x o)
     (setf *nr-random-moves-by-hmp* 0)
     (setf *nr-heuristic-moves-by-hmp* 0)
     (setf *nr-random-moves-wins-by-hmp* 0)
     (setf *nr-heuristic-moves-wins-by-hmp* 0)
     (setf x (make-instance 'heuristic-machine-player :name 'hm))
     (add-rules x nr-rules)
     (display x)
     (setf o (make-instance 'random-machine-player :name 'rm))
     (display o)
     (setf p (generic-play-with-stats x o t))
     (format t "Game Summary~%")
     (format t "Play of the game = ~A~%" p)
     (visualize p)
     (format t "~A~%" (analyze p))
     (format t "heuristic use summary~%")
     (summarize-heuristic-use)
     nil
  )
  