Emergence – Complex behaviour arising from a simple set of rules (think: Game of Life).
Reflection (Introspection) – The ability for a computer program to dynamically alter its own structure and behaviour.
Emerection – Complex behaviour arising from the ability for a computer program to dynamically alter its own structure and behaviour based on a simple set of rules.
ActionScript doesn’t supply an API for dynamically generating or altering classes at runtime, but if you’re willing to get down and dirty with Bytes then anything is possible.
By using the power of ByteArrays we can alter not just an instance but the class definition itself, essentially rewriting the class on the fly.
In our example, we pit several classes against each other, allowing them to kill or merge, in an evolutionary battle of survival of the fittest. Think Game of Life++.
An insight in to how the Flash Player actually works and how it allows us to implement simple techniques from other programming languages to evolve our programs at run-time to increase efficiency.