The first and second experiments gave rise to agents that efficiently, intelligently and realistically react to the environment by moving from danger to safety. However, in a computer game situation, it is also likely that agents will have greater goals or desires that they need to fulfil, apart from simply surviving and reacting sensibly to the environment. For example, marines in a strategy game might be on a mission to kill the enemy in a particular cell or a villager in a role-playing game might want to stay near its house or shop. Drawing on the notion of “desirability” values from influence maps, goal areas could be given high desirability values for the agents. Additionally, desirability values could then be propagated out to surrounding areas to indicate that these areas are more desirable as they are near the goal. Therefore, the aim of the
third experiment was to combine the desire to reach a greater goal with the agents’
current behaviour of reacting to the environment and avoiding hazards. The third experiment combined an influence map to propagate the desirability of the cells with the cellular automata to determine the comfort of the cells. The question being investigated in the third experiment was what combination of desire and comfort gives the agents the optimal behaviour, in terms of avoiding hazards and reaching their goal.
The scenario for the third experiment was that ten agents have been given the order of getting to a single goal (e.g. marines sent to attack an enemy tank). The method used in the third experiment was to propagate the desire out from the goal position, with a propagation constant of 0.7 (i.e. the desirability value is multiplied by 0.7 for each step out from the goal). This value was chosen as it allows the influence to spread over the entire map of ten by ten cells, with a high concentration of desirability near the goal and low levels away from the goal. Figure 6.5 shows the desirability on a map with a single goal and desirability combined with comfort (darker is less desirable). Next, the agents calculated the comfort values for their local neighbourhood (n=3). Subsequently, the agents selected the best cell in this neighbourhood, based on the desirability value combined with the comfort value of each cell, which became their goal.
Figure 6.5. Desirability visualisation. Desirability on a ten by ten map with a single goal and propagation constant of 0.7 (left) and combined with comfort values (right)
The three conditions that were investigated in the third experiment were designed to test different influences of comfort and desirability on the agent’s choice. The three conditions were evenly weighted (50% desirability – 50% comfort), goal-oriented (75% desirability – 25% comfort), and self-preserving (25% desirability – 75%
comfort). After the agent has chosen the best cell in its local neighbourhood, based on comfort and desirability, it then chose which cell to move to in its immediate
neighbourhood (as in Experiment 2). The best cell in the immediate neighbourhood was chosen based on its comfort value (50%) and its closeness to the chosen cell in the local neighbourhood (50%), which is the condition that was identified as optimal in the second experiment.
6.4.4.1 Results and Discussion
The first three conditions demonstrated that an equal weighting of desirability and comfort gave the agents the most acceptable observable behaviour, in terms of organisation, avoiding hazards and navigating the environment realistically and intelligently. The agents converged reasonably efficiently (Mean = 326 cycles), but only about half of the agents found the goal (Mean = 4.3 agents) as they opted for comfort over the goal.
When the weighting was tipped towards comfort or desirability, the agents’ behaviour appeared random, less organised and less intelligent. The goal-directed agents converged in a reasonable period of time (Mean = 253 cycles), but only about half the agents found the goal (Mean = 4.2 agents). The self-preserving agents required significantly more cycles to converge (Mean = 420 cycles) than the agents in the previous conditions6. There was no significant difference between the number of agents that found the goal (Mean = 3.2 agents) in the self-preserving condition and in the previous conditions (see Figure 6.6).
6 (t=2.443, p<.05)
Mean number of cycles agents took to converge in each condition
0 100 200 300 400 500
50% desire 75% desire 25% desire
Mean number of agents to find the goal in each condition
0 1 2 3 4 5
50% desire 75% desire 25% desire
Figure 6.6. Combining comfort and desire. Mean number of agents to find the goal and mean number of cycles agents took to converge in each condition
Propagation Constant
The agents in each of the first three conditions were not very successful at finding the goal. Therefore, a fourth trial was run with equal weighting to optimise behaviour, but with a greater propagation constant to increase desirability values around the goal.
Increasing the propagation constant (0.8) resulted in greater differentiation between cells on the influence map and further improvements in observable agent behaviour.
The most noticeable change with a propagation constant of 0.8 was the improvement in the agents’ behaviour, in terms of organisation, intelligence and rational behaviour.
The agents were consistently able to move in organised and intelligent ways, exhibiting interesting and rich behaviour. In one situation, the agents were moving towards a goal that was blocked by rain and they waited for the rain to pass before moving towards the goal, rather than running through the rain or getting stuck. The increased differentiation between cells on the influence map provided the agents with a clear view of the best way to navigate through the environment. However, the agents were still not successfully able to find the goal.
Multiple Goals
A fifth and final condition was tested to determine how the agents would perform with multiple goals instead of one. The agents in the multiple goals condition were much better at finding the goals (Mean = 5.9 agents), but did not appear as intelligent or realistic as the agents in the previous condition. The agent were more likely to find
the goals in this condition as there were more goals, but mostly because the desirability from the goals was cumulative, allowing more cells to have higher values and the influence to propagate further.
The third experiment produced an agent model that successfully integrates goal- directed behaviour (based on agent desires) with situation awareness (based on comfort), which enabled the agents to both react to the environment in an intelligent, realistic and organised way while simultaneously satisfying their desire to reach a goal.