Simulating Life: Mutations
…for the previous post on the “Simulating Life, an AI Experiment” project see: http://risebird.tumblr.com/post/174655336230/simulating-life-early-code
As I started to mentally explore how to properly build this experiment, I also started to go over some expectations for a basic hypothesis: that with a good enough evolutionary system, self-modifying decision trees could develop ‘intelligent’ patterns. The central idea of this experiment is the concept of mutation, which when accelerated, should lead to structural complexity through interactions with some environment that signals success or failure. Instead of supervised learning, the decision trees evolve here by being pruned through interactions with some controlled environment. In other words, order out of chaos; although the order itself has to be directed by an outside force/design in the first place :)
This “outside” force is essentially the code that I will write and the environment it will simulate, in which entities following decision trees would alter those trees over time. The “purpose” of each entity is not really defined, except maybe to survive. In this case, the only goal for this experiment is just for me to learn from this experiment and share it with others. However, if a more specific goal was to be introduced, it would completely change the dynamic of evolution in said entities. For example, if the goal was to produce an entity that can move a certain speed on the screen, and say, entities that were not fast enough were periodically eliminated, then I think the average entity would eventually be able to move that speed. Of course, the length of time that it would take to achieve this, would be determined by how fast the mutation/elimination process proceeded, and which mutations methods were used. And so, it occurred to me that there are three main things to consider in such an experiment:
1 - METHOD OF MUTATION
The method of mutation in this experiment would have to involve a process that essentially takes one decision tree layout, and using it as a basis, generates another one. So here we are talking about increasing the entity population whenever there is a mutation, because if you just mutated the same tree over and over, you would not be able to stop mutation past a successful state. Mutation has to store its results in a new entity through an altered copy of the original decision tree. By bundling every decision tree with a single entity, we are creating a structure through which we can have a direct correlation between how it interacts with its environment and how it develops its decision tree.
Each newly-mutated decision tree needs to be tested against the environment separately, to achieve the full evolutionary effect. Furthermore to make sure that there is advancement towards a goal in the general population, the environment has to eliminate some entities that are less capable of reaching this goal. Elimination is also needed because the environment could have limitations on how many entities can comfortably exist in it. I do think that one efficient goal-oriented way to structure such an environment would be to just start out with the maximum number of entities that the environment could handle and mutate entities only by replacing entities that were eliminated, thus always having the maximum number of decision trees at all times.
But how would the trees actually mutate? We could start by saying that a decision tree will randomly mutate a part of itself, but then we miss out on another important aspect of such evolutionary reproduction, and that is: cross-breeding. Let’s say you were to somehow evolve a decision tree into creating something to the effect of legs on a life form, which would give the life form better mobility. Now, let’s say that another decision tree, on another life form, evolved something to the effect of arms, allowing the life form to pick things up. These are both great features, but the odds that the life form that has already developed legs, also developing arms would be extremely lower than just developing one of those features. However, if you had a way to take both of these already-developed decision trees, and somehow merge them together in a functional way, you would have achieved a “shortcut” to getting both features to work in a single entity. The obvious complexity here, which pertains to my experiment, is that since I am using code, it will be difficult to randomly merge different code trees together.
2 - LEVEL OF MUTATION
Once the method of mutation is clear, we must now figure out how much to mutate and how often. There will probably exist a point of configuration that optimizes a balance between the rate of mutation and the environmental elimination process. But since the environment is a factor in determining this optimal configuration, each experiment or simulation will require a unique treatment of this. If you mutate too much, you could skip over vital patterns that can be necessary to advance. If you mutate too little, evolution will take longer. Also, when merging decision trees during cross-breeding, we have to use a process which decides on how much of each decision tree to keep or to throw away. Mutation can also be slowed down by introducing prerequisites for reproduction into the environment. For instance, if the entities need to be close to each other for reproduction to occur, then mutations will also be largely influenced by the ability of specific entities to meet these prerequisites. Of course, in an ideal environment, reproduction does not rely on any environmental factors but rather on time and/or global resources.
3 - METHOD OF ELIMINATION
For elimination of “deficient” entities we have some options: We could make the entities expire after a certain age, which would guarantee that only only newer decision trees survive. This, of course, would need to strike a balance with the rate of reproduction in order to keep optimal population levels. Still, there are other ways to enforce elimination, such as introducing dangers into the environment. One problem with environmental hazards, however, is that life forms can simply evolve around them to a point that they no longer serve as ways to eliminate entities. Yet another way to eliminate could be to make the entities themselves manage this process, through killing off the weaker ones or some kind of conflicts. Yet again, in an ideal environment, the best way to do this could be to simply eliminate the “most deficient” entity on a periodic time interval, where elimination would be based around goal-oriented factors
Stay tuned for more from this project!
…you can find this and other articles on my blog page at:
http://risebird.tumblr.com/