vendredi 14 octobre 2011

Anatomy of a Quantum Entity


During the implementation of my retro-causality prototype, I quickly got stuck by the naïve implementation I did for the “collapsing process” of Quantum Entities. An upgrade of this system was urgently needed and I continued to use Quantum Mechanics metaphors to do it.

As a reminder, a Quantum Entity is the root class of nearly everything in DramaticGames. It is an abstract class that is “just” a collection of properties. Contrary to classical objects, each property has several potential values at the same time.



The properties of an Entity are “collapsed” when they are observed. That is to say that when the player does an action that needs a single value of an entity property, the collapsed value is selected randomly amongst the potential values of the property. 

The random selection takes into account the probability of each potential value and, by doing so, allows the DramaManager to influence the outcome of the collapse process.



This collapsing process can be enhanced by remembering the different observations made for a value and by logging them. This logging mechanism allows the DramaManager to later ignore observations at will and creates even more flexibility for influencing the system (what I named the backstage in my other post).



In addition to the collapsing process, another mechanism is necessary to support the previously described retro-causality and entanglement system. This additional mechanism introduces a representation of the interactions in-between entangled entities. 

The handling of those interactions is done by what is called “decoherence” (this is just a metaphor, real Quantum decoherence is calculated differently). Interactions can appear and disappear during the life time of an entity, depending of the DramaManager priorities when trying to realize Intentions.



Finaly, the retro-causality process needs to query the past states of an entity, to be able to check goals’ constraints that are retro-planned in the past (in retro-time). To simplify things, we just consider consolidated short term past and consolidated long term past.



The fact that the past states of an entity are the consolidation of some of his previous potential states brings the notion of potential and flexible past. A notion very important to leverage fully retro-causality.