chickadee » aima » make-randomized-graph-agent

make-randomized-graph-agent startprocedure

Make a simply reflex agent that randomly searches the graph and cleans dirty squares.

start
Starting square (see `random-start')
(define (make-randomized-graph-agent start)
  (make-reflex-agent
    start
    (lambda (location clean?)
      (if clean? (list-ref '(left right up down) (random-direction)) 'suck))))