siteIcon

Tech Novice Tools

Processing Apps

burgerIcon

Narnia Simulationbacteria

Lions and Witches and Humans, Oh My!

About the saga...

In CS Lewis's 'Chronicles of Narnia' series, the story 'The Lion, the Witch and the Wardrobe' tells the tale of 4 children who encounter the 'white witch' and the lion, Aslan, in a land called Narnia.

This simulation is a interaction between Humans, Lions and Witches: Here are the basic rules of engagement:

  • Humans wander aimlessly in the space
  • Witches turn Humans into Statues
  • Lions free Statues back into Humans
  • Momentum is conserved when elements collide (unless those elements are turned to Statues)
  • Some 'randomness' is inserted into the system at time to prevent various elements from getting in a 'rut.'

Last update: 11/05/19


Current Development Stages:

Stage 6: Early November 2019

This is the first stage where we code out 'intention.' Logic in the main iteration loop in the draw function checks to see if the 'cool' is 'Lion' and if so, the software checks for the presence of Statues. If there are, Aslan turns red (he's mad) and he finds the closest one, targets it and frees it.

Coming soon: If there are no Statues, he'll target the Witch!


Stage 5: Early November 2019

Stage 4 demonstrated unacceptable behavior once Aslan freed a Statue: often they remained 'attached at the hip' and struggled to separate from each other.

This stage attempts to address this unwanted behavior.


Stage 4: Early November 2019

Stage 3 mentioned that 'elements' (particularly the Witch) could often get 'stuck' against a canvas wall after turning Humans to Statues.

This stage attempts to address this in three ways:

  1. Put an witch-immunity time delay on a Human after being freed by Aslan: this way, if a Statue, once freed by Aslan has a chance to get away from the Witch before getting 'stoned' (sorry), the Witch can then move away from the wall and the entrapping statue.
  2. Create a property that counts the number of hits an element has against a boundary. If it's 'excessive' give the element a chance to 'teleport' away from that area to a new location.
  3. Increase the random angle an element has when hitting a Statue to make sure it has a chance to deviate away from a 'rut' in its movements.

Note: After working on this stage, we found a variation of Strategy 3 that seemed to work well. Even when several more Humans were added to the system, there were no instances of trapped elements even after extended run times.

What was the variation?

We added a random angle in [10, 30] to the existing currentDirection. This was done by using a 'setter' function in Molecool to make sure other properties were correctly updated.

This had the effect visually that an element was 'spinning' or 'dancing' or 'slingshotting' around a statue, providing a means of escape. This can be seen more readily by reducing the frame rate of the sketch.

The other strategies may be worth exploring, but this one seems to have accomplished our 'free the trapped cool' goal.

How 'Cool'!


Stage 3: Late-October 2019

This app is a simple interation between 4 humans, a witch and a lion.

Players act as described above and initialization includes ensuring elements are spaced reasonably apart.

Currently, there is no 'intention' in chasing elements or in lion-witch interactions.

Current logic limitations mean that sometimes elements get trapped between others and canvas walls.