Skip to main content

Integrating ASP-Based Incremental Reasoning in the Videogame Development Workflow (Application Paper)

  • Conference paper
  • First Online:
Practical Aspects of Declarative Languages (PADL 2023)

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 64.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 84.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://github.com/DeMaCS-UNICAL/ThinkEngine-Showcase.

  2. 2.

    https://github.com/DeMaCS-UNICAL/ThinkEngine-PADL-Experiments.

References

  1. Thinkengine on github. https://github.com/DeMaCS-UNICAL/ThinkEngine

  2. Unity 3d game engine. https://unity3d.com/unity

  3. Unity, order of execution for event functions. https://docs.unity3d.com/Manual/ExecutionOrder.html

  4. Black & White (2001). https://www.ea.com/games/black-and-white

  5. Halo (2001). https://www.xbox.com/en-US/games/halo

  6. 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

  7. van Aanholt, L., Bidarra, R.: Declarative procedural generation of architecture with semantic architectural profiles. In: CoG (2020)

    Google Scholar 

  8. 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

    Chapter  Google Scholar 

  9. Angilica, D., Ianni, G., Pacenza, F.: Declarative AI design in unity using answer set programming. In: CoG, pp. 417–424. IEEE (2022)

    Google Scholar 

  10. Bartheye, O., Jacopin, E.: A real-time pddl-based planning component for video games. In: AIIDE. The AAAI Press (2009)

    Google Scholar 

  11. 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)

    Article  MathSciNet  MATH  Google Scholar 

  12. Calimeri, F., et al.: ASP-Core-2 input language format. Theory Pract. Log. Program. 20(2), 294–309 (2020)

    Article  MathSciNet  MATH  Google Scholar 

  13. 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)

    Article  Google Scholar 

  14. 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)

    Google Scholar 

  15. 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)

    Article  MathSciNet  MATH  Google Scholar 

  16. Calimeri, F., Perri, S., Zangari, J.: Optimizing answer set computation via heuristic-based decomposition. Theory Pract. Log. Program. 19(4), 603–628 (2019)

    Article  MathSciNet  MATH  Google Scholar 

  17. 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)

    Article  MathSciNet  MATH  Google Scholar 

  18. Erdem, E., Gelfond, M., Leone, N.: Applications of answer set programming. AI Mag. 37(3), 53–68 (2016)

    Google Scholar 

  19. Gebser, M., Kaminski, R., Kaufmann, B., Schaub, T.: Multi-shot ASP solving with clingo. Theory Pract. Log. Program. 19(1), 27–82 (2019)

    Article  MathSciNet  MATH  Google Scholar 

  20. Genesereth, M.R., Love, N., Pell, B.: General game playing: overview of the AAAI competition. AI Mag. 26(2), 62–72 (2005)

    Google Scholar 

  21. Ianni, G., Pacenza, F., Zangari, J.: Incremental maintenance of overgrounded logic programs with tailored simplifications. Theory Pract. Log. Program. 20(5), 719–734 (2020)

    Article  MathSciNet  MATH  Google Scholar 

  22. Liebana, D.P., et al.: General video game AI: competition, challenges and opportunities. In: AAAI (2016)

    Google Scholar 

  23. Nilsson, N.: STRIPS planning systems. In: Artificial Intelligence: A New Synthesis, pp. 373–400 (1998)

    Google Scholar 

  24. 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)

    Google Scholar 

  25. 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)

    Google Scholar 

  26. Renz, J., Ge, X., Gould, S., Zhang, P.: The angry birds AI competition. AI Mag. 36(2), 85–87 (2015)

    Google Scholar 

  27. 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)

    Google Scholar 

  28. Robertson, J., Young, R.M.: Automated gameplay generation from declarative world representations. In: AIIDE, pp. 72–78. AAAI Press (2015)

    Google Scholar 

  29. Schaul, T.: A video game description language for model-based or interactive learning. In: CIG, pp. 1–8. IEEE (2013)

    Google Scholar 

  30. 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)

    Article  Google Scholar 

  31. Smith, A.M., Nelson, M.J., Mateas, M.: LUDOCORE: a logical game engine for modeling videogames. In: CIG, pp. 91–98. IEEE (2010)

    Google Scholar 

  32. 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)

    Article  Google Scholar 

  33. 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

    Chapter  MATH  Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Denise Angilica .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics