swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multi-world question...


From: bleydorf
Subject: Re: Multi-world question...
Date: Tue, 09 Sep 1997 17:23:18 -0400

Ken Cline wrote:
> 
> On Tue, 9 Sep 1997 address@hidden wrote:
> 
> > All,
> >
> > Since I didn't hear from any of you about possible solutions to my
> > question last week... :(, I decided to implement a "solution" to my
> > problem by puting the various agents into one of three worlds and then
> > lying them on top of each other.  I have the Problems in one world.  The
> > solutions in another, and an attached solutions (to a problem) in a
> > third world.
> >
> > The logic seems sound, but the Problems dont seem to "see" the solutions
> > now.  Is there some limitations that agents might have in seeing other
> > agents in other worlds?
> >
> > Currently I create all the problems in their world.  And all of the
> > solutions in their two worlds.  In their "un-attached" world they are
> > stationary.  And in their "owned" world, the owner problem will move
> > each of them around.  This way the problem of agents steping on each
> > other should be solved.
> >
> > What do you think?
> >
> > Any suggestions?
> 
> It should not matter which world the agents are in as long
> as the viewing agent has a pointer to the world(s) that
> contains the agent which is being searched for.
> 
> Another way to organize a multi-layered environment is to
> have one world and, at each grid location, the world
> contains an object.  That object then contains a list of
> agents occupying its location.

I see the value of that, but unfortuately I think the overhaul needed to
implemented it would be harsher than living without it.
 
> I think it a matter of style whether you have a list of
> grids or a grid of lists.  Choose what makes sense to you.
> 
> BTW, do the agents only inhabit one world at a time?

I am sort of torn by that...Problems only exist in their world.  But,
solutions "could" exist in their "default, free" world, or the "held"
world.  
So, at first I thought I would create the solutions in both worlds, and
if they moved from one world to the next, to redraw them in black in the
old world.  But, this might lead to problems that I implemented the
multi-world stuff in the first place.  So, Now I have the Problem do
this when attaching and detaching:
(psuedo code from memory)

-attach (Solution *) sol;
...
[heldWorld PutObject sol AtX: x Y: y];
[solWorld PutObject nil AtX: x Y: y];
...

-detach (Solution *) sol;
...
[solWorld PutObject sol AtX: x Y: y];
[heldWorld PutObject nil AtX: x Y: y];
...

But, when I run the simulation, all the problems dont seem to "see" the
solutions, the check for solution's code look like this:

foundObject = [solWorld getObjectAtX: x Y: y];


Now, some of these questions may be somewhat moot.  Since my next task,
(which maybe it should of been my previous task), is to implement the
internal index in each Problem to use to sort the multiple solutions.

But, Ive read through the Collections docs several times, and still
can't figure out some questions.

I was planning of using the Index or ListIndex.  I would of used the
keyedIndex but the docs say that all the methods havent been implemented
yet...

Do you have any examples of what index or Listindex code would look
like.  I'm confused to how a given list member would be accessed and who
its internal varibles would be accessed.  like listIndex(1).assignedNum
= x???
 OR something like that???

Thanks,
Brad.

                  ==================================
   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.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]