[starlogo-users] Need help

Zara Phang zphang at epcc.ed.ac.uk
Wed Jul 11 12:41:03 EDT 2007


Hi Eric

Thanks for your prompt and helpful reply!

Unfortunately I am only dealing with one breed of agent, so when I move 
forward, *all* agents move forward, hence there will never be something 
there for them to smell!

I was thinking that I might be able to do this if I could get them moving 
forwards one at a time, but as I am having them stay there if there is not 
an agent in front of them (I am doing a very simple traffic simulation), 
if there is an agent directly behind the first 
agent that checks and then moves, the agent would not know the first agent 
was there before and will just move into the space.

On Wed, 11 Jul 2007, Eric Klopfer wrote:

> Check out the way that the sonics smell the marios in the sonics vs. mario 
> demo game that comes with TNG.  Essentially each round the sonics move one 
> step in each direction and smell the number of marios that they see there.
>
> You could do something similar where you had the agent move only forward and 
> smell and then move back.
>
> We'll have more advanced processing of smell in an upcoming release.
>
> Eric
>
> On Jul 11, 2007, at 11:33 AM, Zara Phang wrote:
>
>> Hello everyone!
>> 
>> I'm trying to do some cellular automata on StarLogo and was wondering if 
>> someone could help me with something I think should be quite simple but I 
>> haven't managed to do yet!
>> 
>> I've basically got agents lined up on an x axis randomly placed by y, so 
>> maybe like this:
>> 
>> xxx x x     x xxx    x xxx
>> 
>> and I want to figure out whether each agent has another agent in front of 
>> them.  I'm currently using the 'smell' feature under 'Other Agents' with a 
>> radius of 1, which tells me that whether there is an agent either side of 
>> it, so I think I am halfway there!  I have tried the 'smell with' with a 
>> radius of 1 and a condition of (xcor of who > xcor) but this doesn't seem 
>> to work.
>> 
>> Does anybody have any ideas what is going wrong and how I can fix this?
>> 
>> Many thanks,
>> Zara
>> _______________________________________________
>> 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