Abstract
This paper describes an Intelligent Virtual Environment (IVE) which incorporates Artificial Neural Networks (ANN) in the perception and reasoning of a character in this virtual environment, in order to react intelligently to some given warning signs. First, we explore different types of ANN simulated in MATLAB to understand their operation in order to choose the one that fits to our virtual environment. The environment was created with the UDK game engine and it consists of a character that moves across a working environment to identify warning signals. Later we implemented the Multi-Layer Perceptron (MLP) ANN in this environment. MLP was selected according to data obtained in several tests. This implementation was done by integrating the ANN in the state machines in the source code of the game engine to perform several operations within a controlled work environment.
You have full access to this open access chapter, Download conference paper PDF
Similar content being viewed by others
1 Introduction
Virtual Reality is a computer technology that simulates a 3-D environment representing mostly visual experiences on a screen or a stereoscopic device. When a virtual environment incorporates Artificial Intelligence (AI), it reaches a new feature resulting in an asynchronous event distribution system. This is what distinguishes it from a conventional virtual environment. Hence its high applicability [1]. According to Whiting [2], there is an interesting dilemma for animators and designers, who are constantly creating new environments to incorporate autonomous characters. Each environment requires a complex and time-intensive work to be performed by an expert programmer because their underlying models are created to solve specific problems. This makes difficult their reutilization.
Literature reports related work on virtual environments incorporating AI. Jia and Zhenjiang [3] developed the Platform “Paladin” which uses collaborative and neuro-evolutive agents. It combines the Backpropagation Neural Networks with Evolutionary Algorithms in a 2D environment. Clement et al. [4] presented an intelligent tutoring system as an IVE for training. It allows to infer the learning objectives that the student has acquired and they evaluated it in a 3D biotechnology virtual lab. Xi and Smith [5] created a virtual environment with game technology and intelligent agents to simulate human emergencies. Liu et al. [6] proposed a framework for modeling virtual humans with a high level of autonomy at the behavioral and movement levels in a virtual environment. Gilbert and Forney [7] perfected a guided by an avatar in a clothing store in a 3D virtual world of Second Life tour through virtual agents using a robust variant of Artificial Intelligence Markup Language (AIML) and applied to it the Turing test.
Following the line of the related work, this paper describes an Intelligent Virtual Environment with Artificial Neural Networks. First, we explore different types of ANN. We finally selected MLP according to the data obtained in several evaluation steps. From the experiments performed, we conclude that ANN offer a good performance with low operational costs for visual effects requiring real time results and constrained to a given number of operations per cycle (this is not the case for most of the applications or Virtual Reality).
This paper is organized as follows: the concepts of perception and reasoning are discussed and the 3D virtual environment created is displayed in Sect. 2; in Sect. 3, we explain the Artificial Neural Network implemented in the virtual environment; in Sect. 4 we present the experiments and results; the paper is concluded in Sect. 5.
2 Perception and Reasoning
The Intelligent Virtual Environments must reach large capacities of complex and interactive behaviors to achieve a high level of realism [8]. This realism is based on elements that enable intelligent performance such as perception, learning, and communication through natural language and reasoning. According to the above, this paper focuses only on the perception and reasoning, cognitive and behavioral levels of a Virtual Environment.
According to Marthino et al. [9], perception is considered as all events of the virtual environment that are filtered according to the interests and location of the character. It is based on two principles: (1) A limited perception, in which a character perceives all events, but only in its associated area; and (2) An inaccurate perception, in which the character perceives the virtual environment as it is, but only receives relevant events associated with it. They also describe the reasoning as a process developed by a set of production rules which are conditions based on the model of the world, in the state of the target, the characteristic behavior and internal state information.
Given the above concepts, the character implemented in the Intelligent Virtual Environment presented in this work based its reasoning on the impact of its internal target and priority of the action to perform on the cognitive and behavioral levels.
Based on the above, a model of Intelligent Virtual Environment leaning on a game engine, which are incorporated Artificial Intelligence techniques in order to occur from a given perception with a character, a reasoning proposed proper respect to the Virtual Environment.
In this model, this can be seen as a set classifier S, which takes a set of perceptions P1…Pn and combines them to make adequate reasoning R1…Rn. This reasoning to perform a certain action is supported on one of the techniques of Artificial Intelligence named in the model. So the system decides and selects an action A according to the reasoning made (Eq. 1).
With this model, we want to achieve the following characteristics of an Intelligent Virtual Environment described by [10]: Decisive: any action taken by the character will be reflected in an effective plan; Real Time: The character must respond in real time to the perceptions of the environment and in the same way, adequate reason to perception form received; Ordered: That follows the proper sequence in their behavior.
Perceptions were simulated in this virtual environment and their respective actions to perform, through reasoning with AI technique, are shown in Table 1.
In Fig. 1 is shown a rendering of the Virtual Environment. The character will be interacting in environment as disclosed in Table 1 and is to this environment that the ANN will be applied as described next.
3 Intelligent Virtual Environment with Artificial Neural Network
In this section, we present the creation of an IVE for the perception and reasoning of warning signs in a work environment. We address the time constraints and computational cost in the ANN learning. In order to do this, we simulated different types of ANN and we finally chose the one requiring the least training time, which provides. Thus, we achieve a reduction of resources and time costs. Then, we adapted it to the videogames engine.
3.1 Characterization of Different Types of RNA
In this stage, we perform an exploration of the different types of ANN and we identify the type of learning. This is a key point in the development of the ANN because it implies that a processing unit can change its input/output behavior as result of the changes in the environment. Therefore, we classify some ANN according to their type of learning (Table 2).
After knowing the types of ANN according to their learning, we simulated each one in MATLAB in order to understand their operation. This task was performed to choose the one that would fit to the perceptions and actions of the Virtual Environment. We also checked that this selected ANN could be implemented within the game engine. Two networks were chosen: The Radial Basis Function (RBF), and the Multi-Layer Perceptron (MLP). After making comparisons between these two networks measurements by square error, we selected the MLP due to the lower number of neurons used in the hidden layer and the error which was lower than for the RBF.
3.2 Multi-Layer Perceptron ANN (MLP)
MLP is the first ANN topology used. We present the training algorithm for a hidden layer in Fig. 2, which is an adaption of the algorithm in [11].
An MLP ANN was used with a 4-10-4 configuration (4 input neurons, 10 hidden and 4 output). We also used 80% of tickets available for training, 10% for validation and the other 10% for testing, to verify that the results given by the ANN were satisfactory if reserved; this is what is defined as the process of overfitting (Training, Validation, Testing). The confusion matrix resulting in this process showed 99.2% of correct classifications.
Figure 3, shows the point where the square error of these two variables matches. It can be found at the beginning of the network and it adapts progressively to the learning set, thus adapting itself to the problem.
This training provided satisfactory results due to the right grouping of the input data, according to the visual problem type.
3.3 Radial Basis Function ANN (RBF)
RBF is a network with Gaussian activation functions. The training algorithm for this network is an adaption of the algorithm in [11] and it is presented in Fig. 4.
This ANN has hybrid learning. Therefore, data is entered for the input and hidden layers. We used 40 neurons in the input and hidden layer, and we used Gaussian activation function.
4 Experiments and Results
We compared the results obtained from the implementation of the two different ANN topologies, MLP and RBF. This comparison was performed according to features such as the accurate classification percent, required training time and network size (Table 3).
Once the results of the simulations of MLP and RBF were obtained and analyzed, it can be observed that MLP is closer to the expected results during the performed evaluation. RBF is discarded also due to its complexity in processing and implementation whiting the game engine that we used.
Besides being recognized due to its proximity in the actions to be performed, MLP is known by its quick classification of datasets. This is a desirable property in order to satisfy the constraints of the Virtual Environment to achieve the real time feature.
Later, we implemented the MLP in the state machines integrated within the source code of the game engine. The idea was to perform several operations withing a controlled work environment. The scenario describes some offices where several warning signals occur. When the result of the RNA is 1, some if the previously described signals (perceptions) is present (Fig. 5). Therefore, some action needs to be performed to address this situation (Fig. 6).
We used some qualitative and quantitative metrics [12] and some concepts suggested by [13] for the IVE performance evaluation. For the qualitative evaluation, we used the following metrics: interactivity, connectivity, adaptability and sensitivity to the context. For the quantitative evaluation, the metrics were latency and scalability.
4.1 Qualitative Evaluation
Next, we present the explanation of the qualitative metrics that we selected and adapted for the evaluation of the implemented ANN
Interactivity
This feature is related to the reduction of explicit interaction given that the system uses its intelligence, to infer from the observed the situations and needs of the character.
The interactivity in the ANN is high. The way how the calculations are arranged cause that the RNA has a high level of interactivity because when it perceives a given state in the environment, it performs immediately the relevant operations without variations in the graphical section, thus providing confidence in the performed operation.
Connectivity
This feature focuses on finding the freedom given to the character so that it can choose what type of information it wants, when it desires it and where it desires it.
Connectivity in the ANN is High. Calculations arranged within the technique are performed efficiently, at a high rate of perception.
Adaptability
This features refers to the adaptable nature of the environments. This features is mainly related to how people interacts among them in a given environment.
Adaptability in the ANN is high. Due to the way how this technique was implemented in the environment, it can be seen how it can learn to perform and adapt to it in a fast and agile way.
Sensitivity to the Context
A system is context-sensitive if it uses the context to provide relevant information or services to the user. Relevance depends on the task that the user performs.
The Sensitivity to the Context in ANN is High. The way in which perceptions are effectively identified and what decision to make in a given case makes this technique highly sensitive because it knows where it is and what it should do in specific cases.
4.2 Quantitative Evaluation
Next, we present the explanation of each one of the quantitative metrics that we selected and adapted for the evaluation of the ANN
Latency or Environment Response Time
This metric is defined as the time that takes to the environment to perform one or more tasks oriented to achieve the adaption of the character present in the environment.
The measurements in this metric were taking considering the time that takes to perform all the assigned operations (real-time execution) in a render engine with a determined number of iterations for each frame drawn on the screen. That is, if the character requests to recalculate the current technique, this is performed integrally within a single frame.
The render engines aim to reach 60 frames in one second. Each frame has a presence in screen of approximately 0.016 s (1 s/60 frames = 0.016), this the operation must be performed in a way that does not affect the frame rate per second. To demonstrate the measures of frames per second, the samples are taken while the application is running, through one of the UDK commands and it displays the data of frames per seconds and milliseconds in real time, according to the machine in the which is running.
In order to evaluate the latency, we took some samples. The ANN was run 10 times and we took samples to show how many repetitions are required to move to the next action. As few iterations required, the application is more optimized.
The ANN achieved low response time. This shows high similarity when compared to human learning. Every time the character has a perception, it must compare the initial results against the actions to be taken. If these actions are wrong, the it must recalculate the previously generated curve.
It can be seen from the sample that it does not affect the performance in frames per second. Thus, it can be said that every time a recalculation is performed, it takes between 16 and 19 ms to be performed.
In Table 4, we show a summary of the time taken to reason in each perception in order to take the appropriate action.
Scalability
Scalability determines how IVE performance varies when the number of tasks to be performed increases. Its measurement is based on determining in what proportion the latency time is altered. For its measurement, Eq. 2 is defined (Eq. 2).
where, \( l_{max} \) and \( l_{min} \) are the maximum and minimum values of latency respectively and \( n_{total} \) is the total number of tasks. Scalability is associated with one of the following qualitative values:
-
Good Scalability: When the Eq. 3 is satisfied (Eq. 3).
$$ \Delta E_{s} = \frac{{E_{s} current - E_{s} previous}}{{E_{s} previous}} < 0.5 $$(3) -
Deficient Scalability: When the Eq. 4 is satisfied (Eq. 4).
$$ \Delta E_{s} = \frac{{E_{s} current - E_{s} previous}}{{E_{s} previous}} > 0.5 $$(4)Where \( E_{s} \) current is the scalability by increasing the number of tasks and \( E_{s} \) previous is scalability without increasing them.
For the case of ANN implemented, a good scalability was presented and given minutes/task, as can be seen in Table 5.
5 Conclusions
ANN have provided several contributions in different fields because they can perform diagnosis using patterns. This diagnosis helps to make more agile some procedures, for instance, in dynamic behaviors such as the ones present in work environments. In those fields where real time results are required and there is a given limit of number of operations by cycle (Which is the case in Virtual Reality Applications), Neural Networks provide high performance with low costs. That is to say, a very high level of learning and optimization can be obtained without sacrificing performance and without requiring very high technical specifications, which is ideal for its applicability in Virtual Reality.
References
Lozano, M.: Animación Comportamental de Personajes Inteligentes 3D basada en MINIMIN-HSP. Tesis Doctoral, Universitat de Valéncia, España (2004)
Whiting, J., Dinerstein, J., Egbert, P.K., Ventura, D.: Cognitive and behavioral model ensembles for autonomous virtual characters. Comput. Intell. 26(2), 142–159 (2010)
Jia, L., Zhenjiang, M.: Entertainment oriented intelligent virtual environment with agent and neural networks. In: IEEE International Workshop on Haptic Audio Visual Environments and their Applications, Ottawa, Canada (2007)
Clemente, J., Ramirez, J., De Antonio, A.: Applying a student modeling with non-monotonic diagnosis to intelligent virtual environment for training/instruction. Expert Syst. Appl. 41(2), 508–520 (2014). Elsevier
Xi, M., Smith, S.: Simulating cooperative fire evacuation training in a virtual environment using gaming technology. In: IEEE Virtual Reality 2014, Minneapolis, Minnesota, USA, pp. 139–140. IEEE (2014)
Liu, W., Zhou, L., Xing, W., Liu, X., Yuan, B.: Creating autonomous, perceptive and intelligent virtual humans in a real-time virtual environment. Tsinghua Sci. Technol. 16(3), 233–240 (2011)
Gilbert, R., Forney, A.: Can avatars pass the Turing test? Intelligent agent perception in a 3D virtual environment. Int. J. Hum.-Comput. Stud. 73, 30–36 (2015)
Cavazza, M., Lugrin, J.-L., Hartley, S., Renard, M., Nandi, A., Jacobson, J., Crooks, S.: Intelligent virtual environments for virtual reality art. Comput. Graph. 29(6), 852–861 (2005). Elsevier
Martinho, C., Paiva, A., Gomes, M.: Emotions for a motion: rapid development of believable panthematic agents in intelligent virtual environments. Appl. Artif. Intell. 14, 33–68 (2000)
Mang-Xian, Q., Hai-ming, Y.: Investigation and realization of multi-agent interaction behavior in intelligent virtual environment. In: International Conference on Cyberworlds. IEEE Computer Society (2008)
García, J., Carmona, E., Gallardo, L., González, M., Fernández, A., González, M.: Desarrollo de un sistema automático de discriminación del campo visual glaucomotoso basado en un clasificador neuro-fuzzy. En Rev. Scielo 77(12), 669–676 (2002). Archivos de la Sociedad Española de Oftalmología
Restrepo, S.: Modelo de Inteligencia Ambiental basado en la integración de Redes de Sensores Inalámbricas y Agentes Inteligentes. Tesis de Maestría. Universidad Nacional de Colombia - Sede Medellín (2012)
Zhang, D.: Multi-agent based control of large-scale complex systems emplying distributed dynamic inference engine. Ph.D. thesis. Georgia Institute of Technology (2010)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2017 Springer International Publishing AG
About this paper
Cite this paper
Mateus, S., Branch, J. (2017). Intelligent Virtual Environment Using Artificial Neural Networks. In: Lackey, S., Chen, J. (eds) Virtual, Augmented and Mixed Reality. VAMR 2017. Lecture Notes in Computer Science(), vol 10280. Springer, Cham. https://doi.org/10.1007/978-3-319-57987-0_4
Download citation
DOI: https://doi.org/10.1007/978-3-319-57987-0_4
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-57986-3
Online ISBN: 978-3-319-57987-0
eBook Packages: Computer ScienceComputer Science (R0)Springer Nature Proceedings Computer Science






