[Squeakland] Making Cultural simulations on Kedama
yoshiki at squeakland.org
Mon Jul 31 21:25:22 PDT 2006
> ¿Do you think is feasible to implement the same model in Kedama? If
My feeling is, yes, it looks feasible.
> ¿Where is the best way to start implementing it?
You can drop a Sketch onto a KedamaWorld to "fill" the world with
turtles. Then, you create 5 patch variables each of which represents
a "trait" in your example. You add properties that is called
something like "origX" and "origY", and write scripts to save and
restore the turtles' positions into these. To cache the traits value,
turtles should have 5 properties to save the values in the patch
variables as well (See the example of ForestFire on the web.)
To initialize the patch variables, the ForestFire example should be
helpful. It initializes the map of forest with 1 or 0 value. In this
example, the initial values are in the range of 0 to 9 (or 1-10), but
can be done in a similar manner.
At each step, the turtles first cache the values in patch variables
to the own properties. Then, they move around and compare the values
in the cache with the values in neighboring patch variables, and
modify the cached values. At last, they return to the original
position, and write back the cached values into the patch variables.
The modification made to the cached values
is the core of the program, and it may require some amount of
tile-scripting, but in principle, this should work.
More information about the Squeakland