[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding and removing repeated pointers to a list
From: |
donalson |
Subject: |
Re: Adding and removing repeated pointers to a list |
Date: |
Tue, 21 Sep 1999 17:32:36 -0700 |
Just an idea, for what its worth.
How about if you define a seperate "memory" object, (or just a structure) that
contains a reference to the agent interacted with and includes some thing to
seperate instances of the same agent on the list. Say:
struct
{
id Agent involved;
int (or id) timeOfInteraction;
.
. // anything else of interest
.
}
Use this for the memory list.
Just a thought...
Cheers,
D3
Jonathan Greenberg wrote:
> I have some questions about how swarm handles the following algorithm with the
> list collection:
>
> My list represents and agent's "memory" -- each agent in the world remembers
> interactions with other members, and then "forgets" them at a specified time.
> As such, I need to know the behavior of the list in these two situations:
>
> Time 1: Add agent "A"
> Time 2: Add agent "B"
> Time 3: Add agent "A"
>
> Is the list now:
> A
> B
> A
>
> or is it
> A
> B
> ?
>
> Secondly, if the list does, in fact, contain "A,B,A" (multiple pointers to
> agent A), what happens if I "remove A" from the list, will I end up with "B"
> or "B,A" from that list? Thanks in advance!
>
> --jonathan
>
> ==================================
> Swarm-Support is for discussion of the technical details of the day
> to day usage of Swarm. For list administration needs (esp.
> [un]subscribing), please send a message to <address@hidden>
> with "help" in the body of the message.
--
*********************************************************************
* Doug Donalson Office: (805) 893-2962
* Ecology, Evolution, Home: (805) 961-4447
* and Marine Biology email address@hidden
* UC Santa Barbara
* Santa Barbara Ca. 93106
*********************************************************************
*
* The most exciting phrase to hear in science, the one that
* heralds new discoveries, is not "EUREKA" (I have found it) but
* "That's funny ...?"
*
* Isaac Asimov
*
*********************************************************************
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.