Representation of Action Sequences
Actions and Parameters
There is clearly a subset of all possible actions that will allow animats to achieve the two behaviors described (see Table 34.1). Limiting the representation to only the actions needed will not only make the development easier, but also speed up the learning. It would be trivial to extend this at a later date if necessary; the genetic algorithm would cope just as well, if a bit slower.
Some actions are given parameters, which means we don't have to use large numbers of parameterless actions. This also separates the concepts of what to do, and how to do it in the representation (which helps the evolution). There are two parameters to explain:
Now it's just a matter of combining parameters and actions into sequences of actions.
Simple arrays are commonly used to represent sequences. However, by using actions as the elements in the array, our sequences have no sense of timing; the actions will be ordered, but no hints about delays are provided.
To make this decision, it's necessary to consider how small changes in the representation affect the sequence. Using relative times, changing the timing of one action will have a knock-on effect on the absolute times of all the other actions thereafter. On the other hand, with absolute times, changes to any particular value will be completely independent from the rest of the action times. Because the absolute approach minimizes the interdependencies between variables of the search space, it provides the most flexibility to the genetic algorithm.
As a consequence of global action times, the order of the actions in the array is not important; it's just a form of storage. The first action in the sequence could easily be the last element of the array. There are two different ways to interpret this:
Both of these factors will affect genetic algorithm. Because the problem does not seem too complex, however, we'll settle for the loose representation. The arrays can be ordered after the evolution is over, for efficiency reasons (to avoid scanning the entire array to check the timings of actions).