Learning a Representation of a Believable Virtual Character s Environment with an Imitation Algorithm

Similar documents
BoxPlot++ Zeina Azmeh, Fady Hamoui, Marianne Huchard. To cite this version: HAL Id: lirmm

Setup of epiphytic assistance systems with SEPIA

Tacked Link List - An Improved Linked List for Advance Resource Reservation

Relabeling nodes according to the structure of the graph

NP versus PSPACE. Frank Vega. To cite this version: HAL Id: hal

Blind Browsing on Hand-Held Devices: Touching the Web... to Understand it Better

Service Reconfiguration in the DANAH Assistive System

How to simulate a volume-controlled flooding with mathematical morphology operators?

Malware models for network and service management

Representation of Finite Games as Network Congestion Games

lambda-min Decoding Algorithm of Regular and Irregular LDPC Codes

Study on Feebly Open Set with Respect to an Ideal Topological Spaces

Mokka, main guidelines and future

QuickRanking: Fast Algorithm For Sorting And Ranking Data

KeyGlasses : Semi-transparent keys to optimize text input on virtual keyboard

A Voronoi-Based Hybrid Meshing Method

HySCaS: Hybrid Stereoscopic Calibration Software

DSM GENERATION FROM STEREOSCOPIC IMAGERY FOR DAMAGE MAPPING, APPLICATION ON THE TOHOKU TSUNAMI

Multimedia CTI Services for Telecommunication Systems

Syrtis: New Perspectives for Semantic Web Adoption

Taking Benefit from the User Density in Large Cities for Delivering SMS

Continuous Control of Lagrangian Data

The Connectivity Order of Links

Reverse-engineering of UML 2.0 Sequence Diagrams from Execution Traces

Linux: Understanding Process-Level Power Consumption

An Experimental Assessment of the 2D Visibility Complex

SIM-Mee - Mobilizing your social network

Regularization parameter estimation for non-negative hyperspectral image deconvolution:supplementary material

Traffic Grooming in Bidirectional WDM Ring Networks

The optimal routing of augmented cubes.

An FCA Framework for Knowledge Discovery in SPARQL Query Answers

Comparison of radiosity and ray-tracing methods for coupled rooms

DANCer: Dynamic Attributed Network with Community Structure Generator

Real-time FEM based control of soft surgical robots

Branch-and-price algorithms for the Bi-Objective Vehicle Routing Problem with Time Windows

Moveability and Collision Analysis for Fully-Parallel Manipulators

Very Tight Coupling between LTE and WiFi: a Practical Analysis

Decentralised and Privacy-Aware Learning of Traversal Time Models

Comparison of spatial indexes

Comparator: A Tool for Quantifying Behavioural Compatibility

LaHC at CLEF 2015 SBS Lab

Teaching Encapsulation and Modularity in Object-Oriented Languages with Access Graphs

Natural Language Based User Interface for On-Demand Service Composition

SDLS: a Matlab package for solving conic least-squares problems

Partition Detection in Mobile Ad-hoc Networks

Fault-Tolerant Storage Servers for the Databases of Redundant Web Servers in a Computing Grid

Combined video and laser camera for inspection of old mine shafts

Open Digital Forms. Hiep Le, Thomas Rebele, Fabian Suchanek. HAL Id: hal

Every 3-connected, essentially 11-connected line graph is hamiltonian

Simulations of VANET Scenarios with OPNET and SUMO

Sliding HyperLogLog: Estimating cardinality in a data stream

Real-Time Collision Detection for Dynamic Virtual Environments

Assisted Policy Management for SPARQL Endpoints Access Control

Change Detection System for the Maintenance of Automated Testing

A N-dimensional Stochastic Control Algorithm for Electricity Asset Management on PC cluster and Blue Gene Supercomputer

THE COVERING OF ANCHORED RECTANGLES UP TO FIVE POINTS

Prototype Selection Methods for On-line HWR

XBenchMatch: a Benchmark for XML Schema Matching Tools

OA-DVFA: A Distributed Virtual Forces-based Algorithm to Monitor an Area with Unknown Obstacles

A Resource Discovery Algorithm in Mobile Grid Computing based on IP-paging Scheme

Application of RMAN Backup Technology in the Agricultural Products Wholesale Market System

A case-based reasoning approach for unknown class invoice processing

Linked data from your pocket: The Android RDFContentProvider

A case-based reasoning approach for invoice structure extraction

Accurate Conversion of Earth-Fixed Earth-Centered Coordinates to Geodetic Coordinates

From medical imaging to numerical simulations

A Generic Architecture of CCSDS Low Density Parity Check Decoder for Near-Earth Applications

Quality of Service Enhancement by Using an Integer Bloom Filter Based Data Deduplication Mechanism in the Cloud Storage Environment

Real-Time and Resilient Intrusion Detection: A Flow-Based Approach

A 64-Kbytes ITTAGE indirect branch predictor

A Practical Evaluation Method of Network Traffic Load for Capacity Planning

Deformetrica: a software for statistical analysis of anatomical shapes

Lossless and Lossy Minimal Redundancy Pyramidal Decomposition for Scalable Image Compression Technique

Catalogue of architectural patterns characterized by constraint components, Version 1.0

X-Kaapi C programming interface

MUTE: A Peer-to-Peer Web-based Real-time Collaborative Editor

Modelling and simulation of a SFN based PLC network

Using a Medical Thesaurus to Predict Query Difficulty

Cloud My Task - A Peer-to-Peer Distributed Python Script Execution Service

YAM++ : A multi-strategy based approach for Ontology matching task

RETIN AL: An Active Learning Strategy for Image Category Retrieval

Temperature measurement in the Intel CoreTM Duo Processor

Monitoring Air Quality in Korea s Metropolises on Ultra-High Resolution Wall-Sized Displays

Modularity for Java and How OSGi Can Help

ASAP.V2 and ASAP.V3: Sequential optimization of an Algorithm Selector and a Scheduler

Mapping classifications and linking related classes through SciGator, a DDC-based browsing library interface

Efficient implementation of interval matrix multiplication

The Proportional Colouring Problem: Optimizing Buffers in Radio Mesh Networks

Application of Artificial Neural Network to Predict Static Loads on an Aircraft Rib

Privacy-preserving carpooling

THE KINEMATIC AND INERTIAL SOIL-PILE INTERACTIONS: CENTRIFUGE MODELLING

Spectral Active Clustering of Remote Sensing Images

Multi-atlas labeling with population-specific template and non-local patch-based label fusion

Efficient Gradient Method for Locally Optimizing the Periodic/Aperiodic Ambiguity Function

A Practical Approach for 3D Model Indexing by combining Local and Global Invariants

FIT IoT-LAB: The Largest IoT Open Experimental Testbed

Implementing an Automatic Functional Test Pattern Generation for Mixed-Signal Boards in a Maintenance Context

Growing Neural Gas A Parallel Approach

BugMaps-Granger: A Tool for Causality Analysis between Source Code Metrics and Bugs

YANG-Based Configuration Modeling - The SecSIP IPS Case Study

Transcription:

Learning a Representation of a Believable Virtual Character s Environment with an Imitation Algorithm Fabien Tencé, Cédric Buche, Pierre De Loor, Olivier Marc To cite this version: Fabien Tencé, Cédric Buche, Pierre De Loor, Olivier Marc. Learning a Representation of a Believable Virtual Character s Environment with an Imitation Algorithm. GAMEON- ARABIA 1, Dec 21, Egypt. pp.141-145, 21. <hal-5577> HAL Id: hal-5577 https://hal.archives-ouvertes.fr/hal-5577 Submitted on 29 Dec 21 HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers. L archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

LEARNING A REPRESENTATION OF A BELIEVABLE VIRTUAL CHARACTER S ENVIRONMENT WITH AN IMITATION ALGORITHM Fabien Tencé,, Cédric Buche, Pierre De Loor and Olivier Marc UEB ENIB LISyC Virtualys Brest France {tence,buche,deloor}@enib.fr, olivier.marc@virtualys.com KEYWORDS Autonomy, believability, behaviours, imitation learning, topology. ABSTRACT In video games, virtual characters decision systems often use a simplified representation of the world. To increase both their autonomy and believability we want those characters to be able to learn this representation from human players. We propose to use a model called growing neural gas to learn by imitation the topology of the environment. The implementation of the model, the modifications and the parameters we used are detailed. Then, the quality of the learned representations and their evolution during the learning are studied using different measures. Improvements for the growing neural gas to give more information to the character s model are given in the conclusion. INTRODUCTION One of the major goals of video games is to make the user feel like he/she really is in the game environment. To achieve this, it is possible to use complex devices to increase immersion like surround sound systems and stereoscopic screens. Another way is to make rich environments to increase presence. The latter can be done by, among other things, having characters with believable behaviours (Bates 1994). To generate those behaviours, models from artificial intelligence are used in the game industry. For those models to perceive the environment, game designers have to create a simplified representation of the environment, which is often defined a priori. Defining by hand every new environment s representation is a time-consuming work. We propose that our characters will be able to learn those representations, for them to be autonomous. This learning will be unsupervised and online: the character will learn while it plays without the judgement of a human. To be able to achieve the best believability, we want the computercontrolled characters to do like human-controlled characters. Indeed, there are no better example of what a believable behaviour is than a human behaviour itself. It is this kind of learning, by example (Del Bimbo A., Vicario E. 1995) or by imitation (Gorman and Humphrys 27; Bauckhage et al. 27) we want to use to learn a representation of the environment. This article first presents the growing neural gas model which is used to learn the representation of the environment. Then the characteristics and qualities of the learned representations are assessed by different measures. To conclude, some enhancements are proposed for the growing neural gas to give more information to the character s model. LEARNING A REPRESENTATION OF THE ENVIRONMENT Models which control virtual characters use different types of representation to find paths to go from one point to another. Classic approaches use a graph: nodes represent accessible places and edges represent paths between each place. Actual solutions tend to use a mesh, with different degrees of complexity, to represent the zones where the character can go. The problem with the latter solutions is that they use algorithms to find the optimal path between two points and not the most believable path. With graphs, it is possible to have more control on the paths used by the character. Instead of designing graphs a priori, we want them to be learned by imitation of a human player. This work as been done in (Thurau et al. 24) where nodes and a potential field are learned from humans playing a video game. The character is then using this representation to move in the game environment, following the field defined at eachnode. To learn the position of the nodes, Thurau use an algorithm called Growing Neural Gas (GNG). The GNG (Fritzke 1995) is a graph model which is capable of incremental learning. Each node has a position (x,y,z) in the environment and has a cumulated error which measures how well the node represents its

surroundings. Each edge links two nodes and has an age which gives the time since it was last activated. This algorithm needs to be omniscient, because the position of the imitated player, the demonstrator, is to be known at any time. The principle of the GNG is to modify its graph, adding or removing nodes and edges and changing the nodes position for each given demonstrator s position. The algorithm does the following: for each input the closest and the second closest nodes are picked. An edge is created between those nodes and the closest node s error is increased. Then the closest node and its neighbours are attracted toward the input. The ages of the closest node s edges are increasedby 1 and too old edges aredeleted. Eachλinput a node is inserted between the node with the maximum error and its neighbours having the maximum error. At the end of an iteration, each node s error is decreased by a small amount. The version we use is a bit modified to give better results for our needs as shown by figure 1. Instead of inserting a new node each λ input, a node is inserted when a node s error is superior to a parameter MAX ERROR. As each node s error is reduced by a small amount ERROR DECAY for each input, the modified GNG algorithm does not need a stopping criterion. Indeed, if there are many nodes which represent well the environment, the error added for the input will be small and for a set of inputs, the total added error will be distributed among several nodes. The decay of the error will avoid new nodes to be added to the GNG resulting in a stable state. However if the player which serves as a example goes to a place in the environment he has nevergone before, the added errorwill be enough to counter the decay of the error, resulting in new nodes to be created. This algorithm has 5 parameters which influence the density of nodes, the quality of the representation, the adaptivity and the time to reach a stable state: The attraction applied to first toward (x,y,z) The attraction applied to f irst s neighbours toward (x,y,z) The nodes error decay, ERROR DECAY The nodes maximum error, M AX ERROR The edges maximum age, MAX AGE Nodes can be used as a representation for the character s decision system. However, edges only represent proximity and not paths between nodes: nodes can be closebuttheremaybeaobstaclebetweenthem, soedges cannot be used by the model. nodes {} edges {} while demonstrator plays do (x,y,z) demonstrator s position if nodes = or 1 then nodes nodes {(x,y,z,error=)} end if if nodes = 2 then edges {(nodes,age=)} end if first closest((x,y,z),nodes) second secondclosest((x,y,z),nodes) edge edges {{first,second},age=)} first.error+= (x,y,z)-first Attract first toward (x,y,z) edge first s edges, edge.age++ Delete edges older than MAX AGE Attract neighbours(first) toward (x,y,z) node nodes, node.error-=error DECAY if first.error > MAX ERROR then maxerrnei maxerrorneighbour(first) newnode between(first,maxerrnei) first.error/=2, maxerrnei.error/=2 newerror first.error+maxerrnei.error nodes nodes {(newnode,newerror)} end if end while Figure 1: Algorithm used to learn the topology of the environment represented by a growing neural gas. EVALUATION We used the game Unreal Tournament 24 because it features quite complex environments. Human players can also control avatars in the game so the GNG can learn for them. We have to choose the parameters in a empirical way because we cannot find them analytically nor use an optimization algorithm. Indeed, our goal is believability and it can be only measured with human judges. This kind of evaluation is not suitable for optimization. The best parameters we found are: Attraction force applied to first is.3 times the vector (x,y,z) first Attraction force applied to first s neighbours is.6 times the vector (x,y,z) second Nodes error decay is 1 Nodes maximum error is 2 Edges maximum age is 75 To compare with other environments, the position in Unreal Tournament is given in Unreal units (1 meter is roughly equal to 5 Unreal units) and all the parameters are based on a demonstrator s position in Unreal units.

With those parameters we trained 2 GNG on 2 different maps. The first one is a simple map, called Training Day. It is small and flat which is interesting to visualize the data in 2 dimensions. The second one, called Mixer, is much bigger and complex with stairs, elevators and slopes which is interesting to see if the GNG behave well in 3 dimensions. The results is given in figure 2 for the simple map and in figure 3 for the complex map. 5 GNG edges GNG nodes are more concentrated than the navigation points and other where they are less concentrated. We cannot tell nowifitisagoodbehaviourornotasweshouldevaluate an agent using this representation to see if it navigate well. Even in the less concentrated zones, the nodes are always close enough to be seen from one to another, so it should not be a problem. 5 GNG Nodes Navigation points position (y) -5-1 position (y) -5-1 -15-15 -2-2 -25 1 15 2 25 3 position (x) Figure 2: Result of a growing neural gas learned from a player for a simple map, top view. -25 1 15 2 25 3 position (x) Figure 4: Comparison of nodes learned by the growing neural gas with the navigation points placed manually by the game developers. z 2-2 -4-6 1 2 x 3 4-1 GNG nodes GNG edges 1 y 2 3 Figure 3: Result of a growing neural gas learned from a player for a complex map. To study the quality of the learned topology, we first choose to compare the GNG s nodes with the navigation point placed manually by the map creators. Of course, we do not want the GNG to fit exactly those points but it gives a first evaluation of the learned representation. Inourcase,wehavethosenavigationpointsbutourgoal is that they are not longer necessary for a character to move in a new environment. Figure 4 shows both the navigation points and the GNG s nodes. As we can see, the two representations look alike which indicates that the model is very effective in learning the shape of the map. However, there are zones where the GNG s nodes As the attraction applied to the nodes for each input is constant, the GNG is not converging to a fixed state. This is a wanted behaviour, allowing the GNG to adapt to a variation in the use of the map: if the demonstrator suddenly uses a part of the map which he/she has not explored yet, the GNG will be able to learn this new part even if the GNG has been learning for a long time. We do want, however, the GNG to learn quickly the topology and to keep a good representation of the world over time. To study the time evolution of the GNG s characteristics, we introduce a distance measure: the sum of the distance between each navigation point and its closest node. We also study the evolution of the number of nodes because we do not want the GNG to grow indefinitely. Figure 5 shows this two measures for the simple and the complex maps. For the simple map, the GNG reached its maximum number of node and minimum error in approximatively 5 minutes of real-time simulation. For the complex map, it takes more time, about 25 minutes, but results at 12 minutes are quite good. Those results show that it is possible to have an character that learns during the play.

Cumulated distance to navigation points 16 14 12 1 8 6 4 2 Distance to navigation points (simple map) Number of nodes (simple map) Distance to navigation points (complex map) Number of nodes (complex map) 7 6 5 4 3 Number of nodes 2 1 It is interesting to compare two learned GNG on the same demonstrator in the same environment and conditions but for 2 different simulations. The goal is to see if the two representations fit. Figure 7 shows that the resulting GNG are a bit different. The first GNG has 24 nodes and has a cumulated distance to navigation points of approximatively 33 Unreal units. The second GNG has 25 nodes and has a cumulated distance of approximatively 315 Unreal units. This proves that the GNG does not converge toward a unique solution but those solutions are quite similar in shape, number of nodes and distance to navigation points. 5 1 15 2 25 3 time (s) Figure 5: Time evolution of the cumulated distance to navigation points defined manually and the growing neural gas nodes and the growing neural gas number of nodes. 5-5 First learning Second learning The GNG can handle inputs from multiple demonstrators. Figure 6 shows the distance and number of node for a GNG trained on 1 demonstrator and for a GNG trained on 4 demonstrators. The learning with 4 demonstrators is, as expected, faster: about 3 minutes for the distance to stabilize instead of 5 minutes for 1 demonstrator. It is interesting to note that the learning is not 4 times faster but the gain is still important. Learning with multiple demonstrators seems to give a GNG with less variation during the learning. The gain have however a small drawback: the number of nodes is a little superior for multiple demonstrators. It may be due to the fact that demonstrators are scattered in the environment instead of a unique demonstrator following a path. position (y) -1-15 -2-25 1 15 2 25 3 position (x) Figure 7: Comparison of two growing neural gas which learned on the same environment, after a very long training time (more than 1 hours). Cumulated distance to navigation points 3 25 2 15 1 5 Distance to navigation points (1 professor) Number of nodes (1 professor) Distance to navigation points (4 professors) Number of nodes (4 professors) 2 4 time (s) 6 8 1 Figure 6: Time evolution of the cumulated distance to navigation points defined manually and the growing neural gas nodes and the growing neural gas number of nodes. 25 2 15 1 5 Number of nodes The last evaluation assesses the impact of the frequency at which the demonstrator s position is given to the GNG. For the previous experiments, the frequency was set to 1Hz. Figure 8 shows the differences for 1, 1 and 1 Hz. Results indicate that 1Hz give comparable results to 1Hz but it takes much longer to give a good representation. At 1Hz, the GNG reaches a stable state as fast as at 1Hz but the resulting GNG has muchmorenodesresultinginalowererror. Usingahigh frequency is therefore not useful because the number of nodes can be increased changing the MAX ERROR and ERROR DECAY parameters without using computing power. IMPROVEMENTS The main drawback of the GNG is that the only information extracted is the position of the nodes. The biggest difference between the GNG we implemented and navigation graphs coded manually is that the latter

Frequency Time Number of nodes Error 1Hz 1h3 22 38 UU 1Hz 5min 24 33 UU 1Hz 5min 39 23 UU Figure 8: Comparison of growing neural gas characteristics learned at different frequencies on a simple map (Training Day). Time, number or nodes and error are given when the growing neural gas reach a stable state. UU stands for Unreal units. give also information on the accessibility of a node from another. Edges in a GNG gives only an information on proximity but there can be a obstacle between two nodes joined by an edge. An idea could be to store the previously activated node and create an edge to the current activated node. Like the GNG edges we should make the edge age and disappear if they are too old. Whether those edges should replace the GNG edges could be an interesting experiment to set up. To share more information with the behaviour model, we can learn which kind of action is done when the character is near a node. The character, knowing its nearest node, can choose the best action to do. This process is quite similar to the process of tagging: designers often annotate navigation points with information such as jump spot or covering. Another interesting information to learn is if the demonstrator walk exactly at the node s position or if there is a big variation in the distance to the node. The nodes error give a bit of information about this variation, however with the error decay, this information is lost over time. The learning is problematic because each winner node moves so it does not represent the same area. It could be possible to update the influence radius of winner and its neighbours according to their current radius and the distance to the example. The exact formula is yet to be found. CONCLUSION Virtual environments, like for example video games, need believable characters for users to feel in the environment. To improve the characters behaviour, we decided to use a growing neural gas to learn by imitation the topology of the environment. We believe that it will make the agent use the environment in a more human-like fashion. It also removes the burden from the maps designers of placing manually the navigation graph. takes up to 25 minutes to learn a representation of the whole environment. As it is possible to learn with several demonstrators, learning can be done very quickly. The character can thus adapt quickly to changes in the use of the environment and evolve while playing. Although different runs gives different results, the representations are very similar. With this ability to learn the environment, the agent can be placed in any simulation without a priori knowledge and still be able to moveby imitating human users. As the learning is quite fast, users could perceive the evolution in the way the agent acts and thus believing it can be human. The growing neural gas gives autonomy and believability to the model. The next step is to put more information in the growing neural gas, learning which node is accessible from each node and finding the best action at each node. To see if this work really gives results we will have to test the difference in the behaviour between an agent using the navigation points and an agent using the growing neural gas. REFERENCES Bates J 1994 The Role of Emotion in Believable Agents Communications of the ACM 37(7), 122 125. Bauckhage C, Gorman B, Thurau C and Humphrys M 27 Learning Human Behavior from Analyzing Activities in Virtual Environments MMI-Interaktiv 12, 3 17. Del Bimbo A., Vicario E. 1995 Specification by-example of Virtual Agents Behavior IEEE Transactions on Visualization and Computer Graphics, Vol. 1, n. 4. Fritzke B 1995 A growing neural gas network learns topologies in Advances in Neural Information Processing Systems 7 MIT Press pp. 625 632. Gorman B and Humphrys M 27 Imitative learning of combat behaviours in first-person computer games in Proceedings of CGAMES 27, the 11th International Conference on Computer Games: AI, Animation, Mobile, Educational & Serious Games. Thurau C, Bauckhage C and Sagerer G 24 Learning human-like movement behavior for computer games in Proceedings of the 8th International Conference on the Simulation of Adaptive Behavior (SAB 4). Our first evaluations tend to show that the growing neural gas gives a good representation of the environment. The learning is fast, with one demonstrator it