[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "zone" or "getZone"? and one additiona question.
From: |
glen e. p. ropella |
Subject: |
Re: "zone" or "getZone"? and one additiona question. |
Date: |
Mon, 17 Mar 1997 09:34:01 -0700 |
kcline> All that being said, I think this is a matter of personal
kcline> preference [no pun intended].
Just a couple of additional comments to Ken's....
1) the "getZone" function returns the same zone in which the object
recieving the message resides (correct me if I'm wrong). So, the
following code will put a new person in the same zone as the original
person (in, say, modelSwarm.m):
newPerson = [Person create: [otherPerson getZone]];
The next code will place the new person as a kind of zone-sibling
to the modelSwarm:
newPerson = [Person create: [self getZone]];
And this next code will place the new person in a zone that is
a zone-sibling of the modelSwarm:
sibZone = [Zone create: [self getZone]];
newPerson = [Person create: sibZone];
2) The one thing to remember is that we now have "Swarms-as-Zones" and
can actually use the Swarm, itself, as a Zone. So, I would recommend
that the following code be used to place any new people inside the
Swarm:
newPerson = [Person create: self];
Then, since alot of the agents we define have a pointer back to the
Swarm of which they're a member, you can use the following type of
code to allocate new agents while inside the agent code (say,
Person.m), itself:
offspring = [Person create: swarmImIn];
And both you and your offspring will reside in the same Zone and
the same Swarm, by definition. I think doing it this way will
clear up some of the confusion.
glen
- Classifier systems, (continued)
- Re: Classifier systems, Rick Riolo, 1997/03/14
- "zone" or "getZone"? and one additiona question., J.J. Merelo Guervos, 1997/03/14
- Re: "zone" or "getZone"? and one additiona question., Jae Chan Oh, 1997/03/14
- Re: "zone" or "getZone"? and one additiona question., glen e. p. ropella, 1997/03/14
- "zone" or "getZone"? and one additiona question., glen e. p. ropella, 1997/03/14
- Re: "zone" or "getZone"? and one additiona question., Jae Chan Oh, 1997/03/15
- Re: "zone" or "getZone"? and one additiona question., Ken Cline, 1997/03/15
- Re: "zone" or "getZone"? and one additiona question.,
glen e. p. ropella <=
- Tcl Script Error, Jae Chan Oh, 1997/03/19
- Message not available
- Re: Tcl Script Error, Manor Askenazi, 1997/03/19
- Re: Tcl Script Error, glen e. p. ropella, 1997/03/20
- Thanks all & -updateLattice Method, Jae Chan Oh, 1997/03/17
- Casting an id type to a specific object type?, Jae Chan Oh, 1997/03/14
- Re: Casting an id type to a specific object type?, Ken Cline, 1997/03/14
- Re: Casting an id type to a specific object type?, Jae Chan Oh, 1997/03/15
- Re: Casting an id type to a specific object type?, Ken Cline, 1997/03/15
- Re: Casting an id type to a specific object type?, mcmullin, 1997/03/17
- Re: Casting an id type to a specific object type?, mcmullin, 1997/03/17