A Fuzzy approach for modeling the team WARTHOGSIM
Eduardo S. Fraccaroli, Pedro M. Carlson
São Carlos University of São Paulo, Institute of Mathematics and Computer Science, Department of Computer Science; São Carlos University of São Paulo, School of Engineering of São Carlos, Department of Electrical Engineering
http://www.sel.eesc.usp.br/warthog
Abstract This work involves the uses of a fuzzy system as an alternative to traditional methods for defining the stress level of the players on a soccer robots simulated team. We propose a robust method, focused on the level of strees that a player has during a game, according to external factors such as time, percentage of successful attacks and defenses. The results are reported trying to validate the proposal.
1 Introduction
WARTHOGSIM is the simulation team from the WARTHOG ROBOTICS group [4], affiliated to the School of Engineering of São Carlos and the Institute of Mathematics and Computer Science, in the University of São Paulo, Brazil. The objective of the group is research and development of intelligent solutions for multiagent, autonomous systems. Efforts are being made to participate in other RoboCup categories, such as VSS and SSL. Since there are no mechanical or electronical problems in simulation 2D, we can focus the research on the intelligence and behavior of the robots interacting with other teammates and opponents. Our current approach is to determine the behavior of the team based on its stress level, using a fuzzy system. The framework chosen for this implementation was agent2d.
Thus, for the purposes mentioned above, the rest of this article is organized as follows. Section 2 presents the model of the team and their proposed actions. Section 3 details the proposed model of the fuzzy system applied to the team. Section 4 shows the results. Finally, conclusions are woven in Section 5.
2 Characteristic of the team
The agent2d team [1] was used as a starting point for creating our own team. It uses the basis library librcsc [2] for the simulation of 2D RoboCup Soccer. The whold development was done using the default C++ language. It was also used Matlab software, which was performed throughout the fuzzy system modeling.
A fuzzy approach was chosen to define the behavior of players during a match. This behavior was based on a stress scale of three levels:
- Stressed A stressed team has the only objective of scoring goals. If a teammate holds the ball, dribbling and quick and long passes are made, always advancing in the field. If the opponent holds the ball, marking presses opponents, and too many faults. There is no concern with the energy expended, since all actions are performed with maximum intensity. With this behavior is obtained a method of prevention, because attempts to avoid at any cost the progress of the opponent;
- Normal A team with a regular behavior execute his actions balancing two conditions: shorter execution time of action, with the greatest energy savings. Thus makes the team faster and agressive than any relaxed team, but will not spend as much energy as a team under stress. Their attitudes are more audacious, as attempts to pass in depth, marking more rigorously;
- Relaxed A relaxed team (low stress level) performs the movements with the minimum intensity needed for successful action. It moves so slowly it does not make faults, and their attitudes are always objective and secure. The passes are made only to a free teammate, no action alone. This behavior can be seen as a bonus to the team.
The difference between the levels are the possible actions that the player can take and their different intensities. No behavior has advantages over others, attitudes are different for each game situations. A low level of stress means merit to the team, while a high level of stress suggests that the team remain cautious, and not a demerit. In each behavior two parameters were changed, in addition to the actions to be taken, the parameters are:
- dashpower Sets the amount of any player movement, such as dribbling and running;
- tacklepower Defines how strong is the attempt to take the ball from the opponent. If it is too weak, the ball won't be recoverd. On the other hand, if the attempt is too strong, a fault might be assigned, resulting on a possible punishment as a yellow card or even a red card.
3 System development
The proposed system was developed according to Figure 1. The diagram fuzzy system is responsible for determining the stress level of players according to three parameters sent by the team, due to the game time, percentage of attacks successfully completed and percentage of defenses performed successfully. The WARTHOGSIM is responsible for sending these three parameters to the fuzzy system, then receives the information of certain stress level and sets the time to play. Making clear that the whole system works in real time, while running a game.
The coach is responsible for evaluating the output of fuzzy system and through it to determine the behavior of the team. Can take three different types of behaviors: relaxed, normal and stressed.
The strategy consists in the performance evaluation of the technical team for every 250 cycles of time. After the decision of which behavior to follow, the coach announces the players from each decision and each player puts into practice the behavior selected by the coach.
3.1 Diagram Fuzzy System
The fuzzy approach has three inputs and one output. The input and output parameters are:
- INPUT Time Time elapsed. The membership function is represented by three linguistic variables: begin, middle and end (Figure 2);
- INPUT Successful attacks Value in percentage (%) of successful attacks against our opponent's team. It membership function is represented by three linguistic variables: low, medium and high(Figure 2);
- INPUT Successful defenses Value in percentage (%) of successful defenses against our opponent's team. It membership function is represented by three linguistic variables: low, medium and high (Figure 3);
- OUTPUT PsicoFuzzy Stress level of the players, and has three different levels. It membership function is represented by three linguistic variables: relaxed, normal and stressed (Figure 3).
3.2 Rules Base of System Fuzzy
The expert knowledge was responsible for relating the variables and their values was assumed in the Table 1, which gave rise to the fuzzy rules in if-then format.
Table 1. Fuzzy system rules table.
| time | % successful attacks | % successful defenses | PsicoFuzzy |
|---|---|---|---|
| begin | low | low | stress |
| begin | low | medium | normal |
| begin | low | high | normal |
| begin | medium | low | stress |
| begin | medium | medium | normal |
| begin | medium | high | light |
| begin | high | low | stress |
| begin | high | medium | normal |
| begin | high | high | light |
| middle | low | low | stress |
| middle | low | medium | stress |
| middle | low | high | normal |
| middle | medium | low | stress |
| middle | medium | medium | normal |
| middle | medium | high | normal |
| middle | high | low | stress |
| middle | high | medium | normal |
| middle | high | high | light |
| end | low | low | stress |
| end | low | medium | stress |
| end | low | high | normal |
| end | medium | low | stress |
| end | medium | medium | stress |
| end | medium | high | normal |
| end | high | low | stress |
| end | high | medium | normal |
| end | high | high | light |
4 Results
The results were obtained by means of ten matches held as follows:
- Ten games against the world champion's 2010 RoboCup HELIOS;
- Ten games against the world champion's 2009 RoboCup WrightEagle;
- Ten games against the champion of Latin American Robotics Competition 2010 (LARC) GEARSIM;
- Ten games against the agent2d.
Table 2. Results WARTHOGSIM.
| WARTHOGSIM | HELIOS | WARTHOGSIM | WrightEagle | WARTHOGSIM | GEARSIM | |
|---|---|---|---|---|---|---|
| 1 | 3 | 2 | 0 | 1 | 0 | 0 |
| 2 | 3 | 5 | 4 | 3 | 1 | 1 |
| 3 | 1 | 4 | 1 | 1 | 1 | 3 |
| 4 | 0 | 0 | 2 | 1 | 5 | 0 |
| 5 | 3 | 2 | 1 | 4 | 2 | 6 |
| 6 | 0 | 3 | 3 | 2 | 1 | 2 |
| 7 | 0 | 2 | 0 | 2 | 3 | 1 |
| 8 | 1 | 4 | 3 | 1 | 3 | 1 |
| 9 | 1 | 2 | 3 | 1 | 4 | 4 |
| 10 | 2 | 5 | 2 | 1 | 2 | 4 |
| Average | 0,933 | 2,8 | 1,166 | 1,8 | 2,1 | 1,833 |
It is observed that the average goals scored in Table 2 made by the team WARTHOGSIM against the team GEARSIM, shows normal behavior, as seen in the fourth game. You can also check the behavior stressed in the second and ninth games.
Table 3. Results Agent2D.
| Agent2D | HELIOS | Agent2D | WrightEagle | Agent2D | GEARSIM | Agent2D | WARTHOSIM | |
|---|---|---|---|---|---|---|---|---|
| 1 | 0 | 6 | 0 | 4 | 0 | 5 | 0 | 2 |
| 2 | 2 | 0 | 3 | 0 | 12 | 0 | 6 | 0 |
| 3 | 0 | 10 | 1 | 6 | 0 | 8 | 0 | 6 |
| 4 | 0 | 5 | 1 | 6 | 0 | 6 | 0 | 3 |
| 5 | 0 | 2 | 0 | 5 | 0 | 7 | 0 | 2 |
| 6 | 0 | 5 | 2 | 9 | 0 | 5 | 0 | 2 |
| 7 | 0 | 3 | 1 | 7 | 0 | 2 | 0 | 4 |
| 8 | 0 | 6 | 1 | 13 | 0 | 5 | 0 | 2 |
| 9 | 0 | 10 | 0 | 4 | 0 | 3 | 0 | 5 |
| 10 | 0 | 10 | 0 | 13 | 0 | 9 | 0 | 3 |
| Average | 0 | 5,6 | 0,5 | 7,9 | 0 | 5,6 | 0 | 3,1 |
The results in Table 3 were achieved through direct matches between the agent2D against the teams above. Note that the highest average of the results of the ten games was achieved by the team WrightEagle, but was also the only team that has goals of agent2D. The team WARTHOGSIM achieved an average of 3, 1 goals against none in agent2D, showing a relaxed working behavior, which is not intended to major differences in the final score but the victory by saving energy and acting objectively and safely.
5 Conclusion
Presented in this paper the WARTHOGSIM team, a team able to infer levels of stress to their players in a game of robot soccer. To this end, we used a fuzzy system to determine the stress level according to the game time, the percentage of successful attacks and defenses. In short, this work has extreme value when it comes to specifying a new strategy game for teams of robots, enabling even if future versions are improved through new research.
References
- Akiyama, H.:agents2D, http://pt.sourceforge.jp/projects/rctools/ downloads/48789/agent2d-3.0.0.tar.gz/.
- Akiyama, H.:librcsc, http://pt.sourceforge.jp/projects/rctools/ downloads/48788/librcsc-4.0.0.tar.gz/.
- Kitano, H. and Asada, M. and Kunioyshi, Y. and Noda, I. and Osawa, E.:Robocup: The Robot World Cup Initiative, IJCAI-95 Workshop on Entertainment and AI/Alife, pp.532, (1995).
- WARTHOG ROBOTICS, http://www.sel.eesc.usp.br/warthog.