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

how to define several agents

Expand Messages
  • rose_ronglin
    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
    Message 1 of 6 , Feb 21, 2004
    • 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
      yet?
      (state nil) ;; Current state of the environment; other
      subtypes
      ;; add new slots to hold various state
      information
      )

      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))))
    • Paolo Amoroso
      ... Try the following: (setq a (make-agent) (setq b (make-agent) (setq c (make-agent) Paolo -- Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film
      Message 2 of 6 , Feb 22, 2004
      • 0 Attachment
        "rose_ronglin" <rose_ronglin@...> writes:

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

        Try the following:

        (setq a (make-agent)
        (setq b (make-agent)
        (setq c (make-agent)


        Paolo
        --
        Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film
      • E etech058
        Hello, 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
        Message 3 of 6 , Feb 23, 2004
        • 0 Attachment
          Hello,
          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
          Chenyu


          -----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
          yet?
          (state nil) ;; Current state of the environment; other
          subtypes
          ;; add new slots to hold various state
          information
          )

          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
        • Paolo Amoroso
          ... I have forgotten the closing parentheses, sorry: (setq a (make-agent)) (setq b (make-agent)) (setq c (make-agent)) Paolo -- Why Lisp?
          Message 4 of 6 , Feb 24, 2004
          • 0 Attachment
            Paolo Amoroso <amoroso@...> writes:

            > Try the following:
            >
            > (setq a (make-agent)
            > (setq b (make-agent)
            > (setq c (make-agent)

            I have forgotten the closing parentheses, sorry:

            (setq a (make-agent))
            (setq b (make-agent))
            (setq c (make-agent))


            Paolo
            --
            Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film
          • rong lin
            Hey, Thank you for reply. I am running lisp on unix and aima code has been modified by professor to be able to run on unix server. I also made some changes to
            Message 5 of 6 , Feb 29, 2004
            • 0 Attachment

              Hey,

              Thank you for reply. I am running lisp on unix and aima code has been modified by professor to

              be able to run on unix server. I also made some changes to the code and it runs without error.

              But I am sure if there is any logic error in the code.

              Regards,

              Rose

              >From: E etech058
              >Reply-To: aima-talk@yahoogroups.com
              >To: aima-talk@yahoogroups.com
              >Subject: RE: [aima-talk] how to define several agents
              >Date: Mon, 23 Feb 2004 17:33:17 +0900
              >


              Add photos to your e-mail with MSN 8. Get 2 months FREE*.
            • rong lin
              Thanks, you are correct. Regards, Rose ... Add photos to your messages with MSN 8. Get 2 months FREE*. ... Try the following: (setq a (make-agent) (setq b
              Message 6 of 6 , Feb 29, 2004
              • 0 Attachment

                Thanks, you are correct.

                Regards,

                Rose

                >From: Paolo Amoroso
                >Reply-To: aima-talk@yahoogroups.com
                >To: aima-talk@yahoogroups.com
                >Subject: Re: [aima-talk] how to define several agents
                >Date: Sun, 22 Feb 2004 11:38:03 +0100
                >


                Add photos to your messages with MSN 8. Get 2 months FREE*.
              Your message has been successfully submitted and would be delivered to recipients shortly.