anchor.diff:                                hists))
                       '())))
   
  +(defvar *exploration-strategy* :random)
  +
  +(defun pick-exploration-strategy (algorithm &optional (strategy *exploration-strategy*))
  +  (ecase strategy
  +    ((:random) 'random)
  +    ((:greedy) (make-instance 'policy:<greedy-policy>
  +                 :q-function (rl:get-q-fn algorithm
  +                                          (rl:knowledge-state algorithm))))))
  +
  +
  +(defvar *greedy-percentage* 0.3)
  +
   (defun learn-behavior ()
     (initialize-environment)
     (initialize-algorithms)
  -  (learn *prog* *env* 'random
  -         (mapcar 'algorithm-for *algorithms*) 
  -         (steps-for-environment)
  -         :hist-length 50 :step-print-inc 100 :episode-print-inc 50))
  +  (when (eq *exploration-strategy* :random-greedy)
  +    (initialize-random-algorithms))
  +  (case *exploration-strategy* 
  +    ((:random)
  +     (learn *prog* *env* 'random
  +            (mapcar 'algorithm-for *algorithms*) 
  +            (steps-for-environment)
  +            :hist-length 50 :step-print-inc 2500 :episode-print-inc 500))
  +    ((:random-greedy)
  +     (mapc (lambda (alg-name)
  +             (learn *prog* *env*
  +                    'random
  +                    (algorithm-for alg-name)
  +                    (floor (* (steps-for-environment) *greedy-percentage*))
  +                    :hist-length 25 :step-print-inc 2500 :episode-print-inc 500)
  +             (learn *prog* *env*
  +                    (pick-exploration-strategy (algorithm-for alg-name) :greedy)
  +                    (algorithm-for alg-name)
  +                    (ceiling (* (steps-for-environment) (- 1.0 *greedy-percentage*)))
  +                    :hist-length 25 :step-print-inc 2500 :episode-print-inc 500)
  +             (learn *prog* *env*
  +                    'random
  +                    (random-algorithm-for alg-name) (steps-for-environment)
  +                    :hist-length 50 :step-print-inc 2500 :episode-print-inc 500))
  +           *algorithms*))
  +    (otherwise
  +     (mapc (lambda (alg)
  +             (learn *prog* *env* (pick-exploration-strategy alg)
  +                    alg (steps-for-environment)
  +                    :hist-length 50 :step-print-inc 2500 :episode-print-inc 500))
  +           (mapcar 'algorithm-for *algorithms*)))))
   
   (defun evaluation-for (name)
     (evaluate *prog* *env* (get-policy-hist (algorithm-for name))
  -            :num-steps 25 :num-trials 25))
  +            :num-steps 50 :num-trials 100))
  +
  +(defun random-evaluation-for (name)
  +  (evaluate *prog* *env* (get-policy-hist (random-algorithm-for name))
  +            :num-steps 50 :num-trials 100))
   
   (defun evaluate-performance (&optional (algorithms *algorithms*))
     (format t "~2&Learning curves for ~{~A~^, ~} are:~%" algorithms)
     (pprint (map 'vector #'list 
  -               (mapcar 'evaluation-for algorithms))))
  +               (mapcar 'evaluation-for algorithms)))
  +  (when (eq *exploration-strategy* :random-greedy)
  +    (format t "~2&Random exploration learning curves for ~{~A~^, ~} are:~%" algorithms)
  +    (pprint (map 'vector #'list 
  +                 (mapcar 'random-evaluation-for algorithms)))))
   #+(or)
   (defun clean-up ()
     (reset *smdpq*))
  
positive.code: (defvar *hsa2*)
  (defvar *hsa3*)
  
  (defun initialize-environment ()
    (setf *env* (make-new-environment)))
  
  
negative.code:     ((hordq-a-1) *hsa1*)
      ((hordq-a-2) *hsa2*)
      ((hordq-a-3) *hsa3*)))
  
  (defun random-algorithm-for (name)
    (ecase name
      ((smdpq) *random-smdpq*)
      ((hordq) *random-hordq*)
      ((gold-standard) *random-gs*)
      ((hordq-a-0) *random-hsa0*)
      ((hordq-a-1) *random-hsa1*)
      ((hordq-a-2) *random-hsa2*)
      ((hordq-a-3) *random-hsa3*)))
  
  (defun algorithms ()
    (mapcar #'algorithm-for *algorithms*))
  
  (defun random-algorithms ()
    (mapcar #'random-algorithm-for *algorithms*))
  
  (defun explore-policies (&optional (show-advice t))
    (unless (boundp '*env*)
  