Fast, Declarative, Character Simulation Using Bottom-Up Logic Programming
DOI:
https://doi.org/10.1609/aiide.v20i1.31866Abstract
Logic programming and rule-based systems are often chosen for tasks such as social simulation because their use of declarative rules and predicates map well to rules of social engagement. Unfortunately, they are often quite slow, due in part to its heavy use of pointer chasing, dynamic allocation, garbage collection, and runtime type-checking, making it difficult to use for large numbers of characters or high-frequency updates. For appropriate tasks, bottom-up execution of logic programs can provide the declarativity of logic programming without its performance issues. We argue that large-scale character simulations are a “sweet spot” for bottom-up LP. We present a language, TED, that combines declarativity with excellent performance. TED can be used with any game engine supporting C#. In head-to-head comparisons TED code was 2-3 orders of magnitude faster than Prolog, 2-5 times more compact than C#, and only 25% slower than C#. It is used in both the research game Voix de la Ville and the upcoming commercial game Rise of Industry 2.Downloads
Published
2024-11-15
How to Cite
Horswill, I., & Hill, S. (2024). Fast, Declarative, Character Simulation Using Bottom-Up Logic Programming. Proceedings of the AAAI Conference on Artificial Intelligence and Interactive Digital Entertainment, 20(1), 54–64. https://doi.org/10.1609/aiide.v20i1.31866
Issue
Section
Full Technical