[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Implementing vision in Swarm
From: |
Tomas Gudmundsson |
Subject: |
RE: Implementing vision in Swarm |
Date: |
Thu, 14 Nov 1996 13:32:40 +0000 |
Hi !
We have a similar problem. We want to implement agents in a real valued space
(no grid, positions are real numbers). This makes the problem of finding
neighbours not-so-easy-anymore.
As far as I can see (and that is not very far, I am fairly new to Swarm !)
there might be the following three solutions :
1. Keep lists of all agents (we do that anyway). Search all lists whenever an
agent wants to find neighbouring agents. Inefficient, little housekeeping,
simple to implement.
2. Make a discrete space on top of the real space. In each cell of this space
maintain a list of agents contained in that cell. A search for neighbours would
then be restricted to a few cells, depending on how far we want to look and the
resolution of the grid. Less inefficient, some more housekeeping, more
complicated to implement.
3. If the agents have a physical size, subdivide space into a quad-tree.
Finding neighbours is then a question of searching the tree. Efficient, a lot
of housekeeping, probably complicated to implement. This idea comes from Ginger
Booth address@hidden and I think she implemented it. Hopefully I have
understood it right ?
Best Regards
Tomas Gudmundsson
Danish Hydraulic Institute