An Open Virtual Environment for Autonomous Agents ... - CiteSeerX

19 downloads 392 Views 101KB Size Report
Abstract. We describe a VRML/Java-based virtual environment that is popu- lated with ... trol, and visualization are distributed using a client/server approach.
An Open Virtual Environment for Autonomous Agents Using VRML and Java Bernhard Jung∗ University of Bielefeld Faculty of Technology

Jan-Torsten Milde† University of Bielefeld Department of Linguistics and Literature

Abstract We describe a VRML/Java-based virtual environment that is populated with heterogeneous articulated agents. In this simulated environment, agents compete for collecting certain objects while avoiding obstacles and other agents. Environment simulation, agent control, and visualization are distributed using a client/server approach. An important feature of the framework is its openness for novel kinds of agents: user defined agents can be integrated into the environment by supplying VRML models of the agents’ visual appearance and agent control clients that follow a predefined communication protocol. The environment serves as testbed for exploring principles for the design of autonomous, yet instructable agents. Instructability is necessary because agents represent human users. Autonomy is required so as to relieve the human from too much technical detail when directing the agent to approach and to pick up target objects with their manipulators. Autonomy is also necessary to enable the agents to explore the virtual environment in the absence of continuous instructions by the user. CR Categories and Subject Descriptors: I.2.11 [Artificial Intelligence]: Distributed Artificial Intelligence – Intelligent Agents, Multiagent systems; I.3.2 [Computer Graphics]: Graphics Systems – Distributed/network graphics; I.3.2 [Computer Graphics]: Methodology and Techniques – Interaction techniques Additional Keywords: Virtual environments, VRML, autonomous agents, natural language processing.

1

Introduction

Web-based multi-user virtual environments are envisioned as user interfaces of the future: people from all over the world – represented by their personal avatars – will be able to meet in 3D visualized virtual environments, communicate with each other, and interact with virtual objects or synthetic agents in a most natural way as if cyberspace were real. ∗ P.O. Box 100131, 33501 Bielefeld, Germany, [email protected] † P.O. Box 100131, 33501 Bielefeld, Germany, [email protected]

Figure 1: The initial state of the simulated world. The world objects (trees, fruits, tables, castle, etc.) are randomly distributed in the environment. We are still a long way away from reaching this goal. Today, there exist several 3D multi-user environments on the web, that are often visually very attractive and serve as meeting and communication places for their users. However, interaction possibilities within these environments are still severely limited and the avatars’ behaviour is relatively poor as compared to their visual appearance. Crucial aspects for the further advancement of interactive 3D worlds include, as we argue, improved simulation of object-object, object-agent, and agent-agent interactions, autonomy of agents, and natural human-machine-communication. We have developed an experimental web-based virtual environment that addresses these issues. This virtual environment consists of a forest, a castle, a river, two bridges across the river, and several tables (see Fig. 1). Fruits of different sizes (tomatoes, bananas, coconuts) are placed at different heights in the environment, laying on the ground or tables, or hanging on trees. Articulated, anthropomorphic or animal agents inhabit this environment. The agents can collect these fruits but they must use particular body parts (hands, mouth, or other agent-specific grippers) to do so. Key features of the distributed simulation environment can be summarized as follows: • Dynamic environment: Each time the simulation is started, the environment is created with a random distribution of objects. The environment can host varying numbers of agents of different physical characteristics and behaviour. Furthermore, in the course of the simulation, agents will collect fruits that are removed from the environment. • Realistic agent-object, agent-agent interaction: Agents must

11111111111 00000000000 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 Datagramm 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 Datagramm 00000000000 11111111111 00000000000 11111111111 Datagramm

World Server

VRML Browser

World Model

EAI

Applet

Perception

Datagramm

Control Client

Control Client

0110 0110 1010 10

Control Client

Figure 2: The Client/Server architecture of the distributed simulation environment. The scene graph is visualized using a VRMLbrowser. The applet client translates the messages into EAI calls. The server holds a world model. Any number of control clients can connect to the server. avoid obstacles and other agents. To pick up fruits, agents must grasp them with agent-specific grippers, such as their hands, mouth, etc. • Natural agent movement: agents are articulated figures that must use their legs when moving forward. • Instructability of agents: Each agent represents a human user who can direct the agent what to do, e.g. via a graphical user interface or natural language instructions. • Autonomy of agents: Agents are capable of pursuing their goals (that might have been specified by the user) on their own. This relieves the user from technical detail, e.g., specifying obstacle avoidance strategies or gripper positions when the agent is collecting fruit. • Extensibility: Novel kinds of agents can be integrated into the environment. The developer only needs to provide a VRML model and a control client for the agent. The distributed 3D simulation system is implemented using only standard technologies, namely VRML2 ([4]) and Java. In the following section we describe the technical details of the Client/Server architecture of the distributed simulation system. Section 3 gives a brief overview of so far implemented agents and Section 4 describes how novel agents can be integrated into the environment. Finally a short conclusion is given.

2

The Client/Server Architecture

Environment simulation, agent control, and visualization are distributed using a client/server approach. The client server architecture consists of three parts (see figure 2): 1. Server: holding the world model, transporting messages to/from the clients, generating sensor data. 2. Applet client: accepting messages from the server, interpreting these and controlling the virtual world via the External Authoring Interface, EAI[7]. 3. Control client: defining the behaviour of an agent, interpreting perceptions. This three tier-model allows to separate the behaviour control of an agent from the physical control of the agents’ movements and the visualisation of the scene.

For representing the testbed scenario the server holds a 2.5D model of the world. Trees and tables are approximated by their bounding cylinders, the castle is represented by the 2D projection of its shape onto the X/Z-plane, a bridge is represented by its two entry points and its width. The fruits are defined to be spheres of a fixed radius. For every fruit the position in the global Cartesian coordinate system is known. At startup the server synchronizes the internal world model with its visual representation defined in the VRML2 file. To do so it connects to the applet client and transmits position requests. These will be interpreted by the applet client and corresponding EAI-calls will modify the predefined positions of the affected objects. The server also uses the world model to control the movement of the agents. If a request puts an agent into a non possible location it will not be transmitted to the applet client. If an agent tries to pick up a fruit, the server controls whether the fruit is reachable by the agent. Fruits grasped by a one of the agents are removed from the world model (and the visualized scene). The applet client manages the visualization of the world model. Each time the world model changes, the server informs the applet of the new state of affairs. The Java applet can create, modify, or delete VRML objects using the EAI. The behaviour of the visualized agents is defined in the control clients. Control clients receive messages from the server that define their current perception and they can send messages to the server for acting in the environment. The agents’ perception is limited in range, direction and area. According to the representation of the objects, different information can be obtained. If in viewing distance, the relative position of trees, tables, bridges and other agents is calculated. The castle is perceived rather vaguely. Only the sector is computed and handed over to the control program. For fruits the absolute position is obtained. As it is the goal of every agent to pick up fruits, the agent has to be sure whether its location is in grasping distance of the fruit. Actions of agents include moving in the world, changing joint parameters of their body, or, to make their movements more fluent, specialized commands to start or stop animation sequences in a situation-adapted manner. Depending on their applicability in the specific situation, action messages will be routed to the applet client, which in turn will use EAI-calls to modify the VRML scene graph.

3

Existing Agents

Currently five different agents have been designed: an anthropomorphic dwarf, an two-legged robot, an four legged bunny, another anthropomorphic agent and a roadrunner. Most of the agent control architectures are essentially reactive systems, some with extended features like map building. All agents also have some facility to interact with the user, either via a graphical user interface or via simple natural language instructions. Figure 3 shows the agent Roadrunner, a two legged animat, which is able to walk into a any direction, to jump, to kneel down, to pick up a fruit with its mouth, to open and close its mouth1 . Each leg consists of three joints allowing linear movement. The neck is modelled with four joints. This allows to move the head all the way down to the ground. The mouth consists of two parts that can be opened and closed, thus enabling Roadrunner’s very special way of collecting fruit.

4

Adding New Agents to the Environment

The described framework allows that new kinds agents of different shapes can be placed into the VRML-environment. As all agents 1 The

VRML model of Roadrunner was designed by Nadine Lessmann and Gerald Albe

Figure 4: The agent Guppy while picking up a fruit from the ground.

Figure 3: The simulated agent Roadrunner is able to move through the world, pick up fruits with its mouth, and interact with other agents; it can be controled by natural language instructions.

nal clock which generates time events, defines that the movement animation lasts exactly one second. Finally, output from the timesensor is routed to the keyframe animation.

# Guppy’s body model

inhabit the same environment, that is controlled by a common environment model, certain conventions about the agents’ body models, grippers, available animations, etc. must be met. When implementing a new agent, two things must be done: First, the visual appearance and basic animation sequences of the agent must be defined in VRML2. And, second, an agent control process must be implemented that communicates with the central server via a fixed protocol. In the following, these steps will be described in more detail. As example serves the anthropmorphic agent Guppy (see Figure 4).

4.1 Defining agent appearance and basic animations in VRML2 An explicit design goal of the simulation framework was that diverse kinds of articulated agents with very unrestricted visual appearance and behaviour should be integrated into the virtual environment. Thus, only minimal requirements were placed on the structure of the agents’ VRML models. More specifically, only the body model of the agent plus an animation that moves the agent from its current position to a target position in a continuous fashion must be defined in the VRML file. The example shown in Figure 5 defines the required VRML nodes for the agent Guppy. First, a Transform-node Guppy defines its articulated body model. Second, a PositionInterpolator GuppyMover2 defines a keyframe animation that will move the agent to a target location using linear interpolation. During the simulation, the key values of this animation will be modified via the EAI (triggered by messages from the agent control client) because, obviously, the agent must be able to move freely in the environment, and not just between the dummy positions (0,0,0) and (10,0,10) of the VRML code shown in the example.3 Third, a Timesensor-node GuppyTSMover, i.e. an inter2 In general, the names of the animation nodes must have the form Mover and TSMover. 3 The server restricts the agents’ maximum speed to 20 units per second. The server also prevents collisions of agents with obstacles.

DEF Guppy Transform { children [ ... # Transform and Shape nodes ... # defining Guppy’s appearance ] } # Movement animation DEF GuppyMover PositionInterpolator { key [ 0.0 1.0] keyValue [ 0 0 0, # starting point, modified by EAI 10 0 10 # end point, modified by EAI ] } DEF GuppyTSMove TimeSensor { cycleInterval 1.0 loop FALSE enabled FALSE } ROUTE GuppyTSMove.fraction_changed TO GuppyMover.set_fraction ROUTE GuppyMover.value_changed TO Guppy.set_translation

Figure 5: Required VRML nodes for the definition of the agent Guppy.

Besides these required nodes, the VRML models for the agents can define arbitrary shapes, joints, and animations. As described below, the agent control clients can register these additional nodes with the server (and thus the applet) such that the interactive modification of joint transformations and start of animations is possible. For example, all agents should define some animation of their movement such that the visualized scene shows a walking or running style when moving in the virtual world. And, most importantly, all agents should define a gripper which enables them to collect the fruits scattered in the environment.

• CastlePerceptionMessage: Describes the direction of the castle relative to the agent. Only raw qualitative information, such as “north” or “south-west” is given.

4.2 Writing Control Clients Agent control clients communicate with the server via a fixed protocol. Messages from the server define the agents’ perception. By sending messages to the server, agents can act in the world, e.g. move forward, turn, grasp a fruit etc.

• FruitEatenMessage: Sent by the server to all agents, when some fruit has been collected by any of the agents.

4.2.1 Messages from agent client to server There are three types of messages, an agent client can send to the server: a) to register the agent with the simulation, b) to trigger the agent’s actions in the world, and c) to request special information about the world status from the server. The following messages serve for the agent’s initialization in the environment: • RegisterMessage: Registers an agent in the environment. As described above, if e.g. agent Guppy registers itself in the environment, Guppy’s VRML model must contain a Transform node Guppy, a PositionInterpolator GuppyMover, and a TimeSensor GuppyTSMover. • RegisterJointMessage: Registers a Transform node representing some joint of the agent’s body model. • RegisterTimeSensorMessage: Registers any TimeSensor node which can be used to start agent-specific animations. Similarly, an UnregisterMessage can be used for removing an agent from the environment. Once an agent is registered with the simulation, the client program can send the following messages to the server that define the agent’s actions in the environment: • MoveMessage: Moves the agent between to points specified as arguments to the message. • SetRotationMessage: Changes the agent’s orientation in the world as defined in the message parameters. • SetJointRotationMessage: Changes the orientation of a given joint of the agent’s body model. • StartAnimationMessage: Starts an agent specific animation (TimeSensor), e.g. for walking or grasping a fruit. • StopAnimationMessage: Stops an agent specific animation (TimeSensor). Finally, there are two messages with which an agent client can request special information about the environment status: • GraspRequestMessage: To be sent when the agent thinks that it has grasped a fruit. If the server decides the grasp action to be successful, the fruit will be removed from the environment. • PerceptionRequestMessage: Notifies the server to send the agent its perception in the following simulation cycle. 4.2.2 Messages from server to agent client Messages sent from the server to the client program concern the agent’s perception of the current scene: • PerceptionMessage: Contains the position of regular world objects such as other agents, fruit, trees, and tables. • LandmarkPerceptionMessage: Describes the position of special landmark objects such as the river and the two bridges.

4.2.3 Control architectures The realisation of an interesting control architecture is the most difficult part when designing new agents. A first requirement is that agents exhibit some degree of autonomy such that they can operate in the environment without direct influence of the user. A mild form of autonomy is necessary, e.g. so as to relieve the human from too much technical detail when directing the agent to approach and to pick up target objects with their manipulators. Agents should also exhibit some degree of proactiveness, i.e. they should be able to take over initiative when pursuing their goals [13]. Proactiveness enables the agents to explore the virtual environment even in the absence of continuous instructions by the user. Second, agents must be able to quickly react to changes in the environment. Making matters more complicated, our agents have only restricted perceptual access and limited reasoning resources when trying to fulfil their goals. Work done in the field of Artificial Life and autonomous reactive agents ([3, 10, 5, 9]) has shown, that even simple, purely reactive agents can exhibit complex behaviour, which is very hard to understand and to control. Such results have also been obtained in virtual reality simulations of autonomous agents [11]. And third, agents must be instructable by their human “mentors”. For controling partially autonomous agents, the interaction metaphor of direct manipulation is not feasible. Instead, a more appropriate interaction metaphor is the concept of indirect management [6]. According to this view of interaction, the user communicates high-level goals to the agent who will be responsible for realizing these goals in its environment. A promising form of directing the virtual agents is the use of natural language instructions [1, 2, 12, 8]. Some of the agents developed so far comprise simple natural language interfaces. To summarize, the design of autonomous yet instructable agents is an open research issue. Indeed, our original motivation for the development of the presented simulation system was to provide a testbed for experimenting with appropriate control architectures for such agents.

5

Conclusions

We have described a virtual environment for multiple autonomous and instructable agents. The distributed simulation framework allows for easy integration of novel agents into the environment. Through the distributed implementation of simulation, visualisation, and agent control the work load of the simulation is shared among a number of computer systems. By using (free) portable standard technologies – i.e. VRML2 and Java – the system can be installed on a variety of platforms and even runs on a cheap standard PC without any special graphics hardware. The results presented in this paper are part of ongoing work of a course that started in the summer term 1998 at the university of Bielefeld. Apart from scientific and technological issues discussed above, the didactic goals of the course have been fulfilled very well. The students were able to learn and experiment in the fields of computer graphics, distributed programming, virtual multi-agent environments, artificial life and artificial intelligence.

Acknowledgments We would like to thank the participants of the course “Lebendige Welten in VRML und JAVA”: Nadine Lessmann, Gerald Albe, Guido Heumer, Patrick Ludolph, Christoph Ossieck, Tobias Ahlers, Sascha Koch and Martin Schneider.

References [1] N.I. Badler, B.L. Webber, J. Kalita, and J. Esakov. Animation from Instructions. In N.I. Badler, B.A. Barsky, and D. Zeltzer, editors, Making Them Move. Mechanics, Control, and Animation of Articulated Figures, pages 51–93. Morgan Kaufman, San Mateo, CA, 1991. [2] B. Blumberg and T. Galyean. Multi-level direction of autonomous creatures for real-time virtual envoronments. In Computer Graphics Proceedings, SIGGRAPH-95, 1995. [3] R.A. Brooks. Intelligence Without Representation. In Artificial Intelligence, volume 47, pages 139–159, 1991. [4] R. Carey and G. Bell. The Annotated VRML 2.0 Reference Manual. Addison Wesley Developers Press, 1997. [5] K. Dautenhahn. Biologically inspired robotic experiments on interaction and dynamic agent-environment couplings. In Proc. Workshop SOAVE’97, Selbstorganization von Adaptivem Verhalten, Ilmenau, 23.-24. September 1997, 1997. [6] A. Kay. User Interface: A personal view. In B. Laurel, editor, The art of human-computer interface design, pages 191–218. ACM Press, New York, 1991. [7] C. Marrin and J. Couch. Specification of VRML-EAI interface, http://www.vrml.org/WorkingGroups/vrml-eai/. The WWW VRML consortium - online resource, 1998. [8] Jan-Torsten Milde, Kornelia Peters, and Simone Strippgen. Situated communication with robots. In Proceedings of the first international Workshop on Human-Computer Conversation, Bellagio, Italy, 1997. [9] T. Smithers. On quantitative performance measures of robot behaviour. Robotics and Autonomous Systems, 15:107–133, 1995. [10] L. Steels. Mathematical analysis of behavior systems. In From Perception to Action Conference, pages 88–95, Lausanne, Switzerland, September 1994. IEEE Computer Society Press. [11] S. Strippgen. A Virtual Laboratory for Looking into BehaviorBased Autonomous Agents. In W.L. Johnson, editor, Proceedings of the First International Conference on Autonomous Agents. Marina del Rey, CA USA,February 5-8, 1997, pages 474–475. ACM Press, 1997. [12] I. Wachsmuth, B. Lenzmann, T. J¨ording, B. Jung, M. Latoschik, and M. Fr¨ohlich. A Virtual Interface Agent and its Agency. In W.L. Johnson, editor, Proceedings of the First International Conference on Autonomous Agents. Marina del Rey, CA USA,February 5-8, 1997, pages 516–517. ACM Press, 1997. [13] M. Woolridge and N.R. Jennings. Intelligent Agents: Theory and Practice. Knowledge Engineering Review, 10(2):115– 152, 1995.

Suggest Documents