Implementation of a Multi-Agent in a Virtual Maze


En este trabajo se presenta un sistema multiagente (SMA) que controla el estado morfológico de la gráfica de usuario en un mundo virtual en 3D donde la interacción tiene lugar entre el usuario y el sistema. Los agentes de este sistema pueden percibir el mundo virtual en 3D y representar los resultados de las deliberaciones del SMA en el mundo virtual.

Palabras clave: Sistemas de Multiagentes, JADE, Mundos virtuales 3D, Laberintos.


This paper presents a Multiagent System (SMA) that controls the morphological status of the graphical user in a 3D virtual world where interaction takes place between the user and the system. The agents of this system can sense the 3D virtual world and represent the result of the deliberation of the SMA in the virtual world.

Keywords: Multi-agent system, JADE, virtual world, maze, 3D.


An agent is an entity that makes decisions on the state of their environment. Its features are: autonomy, cooperation, communication, responsiveness and adaptability [1] [2] [3] [4] [5].

An agent is anything that can be seen that perceives its environment through sensors and responds or acts in such an environment through effectors.

An agent is a continuous time process. Unlike a conventional program which is called the start and end, an agent should run until it has reached with the requested set of objectives, or while your cycle lasts and its user does not want to stop it. The temporal continuity is the property.

That gives ''artificial life'' (simulating life) to the agent, allowing you to be alert to a request or a change in the middle. The life cycle of an agent depends on its characteristics, the tasks performed and the desires of its user in terms of time during which the agent should run.

Consensus or agents perceive their environment. An environment is the space where an agent or a group of them are located.

Usually the agents did not act alone, but are located in environments or platforms with several agents, where each has its own goals, make their own decisions and may have the ability to communicate with other agents. All agents are called multi-agent system.

One of the characteristics of multi-agent systems is that each agent system has a limited view and there is no overall control for the entire system.

The problem addressed in this work is to visualize a multi-agent system in 3D virtual worlds. The graphical representation of the agents is a problem that started to have much weight from the work of Christopher Langton entitled "Artificial Life", creator of the "life-as-we-know-it'' or " life-as-it-Could-be '', this is a study of artificial life through cellular automata [6], suggesting that agents should have a graphical representation.

The emergence of Internet as a communication medium has meant that access to information became easy and fast. Most of this information resides in known Web pages, which often have text and images in two dimensions. The real world is three-dimensional, so that lowering the “Web world” 'a two-dimensional information is lost, hence the desirability of integrating third dimension that allows, for example, tour the facilities of a museum or a university to get the information that will interest the visitor. This is a reality that can be achieved through a Modeling Language VRML virtual reality 1, Java3D and OpenGL.

Virtual worlds are a field related to artificial intelligence. This simulation worlds or environments, called virtual, in which man interacts with the machine in artificial environments like real life. Apart from flight simulators and other applications of this kind serve for years to teaching and practice of certain occupations.

2.1. AUML

Agent UML (AUML) by James Odell proposes a notation, extended UML to specify protocols for communication and interaction among agents. AUML is a unified modeling language of agents, which has two areas for the development of specifications, which are class diagrams, which specify the internal behavior of an agent and its relationship to the outside using UML class diagrams adapted from these diagrams we find the class-relationship diagrams, and diagrams or protocol interactions, these diagrams are focused on the interaction between the agents. In the diagrams of interactions there are state diagrams, sequence diagrams, diagram of logic iteration.

The interaction diagram shows the logic shift and behavior of the messages listed in the use case scenario. The interaction diagram shown. Figure 1: The virtual world draws of the database information, on what would be the first image to show with respect to the mood of the avatar. The user scrolls through the avatar, from the initial point, which is the entrance of the maze to the exit. The virtual system verifies the coordinates the user has requested to move. The virtual world system in the database stores information about the environment that manifests itself at that time in the virtual world. The managing agent extracted from the database information about the virtual world. The managing agent makes an inference of what is the appropriate emotion for the avatar. The managing agent sends an INFORM message with the emotion selected to the anthropomorphic agent. Anthropomorphic agent receives the message from managing agent. Anthropomorphic agent with the information received makes the inference, which dictates the image to show the avatar. The anthropomorphic inference agent is stored in the database. The user makes another movement of the avatar, using the arrow keys. The virtual world detects movement the user makes. The virtual system verifies the coordinates the user has requested to move. The virtual world pulls information from the database. The virtual world system in the database stores information about the environment that manifests itself at that time in the virtual world. The active virtual world to the agent broker. The broker agent extracts information about the virtual world through BD. The broker agent sends a message to the managing agent with the information of the virtual world.



Figure 1. Diagram of logic interaction



The state diagram shows the different events that take place in a multi-agent system.

2.2. Case Study: Virtual Maze.

For the case study developed a multi-agent system is represented graphically in a virtual world. The virtual world is a 3D maze. For the implementation of this system were used intelligent agents, GUI, database. The agents were implemented under the Jade environment, which were three agents, the manager agent, broker agent and anthropomorphic agent.

The scenario consists of user interaction with the virtual environment, it is intended that there is a graphical representation in the handling of the system.

The user to display the image shows the representation of emotional state in which it is performed while interacting with the virtual environment.



Figure 2. General scenario



Figure 2, shows the virtual stage connected to the database and the user as part of the interaction of the system, where there is an intelligent system that allows different emotional states based on user interaction.

To solve the above rule it is proposes a multi-agent system in the interaction of a virtual world as shown in Figure 3 below.



Figure 3. Diagram of the system



Figure 3 shows the virtual scenario now becomes the virtual domain, which interacts in the virtual environment.

The Interaction Domain provides communication between the Virtual Domain and Domain of the Shares. The domain of actions, where the image of anger, sadness and joy is denoted by the Anthropomorphic Agent, will count with the help of two participants called: Broker Agent and Manager Agent. Within the domains that comprise the system are: the virtual domain, the Domain and Domain Interactions of the Shares.

The virtual domain has a virtual stage and a database. The Virtual Stage displays the information generated by the domain of the Shares. The domain contains three police actions, which are the following agents:

The connection between the virtual domain and domain of the Shares is made through the Interaction Domain. In the Domain of Interaction information is collected Virtual Stage, this information is used by agents of the Dominion of Actions to generate new data that will be reflected in the virtual domain. The user starts the virtual tour inside the maze, helping through the arrow keys. The Virtual Domain sends information about what happens in the virtual scene through the Interaction Domain. Shares Mastery uses the information collected by the interaction domains, with this information generates new data that is sent through the Interaction Domain of the virtual domain to be displayed on the virtual stage.

At system startup, the user takes the role of Manager Agent, which receives information from the state of the environment. Within this domain are recorded the various changes of states, where states are presented:

The interaction domains play the role of communication between the domain of the Emotions and the virtual domain. Use appropriate language for the interaction of the domains. The interaction domains using a database to make the connection between the Dominion and the Dominion of Virtual Emotions. In the domain of action, the user would like their avatar, be interactive, which is represented in the maze. For this reason you have a domain for the action and the role will be the Anthropomorphic Agent. The Manager Agent creates a mood; this data is sent to the Anthropomorphic Agent for this image to derive an emotion.


The system consists of three parts: the first is the graph that is represented by a 3D virtual world, the second part consists of artificial intelligence and rules made by agents of knowledge and ultimately the integrity of the system is to make the connection between the virtual and multi-agent system.

One of the complex parts of the application was to find the exact spot where you should put the connection code from the virtual world that would result in the graphical representation of the virtual world SMA.

We found multiple jobs like this; try to address the problem of visualization agents. Several have been found to not use a language of the agents. In Addition it has also been used not java3D. In these studies Python has been used or other platform to deploy agents and the graphics used in VRML or OpenGL or other tool. This project addresses the problem of visualization agents with JADE as the platform for agents and the graphics using Java 3D.

[a] Profesor Investigador de la Universidad Autónoma del Estado de Hidalgo

[1] Hayes-Roth, B., An architecture for intelligent adaptive system, Cite Seer, 1995.

[2] Wooldridge, M. And Jennings, N.; Agent Theories, architectures and languages: To survey, Cite Seer, 1994, ECAI'94.

[3] Brustoloni, J.; Autonomous agents: Characterization and Requirements, School of Computer Science, Carnegie- Mellon University, 1991, Relatorio Technical CMU-CS-91-204.

[4] Franklin, S. AND Graesser, A., Is it an Agent or just a Program? A Taxonomy Autonomous Agents for, Third International Workshop on Agent Theories, 1996, Architectures and Language.

[5] Huang, Zhisheng AND Eliës, Anton AND Van Ballegooijen, Alex AND Bra, Paul, A taxonomy of web agents, Vrije University of Amsterdam, Eindhoven University of Technology. The Netherlands. IEEE Computer Society, 2000.

[6] Langton, C., Studying artificial life with Cellular automata, Physical D, 1986, 22, Pages: 120-149.

[7] Zhisheng Huang, Anton Eliës, Visser Cees, "Programmability of Intelligent Agent avatars ", Vrije University of Amsterdam. The Netherlands.2001.

[8] T. Conde, D. Thalmann, "learnable Behavioral Model for Autonomous Virtual Agents: Low-Level Learning "; Ecole Polytechnique Federale de Lausanne (EPFL). CH-105 Virtual Lab Lausanne, Switzerland. ACM.2006.

[9] Bernhard Jung, Jan-Torsten Milden, "An Open virtual environment for Autonomous agents using VRML and Java ", ACM, 1999.

[10] Pelechano N., Allbeck, JM, Badler, OR, "Controlling individual agents in High-density crowd simulation "; University of Pennsylvania, USA. ACM, 2007.

[11] Hayes-Roth B., "An architecture for intelligent adaptive system "; Cite Seer, 1995.

[12] [Wooldridge M., Jennings, N., "Agent Theories, architectures and languages: A survey ", Workshop on Agent Theories, Architectures Languages (ECAI'94, Cite Seer 1994.

[13] SJ Russell, P. Norving, Artificial Intelligence, a Modern Approach, Pretice Hall, 1995.

[14] Wooldridge M., Jennings NR, Intelligent agents: Theory and Practice, The Knowledge Engineering Review ", vol. 10, no. 2, pages 115-152, 1995.

[15] M.C. Rocío C. Hernández Camacho, Ing. Mariano J. Pozas Cárdenas, Ing. Martha I. Rivera González. Desarrollo de un SMA utilizando AUML. Caso de estudio laberinto virtual. Vigesimasegunda Reunión Internacional de Otoño, de Comunicaciones, Computación, Electrónica, Automatización, Robótica y Exposición Industrial. Roc&C'2011. La Conjunción de las Tecnologías Digitales, en las Redes Inteligentes. IEEE Sección México. ISBN: 978-607-95630-1-1. Acapulco, Guerrero, México. 2011.

[16] V.T. Tomas Mariano, M. Pozas Cárdenas, J. Hernández Camacho “Propuesta para la generación de laberintos ampliados en 2D”, Artículo, Simposio Iberoamericano Multidisciplinario de Ciencias e Ingenierías (SIMCI-2011). ISBN: 978-607-95344 Zempoala, Hidalgo, 2011.

[17] Víctor Tomás Tomás Mariano, Jorge Hernández Camacho. Algoritmo para la generación de laberintos de Conexión Múltiple en 2D. Artículo. Vigesimasegunda Reunión Internacional de Otoño, de Comunicaciones, Computación, Electrónica, Automatización, Robótica y Exposición Industrial. Roc&C'2011. La Conjunción de las Tecnologías Digitales, en las Redes Inteligentes. IEEE Sección México. ISBN: 978-607-95630-1-1. Acapulco, Guerrero, México. 2011.

[18] Jorge Hernández Camacho, Laura E. Muñoz Hernández, América Saldaña Sánchez, Virgilio López Morales. Virtual Distributed Supervision and Control for an Automated Greenhouse. International Symposium on Robotics and Automation. ISBN 970-769-070-4. San Miguel Regla, Hidalgo, México, 2006.

[19] Jorge Hernández Camacho, Juan Carlos Acosta Guadarrama. A Generalised Semantics for Belief Updates - An Equivalence-based Approach. Eleventh Mexican International Conference on Computer Science 2011. Sociedad Mexicana de Ciencia de la Computacion AC (SMCC). ISSN 1870-4069 .Toluca, Mexico, 2011.