next up previous
Next: Emergent Behaviors Up: Emergent Behaviors Previous: Analysis of sample robots

An Advanced Agent

We now take a more detailed look at one of the top agents. R. 5210008 is at the time of this analysis, the top rated agent with an experience of more than 400 games; it has played 528 games and is the tenth ranked robot among those with 100 or more games played.

Figure 3.27: The code (s-expression) of agent 5210008.
\begin{figure}{\singlespace\textsf{\small ( IFLTE \_G ( - ( - \_A ( - ( IFLTE \_...
...G )
\_D ) ( + \_F ( IFLTE \_E \_C \_A \_D ) ) )}}{\small\par }

The s-expression of this agent has 449 tokens (see fig. 3.27). But even the cyclomatic number of this expression is 283: a very complex formula indeed. Software complexity measures [100] suggest that cyclomatic numbers higher than 10 should be ``avoided'' because they make a program difficult to understand. The cyclomatic number fails to capture some of the inherent complexity of the formula, such as the widespread use of templates such as (- C _ ) and (IFLTE G _ _ _ ).

With its difficult structure, we were not able to manually de-compile the expression into pseudocode to try and follow the logic. The beginning of such pseudocode would be:





if  x  > FRONT  turn right

else y = FRONT 




The first inequality involves 4 different sensors in a complex relationship, including a confusing multiplication and is already difficult to understand; it may generate a right turn or not, in which case the evaluation continues. And this is just the first expression of a long program, which would take several pages of pseudocode. Instead we have manually looked at several games from our historic records -- to see how the agent behaves in the game environment.

So the next section, which talks about emergent behaviors in general, takes most of its examples from this player. We found out that it is capable of producing a surprising assortment of different behaviors including a different opening move for each game, cutting off the opponent , open box ``traps'' , driving around the edges and so on (figs. 3.31, 3.32, 3.33, 3.34 and 3.35).

next up previous
Next: Emergent Behaviors Up: Emergent Behaviors Previous: Analysis of sample robots
Pablo Funes