TY - JOUR
T1 - Fast, Declarative, Character Simulation Using Bottom-Up Logic Programming
AU - Horswill, Ian
AU - Hill, Samuel
N1 - Publisher Copyright:
© 2023 Copyright for this paper by its authors. The use permitted unde Creative Commons License Attribution 4.0 International (CC BY 4.0).
PY - 2023
Y1 - 2023
N2 - Declarative programming offers several advantages in terms of compactness and modularity. 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, declarative programming is often quite slow, making it inappropriate for large systems or high-frequency updates. This is partly because of its use of search algorithms, but also because of its heavy use of pointer chasing, dynamic allocation, garbage collection, and runtime type-checking. In this paper, we discuss how bottom-up execution of logic programs can be implemented without these issues. We argue that character simulation is a “sweet spot” for bottom-up logic programming, allowing character behavior to be specified in terms of declarative rules, while offering performance competitive with Python systems such as Talk of the Town. We present a language, TED, which offers very good performance and has been used both in research and in an unannounced commercial game.
AB - Declarative programming offers several advantages in terms of compactness and modularity. 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, declarative programming is often quite slow, making it inappropriate for large systems or high-frequency updates. This is partly because of its use of search algorithms, but also because of its heavy use of pointer chasing, dynamic allocation, garbage collection, and runtime type-checking. In this paper, we discuss how bottom-up execution of logic programs can be implemented without these issues. We argue that character simulation is a “sweet spot” for bottom-up logic programming, allowing character behavior to be specified in terms of declarative rules, while offering performance competitive with Python systems such as Talk of the Town. We present a language, TED, which offers very good performance and has been used both in research and in an unannounced commercial game.
KW - Social simulation
KW - declarative programming
KW - logic programming
UR - http://www.scopus.com/inward/record.url?scp=85184667330&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85184667330&partnerID=8YFLogxK
M3 - Conference article
AN - SCOPUS:85184667330
SN - 1613-0073
VL - 3626
JO - CEUR Workshop Proceedings
JF - CEUR Workshop Proceedings
T2 - 10th Experimental Artificial Intelligence in Games Workshop, EXAG 2023
Y2 - 8 October 2023
ER -