Question

I am currently developing a project where turtles traverse a habitat in search of an object. When they find this object they return to their "base" and communicate only the direction and distance elements of the object they located i.e. they do not simply communicate the co-ordinates of the target.

An example would be - The target is located at direction 162 and distance 65.

I would be grateful if anybody has any advice on how I should begin developing this communicational method and if anybody has attempted it, what problems they came across.

I am considering placing the "base" in the centre of the habitat as it may result in easier calculations however if anyone has an alternative idea I would be grateful to hear it.

Was it helpful?

Solution

Your request is very general and you will probably have better luck getting answers to more precise questions when you are a little bit further along the way.

Still, a good way to get started would be to look at examples in the Models Library (available from the File menu inside NetLogo). The Ants model, for example, does involve agents looking for a target object and coming back to their base.

As for communicating the direction and distance of the target, the distance and towards primitives should be exactly what you need. These primitives take the world's topology into account, so you should not have to place your base in the center for "easier calculations."

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top