-
Folks: I'm reading Chapter 8 of the "Programming Multi-agent Systems in AgentSpeak with Jason" book, and have run into a sticking point. After reading about .desire, .intend, .drop_desire, .drop_intention, etc., I had intended (heh, heh) to write some sample code to experiment with these different methods. Doing .desire worked OK, doing something like this: agent2.asl
I get
But if I try to test for an Intention instead, with .intend, using something like this: agent1.asl
I get this:
So it looks like my .intend is returning false, even though I expected it to return true. Well , sort of. Truth be told, I don't exactly understand what the documentation here is telling me, so was hoping that maybe there was just a typo, but apparently not. In the docs, it reads:
I don't quite know what it means to say "triggering event +!go(1,3) appears in an intention". I think intentions are selected plans, but the syntax +!foo in the body of a plan doesn't seem to be valid syntax. And I thought maybe just having a !foo in a plan, with a corresponding triggering event of +!foo might be enough, but clearly not. Can somebody tell me what it is that I'm missing here? It would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
wow, very nice example! if I’ve got it right, when the test this doc may be of your interest. |
Beta Was this translation helpful? Give feedback.
wow, very nice example!
if I’ve got it right, when the test
.intend…
is executed, the agent does not indent foo yet, it will ~1500ms later.this doc may be of your interest.