chickadee » aima » random-start

random-start worldprocedure

Find a random starting node in the given world.

world
The world to search
(define (random-start world)
  (let ((nodes (hash-table-keys world)))
    (list-ref nodes (bsd-random-integer (length nodes)))))