[starlogo-users] (no subject)
Eric Klopfer
klopfer at MIT.EDU
Mon Jul 16 08:18:54 EDT 2007
This is not impossible, but you'll need to break down the idea into a
couple of components. Make a new variable, which I'll call "state".
State tells the agents which of the two procedures that they're
supposed to run each time through. After completing the procedure it
sets the state to the other state, which they'll do the next time
through. It should look something like this:
If state = 1
then procedure 1
set state 2
else
procedure 2
set state 1
Since all of the agents run all of their procedures each time
through, this should work.
Eric
On Jul 16, 2007, at 8:00 AM, Zara Phang wrote:
> Hello again
>
> I've got stuck again and was hoping that someone could either tell
> me that what I'm trying to do is just impossible in Starlogo TNG or
> point me a way in which it could be.
>
> Bsaically I've got two procedures for my agents, and I've stuck
> them in a forever loop, so something like:
> forever do { procedure1, procedure2}
>
> which, for each agent, does procedure1, then procedure2, before
> moving on to perform the same for the next agent.
>
> What I was trying to do is make it so that every agent will perform
> procedure1, and then every agent will perform procedure2.
>
> Is that possible?
>
> Thanks in advance
> Zara
>
> (p.s. In case anyone is curious, I am trying to do Conways Game of
> Life but I am running into this issue as it is state-based)
> _______________________________________________
> starlogo-users mailing list
> starlogo-users at media.mit.edu
> http://education.mit.edu/mailman/listinfo/starlogo-users
More information about the starlogo-users
mailing list