As mentioned previously, the design of the simulation was done concurrently with the agent architecture. Both were designed with each other in mind, using the characteristics of one other as guidelines.
A physical team game was selected as the subject of the simulation. A team game because one of the elements to be explored was the effects of other agents' emotions (both team-mates' and opponents') on one's own emotions. Therefore, multiple agents are required to implement this effect. A physical game would means that the agents would be reactive in nature as the game will be fast-moving. A deliberative agent could also mean more rules in the game and in the case a simple game with minimum rules is preferred to a complex game with lots of rules as once again the emphasis is on the study of emotions and not the game.
With a general idea of the game established, the detail rules of the game can now be specified.
The rules of the game are simple. Two teams with a number of players are put on a playing field. The size of the playing field and the number of players in each team is specified in the beginning of the simulation. The two team occupied different end of the field in the beginning of the game and the aim of the game is to get a ball to the scoring zone at the opposite end. That would be equivalent to scoring a goal. There are not out of play rules and no fouls. The team with the ball is labelled as the offensive team while the other team will be the defensive team. Figure 4.1 shows a diagram of a simulated playing field with six players per team specified.
Figure 4.1
With the rules of the games established, details of other elements in the simulation is necessary. A very important aspect of this simulation was to decide on which emotion variables to incorporate into the system. Although the simulation is capable of supporting any number of emotion variables, using all the emotion types as stated in the semantic-based theory would be unnecessary and unrealistic in the context of this project. It was important to scale down the number of emotion variables and to identify primary ones in my simulation.
After much brain-storming, it was the three pairs of emotion types are identified,
Basically, the three pairs of emotions reflect both ends of the spectrum, e.g. if the player has pride in his own team, he will not feel shame. Therefore, only three variables is necessary to represent each set. The emotion type in bold-italic (the positive aspect) will be referred to from here on and with represent the pair.
Before defining the reactive rules, we need to define the list of players actions available. These actions are the right hand side of the reactive rules. There are basically three sets of actions. Which set of actions do a team use depend on whether the team is on the offensive, defensive or none. These actions are the activities a player can carry out during a cycle of the simulation.
Details of the reactive rules can now be worked out with its associated emotion variables which could have an effect on its strength and its associated action. Associated emotions variables can be switched on or off for each rule. Following is the sets of defensive, offensive and neutral rules to be implemented.
The following table list out the possible rules for a defensive player with the emotion types which could affect its strength. A label (U) beside the emotion variable will indicate that what that emotion crosses the upper threshold, the strength of that rule will increase and when it violates the lower threshold, the strength of that rule will decrease. A label (D) will indicate inverse of the (U) relationship. These relationship can be changed in the parameter file.
| Defensive Mode | Emotions affecting Possibility of rule firing | Rule |
| Tackle | Joy (U), Pride (U), Appreciation (D) | If opponent (with ball) distance = "near" then tackle opponent |
| Chase | Joy(D), Pride (U), Appreciation (D) | If opponent (with ball) distance = "near" and opponent (with ball) distance from goal < own distance from goal then chase opponent |
| Nothing | Joy (D), Pride (D), Appreciation (D) | If opponent (with ball) distance = "near" and opponent (with ball) distance from goal > own distance from goal then do nothing. |
| Chase | Joy (U), Pride (U), Appreciation (D) | If opponent (with ball) distance > "near" and opponent(with ball) distance <= "middle" then chase opponent. |
| Retreat | Joy (D), Pride (D) | If opponent (with ball) distance > "near" and opponent(with ball) distance <= "middle" then retreat |
| Retreat | Joy (D), Pride (D), Appreciation (U) |
If opponent (with ball) distance to goal < own distance to goal and opponent (with ball) > "middle" and opponent (with ball) distance from goal <= "middle" then retreat toward player |
| Chase | Joy (U), Pride (U), Appreciation (D) |
If opponent (with ball) distance to goal < own distance to goal and opponent (with ball) > "middle" and opponent (with ball) distance from goal <= "middle" then retreat toward player |
| Chase | If opponent (with ball) > "far" |
The following table list out the possible rules for a offensive player with the emotion types which could affect its strength. The representations (U) and (D) are the same as for the defensive rules.
| Offensive Action | Emotions affecting possibility of rule firing | Rule |
| Run | Pride (D), Appreciation (D) | If player (with ball) distance from goal < own distance from goal and player (with ball) distance from goal > "mid-near" then run forward towards goal |
| Run | Joy (D), Pride (D) | If player (with ball) distance from goal < own distance from goal and player (with ball) distance from goal <= "mid-near" then run forward towards goal |
| Run | Pride (U), Appreciation (D) | If player (with ball) distance from goal > own distance from goal and player (with ball) distance from goal > "mid-near" then run forward towards goal. |
| Run | Pride (U) | If player (with ball) distance from goal > own distance from goal and player (with ball) distance from goal <= "mid-near" then run forward towards goal. |
| Nothing | Joy (U), Pride (U) | If player (with ball) distance from goal < own distance from goal and player (with ball) distance from goal <= "mid-near" then do nothing |
| Nothing | Pride (U), Appreciation (U) | If player (with ball) distance from goal < own distance from goal and player (with ball) distance from goal > "mid-near" then do nothing |
| Nothing | Pride (D), Appreciation (U) | If player (with ball) distance from goal > own distance from goal and player (with ball) distance from goal > "mid-near" then do nothing |
| Nothing | Pride (D) | If player (with ball) distance from goal > own distance from goal and player (with ball) distance from goal <= "mid- near" then do nothing |
| Throw | Joy (D), Pride (U) | If opponent distance <= "near" and any own player <= "mid-far" and own distance from goal <= "mid-near" then throw ball to player |
| Throw | Pride (U) | If opponent distance <= "near" and any own player <= "mid-far" and own distance from goal > "mid-near" then throw ball to player |
| Run | Joy (U), Pride (D), Appreciation (D) | If opponent distance <= "near" and any own player <= "mid-far" and own distance from goal < "mid-near" then run towards goal |
| Run | Pride (D), Appreciation (D) | If opponent distance <= "near" and any own player <= "mid-far" and own distance from goal > "mid-near" then run towards goal |
| Run | If opponent distance > near and any own player > "mid-far" then run towards goal |
|
| Run | Joy (U), Pride (D) | If opponent distance > "near" and any own player <= mid-far" then run towards goal |
| Throw | Joy (D), Pride (U) | If opponent distance > "near" and any own player <= mid-far" then throw ball to another player. |
| Support | Pride (D) | If player with ball >= "middle" run back towards player with ball to support |
| Nothing | Pride (U) | If player with ball >= "middle" run back towards player with ball to support |
The following table list out the possible rules for a neutral player with the emotion types which could affect its strength. The representations (U) and (D) are the same as for the defensive rules.
| Neutral Action | Emotions affecting possibility of rule firing | Rule |
| Stand up | If player is down then get up |
|
| Get ball | If ball is free and ball = "near" Get ball |
The following table list out the possible emotion rules for success / failure of certain player's action, which will affect the emotion variables.
| Emotions Affected |
Rule |
| Joy, Pride | If throw is successful then Joy of player increase, Joy and Pride of team-mates increases. |
| Joy, Pride | If throw is unsuccessful then Joy of player decreases, Joy and Pride of team-mates decreases. |
| Joy | If tackle is successful then increase Joy of tackler, Joy and Pride of team-mates increases. |
| Joy | If tackle is unsuccessful then decrease Joy of tackler, Joy and Pride of team-mates decreases. |
| Joy, Pride, Appreciation |
If goal is scored then attacking team players Joy, Pride, Appreciation increases, defending team Joy, Pride, Appreciation decreases |
| Joy, Pride | If get ball is successful then Joy of player increase, Joy and Pride of team-mates increases. |
| Joy, Pride | If get ball is unsuccessful then Joy of player decreases, Joy and Pride of team-mates decreases. |
| Joy, Appreciation | If Escape from tackle then Joy, Appreciation increase |
| Joy, Appreciation | If brought down by tackle from tackle then Joy, Appreciation decrease |
The following diagram shows the flow of the simulation
![]()
No
Yes
Figure 4.1
The next chapter will focus on the actual implementation details which
was based on the agent architecture and simulation design.
![]()
Copyright © 1995 to Hay Yong Joo