swarm-support
[Top][All Lists]
Advanced

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

Re: More interesting Heatbugs...


From: pauljohn
Subject: Re: More interesting Heatbugs...
Date: Mon, 27 Apr 1998 14:51:30 -0500 (CDT)

To see this effect more clearly, one can change the bug color from
"generic green" to shades that describe the ideal temperature the bug
is seeking.  I made these changes.

In HeatbugObserverSwarm.m, add this line after the [colormap setColor:
65 ...] line that is in there:
  for (i=0; i < 64; i++)
   [colormap setColor: (i+66) ToRed: .3 Green: (double)i / 65 Blue: .5];
In HeatbugObserverSwarm.m, comment out the previous color assignment:
 //[[heatbugModelSwarm getHeatbugList] forEach: M(setBugColor:) : (void *) 64];

In HeatbugModelSwarm.m, go to line 198 or so (the part where the bugs
are being created), and add a creation statement that gives the bug a
color based on the extremity of its ideal temp.

     [hbug setBugColor: (int)
     (66.0+((65.0)*(idealTemp-minIdealTemp)/(maxIdealTemp-minIdealTemp)))];
    printf("BUG %d REPORTING, with tempideal %d color %f \n,", i, idealTemp,
    (66+(65.0)*(idealTemp-minIdealTemp)/(maxIdealTemp-minIdealTemp))); 

(the second command is there for debugging).
     
When I do this change, I see the cool-seeking bugs are blue, the
medium-seeking ones are pale green, and the ones that want it hot are
bright green.  I hope you to do to.

I find that Chris's conclusion about which bugs are moving the most is
not necessarily correct. It seems to depend on the total number of bugs
in the simulation (ambient heat).

Looking at this again gave me a new question, however.  I wanted to
make a two-color bug, perhaps a color in the center to show his
"permanent" ideal color and an outer edge that shows the time-varying
color to represent unhappiness.  Can anyone think of a way I might do
it? 

On 25 Apr, Chris Langton wrote:
> To the collectively evolving hive(s)...
> 
> Heatbugs gets a lot more interesting if you allow a larger diversty of
> bugs in the
> world.
> 
>   Try setting the initial parameters as follows:
> 
>         minIdealTemp: 170
>         maxIdealTemp: 31000
>         minOutputHeat: 300
>         maxOutputHeat: 10000
> 
> (The Max's are the same as the default settings for the heatbugs app,
> but the
> Min's have been lowered significantly)
> 
>   When run, the hi-temp seeking bugs still find each other and cluster,
> but the
> low temp-seeking bugs do all kinds of interesting things around the
> hi-temp
> clusters, many of them forming, well, swarms actually, of co-travelling
> bugs.
> Some of these swarms are quite long-lived, but most eventually break up.
> 
> (Remember to invoke the app with the --varyseed option..)
> 
> Chris Langton
> 
> 
> 
> 
>                   ==================================
>    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.
>                   ==================================

-- 
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ukans.edu/~pauljohn
University of Kansas                  Office: (913) 864-9086
Lawrence, Kansas 66045                FAX: (913) 864-5700


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