2019 I/ITSEC

Exploring Game Industry Technological Solutions to Simulate Large-Scale Autonomous Entities within a Virtual Battlespace (Room 320B)

In support of Simulation and Training Environment (STE) goals of a virtual battlespace, we explored experimental technologies in the commercial game industry to determine the feasibility of running one million autonomous entities while maintaining performant simulation and fidelity.  In conventional software architectural methods, the number of entities represented do not exceed hundreds (or at most a few thousand) due to the expense of simulating relatively complex behaviors for each entity.  Even when using group behaviors to provide the illusion of large quantities of simulated characters, these simulations fail to provide behavioral fidelity at a higher level.  To tackle this problem, the Unity game engine was chosen to simulate this virtual battlespace, and specifically to explore the Unity-specific Entity Component System (ECS), Job System and Burst Compiler experimental technologies.  Unlike traditional methods of AI representation, the ECS uses a data-driven approach (not object-oriented one) to represent large numbers of identically-structured data.  While it is an unfamiliar departure from usual game object representation, its format enforces low-level contiguous storage of the data in memory, dramatically decreasing in-cache misses and preventing loss of data representation compared to random location storage.  This results in far quicker iteration and access through large numbers of data blocks in memory.  Also, the Unity Job System allowed for better distribution of the computational workload among multi-core processors, while the Burst Compiler improved the performance of the overall system by translating the .NET C# code into highly optimized native code.  The work has shown promising results with its current implementation allowing up to 150,000 autonomous, simple-behavior entities to be simulated while running at relatively performant standards (20-30 fps on average).  Further optimizations can still increase the number of entities, but eventually, we will consider using a distributed systems solution to simulate a million entities in this virtual battlespace.