Loading ...
Sorry, an error occurred while loading the content.

325how to define several agents

Expand Messages
  • rose_ronglin
    Feb 21 7:08 PM
    • 0 Attachment
      I just started learning lisp. For the intelligent program acting in
      the vacuum world, I tried to define several agents, but compiler
      gives me syntax error.

      The agent is defined as :
      (defstructure environment
      "The world in which agents exist."
      (agents '()) ;; A list of the agents in the environment
      (step 0) ;; The number of time steps simulated so far
      (max-steps 1000) ;; Stop the simulation after this number
      (stream t) ;; Stream to display output on
      (initialized nil) ;; Have we run initialize on this environment
      (state nil) ;; Current state of the environment; other
      ;; add new slots to hold various state

      I defined agent like that but not working:
      setq(a (make-agent))
      setq(b (make-agent))
      setq(c (make-agent))

      ((run-environment (make-vacuum-world
      (:agents '(a b c))
      :stream nil
      :aspec '(reactive-vacuum-agent))))
    • Show all 6 messages in this topic