Abstract
Challenging fields like real-time videogames constitute an ideal, reproducible and controllable ground for researching and experimenting on the new developments of incremental reasoners for Answer Set Programming (ASP). On the other hand, declarative methods show potential in cutting down development costs in commercial videogames: nonetheless, fulfilling the strict time requirements of this type of stream reasoning-like application is still an unsurpassed obstacle. Incremental reasoning techniques might help in overcoming this latter. In this work we report about the integration of an incremental ASP engine in a framework conceived for adding declarative decision-making modules in the typical videogame development workflow. Namely, the two systems are Incremental-DLV2, a recently introduced multi-shot incremental solver based on the ASP semantics, and ThinkEngine, a tool for developing declarative modules working in the context of the Unity game engine. After describing the features of both systems, we give an example showing how to program a declarative-based videogame character. We discuss how we adapted the architecture of ThinkEngine for accommodating incremental reasoning, and report about experiments showing the impact in performance after the introduction of Incremental-DLV2.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Thinkengine on github. https://github.com/DeMaCS-UNICAL/ThinkEngine
Unity 3d game engine. https://unity3d.com/unity
Unity, order of execution for event functions. https://docs.unity3d.com/Manual/ExecutionOrder.html
Black & White (2001). https://www.ea.com/games/black-and-white
Halo (2001). https://www.xbox.com/en-US/games/halo
Taxicab norm distance. In: Sammut, C., Webb, G.I. (eds.) Encyclopedia of Machine Learning and Data Mining, p. 1232. Springer, Heidelberg (2017). https://doi.org/10.1007/978-0-387-30164-8_812
van Aanholt, L., Bidarra, R.: Declarative procedural generation of architecture with semantic architectural profiles. In: CoG (2020)
Alviano, M., et al.: The ASP system DLV2. In: Balduccini, M., Janhunen, T. (eds.) LPNMR 2017. LNCS (LNAI), vol. 10377, pp. 215–221. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-61660-5_19
Angilica, D., Ianni, G., Pacenza, F.: Declarative AI design in unity using answer set programming. In: CoG, pp. 417–424. IEEE (2022)
Bartheye, O., Jacopin, E.: A real-time pddl-based planning component for video games. In: AIIDE. The AAAI Press (2009)
Beck, H., Eiter, T., Folie, C.: Ticker: a system for incremental ASP-based stream reasoning. Theory Pract. Log. Program. 17(5–6), 744–763 (2017)
Calimeri, F., et al.: ASP-Core-2 input language format. Theory Pract. Log. Program. 20(2), 294–309 (2020)
Calimeri, F., et al.: Angry-hex: an artificial player for angry birds based on declarative knowledge bases. IEEE Trans. Comput. Intell. AI Games 8(2), 128–139 (2016)
Calimeri, F., Ianni, G., Pacenza, F., Perri, S., Zangari, J.: ASP-based multi-shot reasoning via DLV2 with incremental grounding. In: PPDP, pp. 2:1–2:9. ACM (2022)
Calimeri, F., Manna, M., Mastria, E., Morelli, M.C., Perri, S., Zangari, J.: I-dlv-sr: a stream reasoning system based on I-DLV. Theory Pract. Log. Program. 21(5), 610–628 (2021)
Calimeri, F., Perri, S., Zangari, J.: Optimizing answer set computation via heuristic-based decomposition. Theory Pract. Log. Program. 19(4), 603–628 (2019)
Dodaro, C., Eiter, T., Ogris, P., Schekotihin, K.: Managing caching strategies for stream reasoning with reinforcement learning. Theory Pract. Log. Program. 20(5), 625–640 (2020)
Erdem, E., Gelfond, M., Leone, N.: Applications of answer set programming. AI Mag. 37(3), 53–68 (2016)
Gebser, M., Kaminski, R., Kaufmann, B., Schaub, T.: Multi-shot ASP solving with clingo. Theory Pract. Log. Program. 19(1), 27–82 (2019)
Genesereth, M.R., Love, N., Pell, B.: General game playing: overview of the AAAI competition. AI Mag. 26(2), 62–72 (2005)
Ianni, G., Pacenza, F., Zangari, J.: Incremental maintenance of overgrounded logic programs with tailored simplifications. Theory Pract. Log. Program. 20(5), 719–734 (2020)
Liebana, D.P., et al.: General video game AI: competition, challenges and opportunities. In: AAAI (2016)
Nilsson, N.: STRIPS planning systems. In: Artificial Intelligence: A New Synthesis, pp. 373–400 (1998)
Orkin, J.: Three states and a plan: the AI of fear. In: Game developers conference. vol. 2006, p. 4. CMP Game Group SanJose, California (2006)
Pfau, J., Smeddinck, J.D., Malaka, R.: The case for usable AI: what industry professionals make of academic AI in video games. In: CHI PLAY (Companion), pp. 330–334. ACM (2020)
Renz, J., Ge, X., Gould, S., Zhang, P.: The angry birds AI competition. AI Mag. 36(2), 85–87 (2015)
Robertson, J., Young, R.M.: The general mediation engine. In: Experimental AI in Games: Papers from the 2014 AIIDE Workshop. AAAI Technical Report WS-14-16, vol. 10, no. 3, pp. 65–66 (2014)
Robertson, J., Young, R.M.: Automated gameplay generation from declarative world representations. In: AIIDE, pp. 72–78. AAAI Press (2015)
Schaul, T.: A video game description language for model-based or interactive learning. In: CIG, pp. 1–8. IEEE (2013)
Smith, A.M., Mateas, M.: Answer set programming for procedural content generation: a design space approach. IEEE Trans. Comput. Intell. AI Games 3(3), 187–200 (2011)
Smith, A.M., Nelson, M.J., Mateas, M.: LUDOCORE: a logical game engine for modeling videogames. In: CIG, pp. 91–98. IEEE (2010)
Stanescu, M., Certický, M.: Predicting opponent’s production in real-time strategy games with answer set programming. IEEE Trans. Comput. Intell. AI Games 8(1), 89–94 (2016)
Thielscher, M.: Answer set programming for single-player games in general game playing. In: Hill, P.M., Warren, D.S. (eds.) ICLP 2009. LNCS, vol. 5649, pp. 327–341. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-02846-5_28
Acknowledgements
This work has been partially supported by the Italian MIUR Ministry and the Presidency of the Council of Ministers under the project “Declarative Reasoning over Streams” under the “PRIN” 2017 call (Project 2017M9C25L_001) and under Italian Ministry of Economic Development (MISE) under the PON project “MAP4ID - Multipurpose Analytics Platform 4 Industrial Data”, N. F/190138/01-03/X44.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Angilica, D., Ianni, G., Pacenza, F., Zangari, J. (2023). Integrating ASP-Based Incremental Reasoning in the Videogame Development Workflow (Application Paper). In: Hanus, M., Inclezan, D. (eds) Practical Aspects of Declarative Languages. PADL 2023. Lecture Notes in Computer Science, vol 13880. Springer, Cham. https://doi.org/10.1007/978-3-031-24841-2_7
Download citation
DOI: https://doi.org/10.1007/978-3-031-24841-2_7
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-24840-5
Online ISBN: 978-3-031-24841-2
eBook Packages: Computer ScienceComputer Science (R0)