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

326RE: [aima-talk] how to define several agents

Expand Messages
  • E etech058
    Feb 23, 2004
      I have run this program before. It also gives some compile error, but after modification, it can run.
      I have used corman-lisp for exercise. Which tools do you use?

      Best regard

      -----Original Message-----
      From: rose_ronglin [mailto:rose_ronglin@...]
      Sent: 2004年2月22日 11:08
      To: aima-talk@yahoogroups.com
      Subject: [aima-talk] how to define several agents

      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))))

      Yahoo! Groups Links
    • Show all 6 messages in this topic