CAS and Squeak

Sam Adams ssadams at
Tue Jun 5 13:35:10 UTC 2001

Your right of course about the time scale required for reasonably
successful browser evolution, but hey, parts of the Smalltalk image have
been runnning continuosly (sans naps) for decades.  And then theres the
voting thing.  Chad happens.

Actually, the most interesting part of the "browser evolution problem" for
me is the part about modeling both the functional genotype and functional
phenotypes.  Alan has lamented for years how we all just accepted the
metaclass/class/instance framework we've inherited.  THis is a good example
of using the existing metaclass/class/instance system to bootstrap a
different "metaclass" system, albeit for a specific modeling domain.  What
we would need for this browser evolution thing would be a Smalltalk class
that models a genotype (the brower meta definition) and another Smalltalk
class that models the phenotype(s) (the actual running browser instance).
This requires a bit of cognitive gymnastics, because the class of your
genotype object is effectively the genotype of the genotype (I call them
metatypes) and the class that models your phenotype is the genotype of the
instance from the Smalltalk perspective, but not from the modeling
perspective.  But of course, these are also just Smalltalk classes and
instances at the same time from the programmer's perspective.  Remind
anyone of their first Smalltalk class when someone asked the question,
"well if everything is an object, and all objects are instance of some
class, then a class is an instance, so what is its class?"  And the green
grass grows all around, all around.  And the green grass grows all around.

This is a pattern (Metatype-Genotype-Phenotype, or MGP) that shows up
frequently when modeling domains that include class/instance relationships.
Its a bit too "meta" for most folks, but its very powerful, in my view one
of the 3 most powerful complexity reducing patterns known, the others being
Ward's "Whole Value", aka make your objects model your domain, and
"Thing/GroupThing" (TGT), a slightly more complete form of the "Gang of
Four" composite pattern.  Whenever I have a design where all three of these
patterns can be applied in concert, I get extreme reduction in the
complexity of the design and a resulting object model with incredible
expressive power while staying true to the domain.

On the irreversibility question, interesting ways to look at the work of an
image might include:
1) the "unorganized" memory that is colonized with new instances (image
2) the amount of memory reclaimed from object death (garbage collection)
3) the diversity of instance populations (image ecology)
4) the connectedness of the instances (high connectedness implies a highly
collaborative design)
5) the growth of diversity (new classes or varying prototypes)
6) the number of blitted bits (total energy output?)
7) number of characters or mouse clicks consumed from the user
8) number of characters or documents (files) input or output

1-5 sounds alot like Thomas Ray's TIERRA alife, so there might be more
fruitful analogies along that path.  For instance, what is a parasite
object or morph in Squeak?


Sam S. Adams, IBM Distinguished Engineer, IBM Research
tie line 444-0736, outside 919-254-0736, email: ssadams at
<<Hebrews 11:6, Proverbs 3:5-6, Romans 1:16-17, I Corinthians 1:10>>

                    Withers"              To:     <squeak at>                                         
                    <rwithers12 at med       cc:                                                                  
          >            Subject:     Re: CAS and Squeak                                      
                    06/05/01 09:40                                                                             
                    Please respond                                                                             
                    to squeak                                                                                  

"Evolving" systems do seem to suffer this problem of slow improvements, to
which David refers.  A measure I had heard was that a GA halves the fitness
distance to the optimal solution for each doubling of evolution time.  We
would also have a performance cost for evaluating individuals in a
population.  For browser evolution with voting feedback, if we want 1000
individuals per generation, and it takes 1 sec per evaluation, with 40
generations to evolve over, we have a lot of evaluating (and voting too!).
This is why CAS stikes a chord.  Once the engine is started, it should
change behavior over shorter timescales.

Maybe it would be interesting to evolve a screensaver evaluator, where we
evolve the fitness evaluator for screensaver evolution.  This could work by
generating a random evaluator, then the screensaver would evolve using this
evaluator.  We vote relatively on the best screensaver to come from that
evaluator when we come back from coffee.  :)

CAS would seem to drive a different view of generating new browser layouts
if we could only specify and model it.  A genetic specification, for a
browser layout, could efficiently encode the structure for the evolution
side of alife.  We could include the action handlers and aspect displayers
as part of the gene expression for the browser.   I am having difficulty in
imagining how we could structure the phenotype as a CAS.  Do you think we
could model a CAS as the event processor behind a browser, to "evaluate"
phenotype of each browser genotype?   The Browser CAS should be able to
always enforce the constraints (layout, event handling, and display), but
also efficiently produce results.  These results could be the answer to any
query, especially alt-q types of queries and senders/implementors.

As I get further in Kauffman's book, irreversibility starts to come back to
me from the dark days of stat mech and work cycles.  Can we define the
"work" that an image does when we interact with it?  Perhaps in the area of
reflection activities?  Every operation certainly changes the thermodynamic
state of the image, but we also keep a history list.  Doits that aren't
reversable ("OrderedCollection allInstances become: Smalltalk") seem to
represent irreversible informational actions, and since information is a
thermodynamic state of energy....


----- Original Message -----
From: Sam Adams <ssadams at>
To: <squeak at>
Sent: Friday, June 01, 2001 9:54 AM
Subject: Re: CAS and Squeak (emerging... ;-))

> Rob,
> Here's an example "alife" application to try in Squeak.  Since we have
> these nice high level morphs, events and scripts now, why not let your
> tools "evolve" on their own?  For instance, what if our beloved browser
> occasionally opened up with a different structure, even just a different
> layout, or perhaps with an extra pane or two showing other known aspects
> classes, variables and methods.  The "genes" involved determine the kinds
> of panes to include, their relative size and layout, what menu items to
> present, etc.  Selection would occur via the user "voting" in various
> degrees in favor of the change, perhaps by the time the window is left
> open, the number of clicks within (usage), or a simple ballot on the
> bar.  The alife system would then take the experience into consideration
> when proposing the next browser to the user.  Slow, for sure.
> for the user, probably.  But would it generate something novel that might
> stick?  Possibly, which is often the best you can do with
> generation/variation/selection systems.
> Paul Fernhout once built a fascinating alife application when we were
> at the AI lab at North Carolina State University.  These robot critters
> wandered around scavenging (and sometimes stealing) parts from the
> environment and each other and assembling copies of themselves that then
> went off to do likewise.  Aside from the fun of watching such a system
> there were a number of interesting cases where more than one critter
> over the same part, or strange hybrid critters appeared.  Something like
> that in Morphic would be way cool.  Consider a little robot (or even
> better, several) wandering around your desktop reassembling morphs,
> copying, stealing and de/recomposing scripts.  Sort of like blobmorphs
> a mission.
> Regards,
> Sam
> Sam S. Adams, IBM Distinguished Engineer, IBM Research
> tie line 444-0736, outside 919-254-0736, email: ssadams at
> <<Hebrews 11:6, Proverbs 3:5-6, Romans 1:16-17, I Corinthians 1:10>>
>                     "Robert
>                     Withers"              To:     <squeak at>
>                     <rwithers12 at med       cc:
>           >            Subject:     Re: CAS and Squeak
(emerging...  ;-))
>                     06/01/2001
>                     02:45 AM
>                     Please respond
>                     to squeak
> Hi Sam,
> I didn't know Squeak could do that.  :)    That's the exact vein of
> that I've done in years past.   I made it through half of Prigogine's
> "Order
> out of Chaos" (and it was tough going) and read Kauffman's original
> "Orgins of Order", which rocks.  It's also out of print though.
> I hadn't heard of Echo, since it has been several years since I followed
> work.  Here is a link in case others are interested:
>  Unfortunately it seems as if many
> of
> the links are broken.   I'd be interested in helping bring Echo to
> The only stumbling block I come across when considering alife and friends
> is
> what to apply it too.  It is interesting for it's own sake, and of course
> there is cognition (wow!), but most things done in a computer are linear
> ordered operations.  Almost everything people do _programmatically_ is
> focussed around controlling inputs (in a very restrictive way),
> transforming
> the data, and generating output.  Except for (and not exclusively) we
> wheee!) Squeakers and Smalltalkers.  Maybe the reactive parts of a
> environment could be good areas for this, like scheduling, simulation, UI
> event processing and human interaction, and 'new breed' AI (neural nets,
> GAs, alife).
> There is this aspect of the Squeak environment that seems as if it is
> to doing your next task for you.  How could we increase feedback to
> about the efficiency and fluidity of an individual interacting with
> There seems to be several modes that I operate in with Squeak.  Exploring
> classes, debugging, designing, playing with tools like Alice, sound and
> such.   A properly specified CAS may detect these different modes and may
> be
> able to change structure/behavior appropriately.  Instead of separate
> bounded projects, each with their own layouts and open views, when we
> switch
> modes, Squeak would restructure the current project's tools for that mode
> of
> interaction (we would still have different Projects but I like how one
> switch immersions).  I like to think there is a way to build a CAS that
> could adapt to those perceived modes of operation and the resulting
> immersion.
> Everyone puts so much work into Squeak, that we may be able to achieve
> negative changes in entropy, but I think that's different than
> irreversibility.  Now where did I leave Ilya's book...
> Rob
>  ----- Original Message -----
> From: Sam Adams <ssadams at>
> To: <squeak at>
> Sent: Thursday, May 31, 2001 10:56 PM
> Subject: CAS and Squeak (evolved from: Squeakland Evolution project
> ;-))
> > Rob,
> > Ahh, now you're talking.  I too have been long fascinated by the
> > of complex systems, especially emergent behavior.  Hollands "Hidden
> Order"
> > is a great source of ideas and approaches for complex software systems.
> > Anyone up for implementing ECHO in Squeak?  Also, Kauffman's previous
> work
> > "At Home in the Universe" contains an excellent but simple experiment
> > describe his NK models (the buttons and string example) that would make
> > great interactive essay.  Almost 5 years ago, Steve Burbeck and I
> > implemented something akin to his random boolean networks in Squeak as
> part
> > of our research into Self Configuring Systems at IBM.  It's truly
> > how quickly such system's lock into the "frozen" or "highly ordered"
> > regime, even starting from a completely (pseudo)random network of
> > interacting nodes with random goals.  Very counterintuitive.  This
> research
> > has led us to develop techniques for harnessing and steering emergent
> > behavior in the service of some very ambitious research goals, namely
> > human-like cognition in machines.  Yes, in Squeak.  Most of the details
> are
> > all under wraps of course and we expect a number of years of work ahead
> to
> > achieve the goal, but some of the progress we are making is very
> promising.
> > Think feedback loops, lots of them, intersecting each other, then go
> > contemplate a whirlpool vortex in your local creek or bathtub for
> > Sorry, flush toilets won't do, on either side of the equator. ;-)
> >
> > While I'm on the subject of complex adaptive systems (CAS) and Squeak,
> has
> > anyone spent any cycles considering the irreversibility of a Squeak
> image?
> > Ilya Prigogine, Nobel laureate in chemistry, wrote an excellent if
> > difficult book on complexity and irreversibility called "Order out of
> > Chaos", back in 1989, but it seems to be out of print.  I haven't read
> his
> > latest work, "The End of Certainty : Time, Chaos, and the New Laws of
> > Nature" by Isabelle Stengers and Ilya Prigogine, but it seems to be on
> the
> > same track.  His preoccupation with the so called "Arrow of Time" could
> be
> > very enlightening if applied to software development, especially in the
> > dynamical social context of the Squeak community.
> >
> > FYI, I recently found an excellent online introduction to Chaos and
> > Complexity in a rather unorthodox place,
> .
> > Warning, its a bit of a fat download for the narrowbanded.
> >
> > Regards,
> > Sam
> >
> > Sam S. Adams, IBM Distinguished Engineer, IBM Research
> > tie line 444-0736, outside 919-254-0736, email: ssadams at
> > <<Hebrews 11:6, Proverbs 3:5-6, Romans 1:16-17, I Corinthians 1:10>>
> >
> >
> >
> >

More information about the Squeak-dev mailing list