Aplib: Tactical Agents for Testing Computer Games | SpringerLink
Skip to main content

Aplib: Tactical Agents for Testing Computer Games

  • Conference paper
  • First Online:
Engineering Multi-Agent Systems (EMAS 2020)

Abstract

Modern interactive software, such as computer games, employ complex user interfaces. Although these user interfaces make the games attractive and powerful, unfortunately they also make them extremely difficult to test. Not only do we have to deal with their functional complexity, but also the fine grained interactivity of their user interface blows up their interaction space, so that traditional automated testing techniques have trouble handling it. An agent-based testing approach offers an alternative solution: agents’ goal driven planning, adaptivity, and reasoning ability can provide an extra edge towards effective navigation in complex interaction space. This paper presents aplib, a Java library for programming intelligent test agents, featuring novel tactical programming as an abstract way to exert control over agents’ underlying reasoning-based behavior. This type of control is suitable for programming testing tasks. Aplib is implemented in such a way to provide the fluency of a Domain Specific Language (DSL). Its embedded DSL approach also means that aplib programmers will get al.l the advantages that Java programmers get: rich language features and a whole array of development tools .

This work is supported by European Union’s Horizon 2020 research and innovation programme under grant agreement No 856716 Project iv4XR (Intelligent Verification/Validation for Extended Reality Based Systems).

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

Access this chapter

Subscribe and save

Springer+ Basic
¥17,985 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
JPY 3498
Price includes VAT (Japan)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
JPY 5719
Price includes VAT (Japan)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
JPY 7149
Price includes VAT (Japan)
  • 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

Similar content being viewed by others

Notes

  1. 1.

    “Agent Programming Library”, https://iv4xr-project.github.io/aplib/.

  2. 2.

    https://github.com/iv4xr-project/labrecruits.

  3. 3.

    Note that \(\mathbf{action}\), \(\mathbf{do}_2\), and \(\mathbf{on}\_\) are not Java keywords. They are just methods. However, they also implement the Fluent Interface design pattern [19] commonly used in embedded Domain Specific Languages (DSLs) to ‘trick’ the syntax restriction of the host language to allow methods to be called in a sequence as if they form a sentence to improve the DSL’s fluency.

  4. 4.

    This scheme of using r essentially simulates unification a la pgrules in 2APL. Unification plays an important role in 2APL. The action in (4) corresponds to pgrule \(q(r)? \; | \; f(r)\) The parameter s (the agent’s state/belief) is kept implicit in pgrules. In 2APL this action is executed through Prolog, where q is a Prolog query and r is obtained through unification with the fact base representing the agent’s state.

  5. 5.

    While it is true that we can encode all control in action guards, this would not be an abstract way of programming tactical control and would ultimately result in error prone code.

  6. 6.

    Earlier, in Sect. 1, we mentioned a relation with theorem provers. LCF-family theorem provers like HOL and Isabelle also have a concept of ’tactic’, which basically is a function that constructs a proof of a given conjecture [12, 22, 40]. Since the solving proof is usually not known upfront, similar tactic combinators are used to control a search over the possible proof space. E.g. in HOL we have \(\mathsf{THEN}\), and \(\mathsf{ORLSE}\). These correspond to our \(\mathsf{SEQ}\) and \(\mathsf{FIRSTof}\). HOL’s \(\mathsf{REPEAT}\) has no direct tactical counterpart in aplib, though aplib’s deliberation cycles implicitly introduce a top-level repetition —this will be elaborated in Sect. 4.2.

  7. 7.

    Breaking off in the middle can be expressed using a combination of \(\mathbf{FIRSTof}\) and \(\mathbf{SEQ}\).

  8. 8.

    https://github.com/iv4xr-project/labrecruits.

References

  1. Alshahwan, N., Harman, M.: Automated web application testing using search based software engineering. In: 26th International Conference on Automated Software Engineering. IEEE (2011)

    Google Scholar 

  2. Alégroth, E., Feldt, R., Kolström, P.: Maintenance of automated test suites in industry: an empirical study on visual GUI testing. Inf. Softw. Technol. 73, 66–80 (2016)

    Article  Google Scholar 

  3. Ammann, P., Offutt, J.: Introduction to Software Testing. Cambridge University Press, New York (2016)

    Book  Google Scholar 

  4. Anand, S., et al.: An orchestrated survey of methodologies for automated software test case generation. J. Syst. Softw. 86(8), 1978–2001 (2013)

    Article  Google Scholar 

  5. Bai, X., Chen, B., Ma, B., Gong, Y.: Design of intelligent agents for collaborative testing of service-based systems. In: 6th International Workshop on Automation of Software Test. ACM (2011)

    Google Scholar 

  6. Bellifemine, F., Poggi, A., Rimassa, G.: JADE-a FIPA-compliant agent framework. In: Proceedings of PAAM (1999)

    Google Scholar 

  7. Bezirgiannis, N., Prasetya, I., Sakellariou, I.: Hlogo: A parallel Haskell variant of NetLogo. In: 6th International Conference on Simulation and Modeling Methodologies, Technologies and Applications (SIMULTECH). IEEE (2016)

    Google Scholar 

  8. Bordini, R.H., Hübner, J.F., Wooldridge, M.: Programming Multi-agent Systems in AgentSpeak Using Jason, vol. 8. John Wiley & Sons, Hoboken (2007)

    Book  Google Scholar 

  9. Dastani, M.: 2APL: a practical agent programming language. Auton. Agent Multi-Agent Syst. 16(3), 214–248 (2008). https://doi.org/10.1007/s10458-008-9036-y

    Article  Google Scholar 

  10. Dastani, M., Testerink, B.: Design patterns for multi-agent programming. Int. J. Agent-Oriented Softw. Eng. 5(2/3), 167–202 (2016)

    Article  Google Scholar 

  11. De Giacomo, G., Lespérance, Y., Levesque, H.J., Sardina, S.: IndiGolog: a high-level programming language for embedded reasoning agents. In: El Fallah Seghrouchni, A., Dix, J., Dastani, M., Bordini, R.H. (eds.) Multi-Agent Programming, pp. 31–72. Springer, Boston, MA (2009). https://doi.org/10.1007/978-0-387-89299-3_2

    Chapter  Google Scholar 

  12. Delahaye, D.: A tactic language for the system coq. In: Parigot, M., Voronkov, A. (eds.) LPAR 2000. LNAI, vol. 1955, pp. 85–95. Springer, Heidelberg (2000). https://doi.org/10.1007/3-540-44404-1_7

    Chapter  MATH  Google Scholar 

  13. Denti, E., Omicini, A., Calegari, R.: tuProlog: Making Prolog ubiquitous. ALP Newsletter, October 2013

    Google Scholar 

  14. Dias, J., Mascarenhas, S., Paiva, A.: FAtiMA modular: towards an agent architecture with a generic appraisal framework. In: Bosse, T., Broekens, J., Dias, J., van der Zwaan, J. (eds.) Emotion Modeling. LNCS (LNAI), vol. 8750, pp. 44–56. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-12973-0_3

    Chapter  Google Scholar 

  15. Dias Neto, A.C., Subramanyan, R., Vieira, M., Travassos, G.H.: A survey on model-based testing approaches: a systematic review. In: Proceedings of the 1st ACM International Workshop on Empirical Assessment of Software Engineering Languages and Technologies (2007)

    Google Scholar 

  16. Ernst, M.D., et al.: The daikon system for dynamic detection of likely invariants. Sci. Comput. Program. 69(1–3), 35–45 (2007)

    Article  MathSciNet  Google Scholar 

  17. Evertsz, R., Thangarajah, J., Yadav, N., Ly, T.: A framework for modelling tactical decision-making in autonomous systems. J. Syst. Softw. 110, 222–238 (2015)

    Article  Google Scholar 

  18. Fichera, L., Messina, F., Pappalardo, G., Santoro, C.: A Python framework for programming autonomous robots using a declarative approach. Sci. Comput. Program. 139, 36–55 (2017)

    Article  Google Scholar 

  19. Fowler, M., Evans, E.: Fluent interface. martinfowler.com (2005). https://martinfowler.com/bliki/FluentInterface.html

  20. Fraser, G., Arcuri, A.: EvoSuite: automatic test suite generation for object-oriented software. In: 19th ACM SIGSOFT Symposium and the 13th European Conference on Foundations of Software Engineering. ACM (2011)

    Google Scholar 

  21. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-oriented Software. Addison-Wesley, Boston (1994)

    MATH  Google Scholar 

  22. Gordon, M.J., Melham, T.F.: Introduction to HOL A Theorem Proving Environment for Higher Order Logic. Cambridge University Press, New York (1993)

    MATH  Google Scholar 

  23. Herzig, A., Lorini, E., Perrussel, L., Xiao, Z.: BDI logics for BDI architectures: old problems, new perspectives. KI-Künstliche Intelligenz 31(1), 73–83 (2017). https://doi.org/10.1007/s13218-016-0457-5

    Article  Google Scholar 

  24. Hindriks, K.V.: Programming Cognitive Agents in GOAL (2018). https://goalapl.atlassian.net/wiki/spaces/GOAL/overview

  25. Iotti, E.: An agent-oriented programming language for JADE multi-agent systems. Ph.D. thesis, Università di Parma. Dipartimento di Ingegneria e Architettura (2018)

    Google Scholar 

  26. Jennings, N., Jennings, N.R., Wooldridge, M.J.: Agent Technology: Foundations, Applications, and Markets. Springer Science & Business Media, Berlin (1998). https://doi.org/10.1007/978-3-662-03678-5

    Book  MATH  Google Scholar 

  27. Leitão, P.: Agent-based distributed manufacturing control: a state-of-the-art survey. Eng. Appl. Artifi. Intell. 22(7), 979–991 (2009)

    Article  Google Scholar 

  28. Levesque, H.J., Reiter, R., Lespérance, Y., Lin, F., Scherl, R.B.: GOLOG: a logic programming language for dynamic domains. J. Log. Program. 31(1–3), 59–83 (1997)

    Article  MathSciNet  Google Scholar 

  29. McMinn, P.: Search-based software test data generation: a survey. Softw. Test. Verif. Reliabi. 14(2), 105–156 (2004)

    Article  Google Scholar 

  30. Merabet, G.H., et al.: Applications of multi-agent systems in smart grids: a survey. In: International conference on multimedia computing and systems (ICMCS), pp. 1088–1094. IEEE (2014)

    Google Scholar 

  31. Meyer, J.J., Broersen, J., Herzig, A.: Handbook of Logics for Knowledge and Belief, chap. BDI Logics, pp. 453–498. College Publications (2015)

    Google Scholar 

  32. Meyer, J. J. C.: Agent technology. In: Wah, B.W. (ed.) Encyclopedia of Computer Science and Engineering. John Wiley & Sons (2008)

    Google Scholar 

  33. Miao, H., Chen, S., Qian, Z.: A formal open framework based on agent for testing web applications. In: International Conference on Computational Intelligence and Security (CIS). IEEE (2007)

    Google Scholar 

  34. Padgham, L., Winikoff, M.: Prometheus: a practical agent-oriented methodology. In: Agent-Oriented Methodologies. IGI Global (2005)

    Google Scholar 

  35. Paydar, S., Kahani, M.: An agent-based framework for automated testing of web-based systems. J. Softw. Eng. Appl. 4(02), 86 (2011)

    Article  Google Scholar 

  36. Qi, Y., Kung, D., Wong, E.: An agent-based testing approach for web applications. In: 29th International Computer Software and Applications Conference (COMPSAC), vol. 2. IEEE (2005)

    Google Scholar 

  37. Rafael, H., Mehdi, D., Jürgen, D., Amal, E.: Multi-Agent Programming-Languages. Platforms and Applications. Springer, Boston (2005). https://doi.org/10.1007/b137449

    Book  MATH  Google Scholar 

  38. Rao, A.S., Georgeff, M.P.: An abstract architecture for rational agents. 3rd International Conference on Principles of Knowledge Representation and Reasoning (1992)

    Google Scholar 

  39. Rodriguez, S., Gaud, N., Galland, S.: SARL: a general-purpose agent-oriented Programming language. In: International Conference on Intelligent Agent Technology. IEEE (2014)

    Google Scholar 

  40. Schmidt, D.A.: A programming notation for tactical reasoning. In: Shostak, R.E. (ed.) CADE 1984. LNCS, vol. 170, pp. 445–459. Springer, New York (1984). https://doi.org/10.1007/978-0-387-34768-4_26

    Chapter  Google Scholar 

  41. Seghrouchni, A.E.F., Dix, J., Dastani, M., Bordini, R.H.: Multi-Agent Programming: Languages Tools and Applications. Springer, Boston (2009). https://doi.org/10.1007/978-0-387-89299-3

    Book  MATH  Google Scholar 

  42. Sen, K., Agha, G.: CUTE and jCUTE: concolic unit testing and explicit path model-checking tools. In: Ball, T., Jones, R.B. (eds.) CAV 2006. LNCS, vol. 4144, pp. 419–423. Springer, Heidelberg (2006). https://doi.org/10.1007/11817963_38

    Chapter  Google Scholar 

  43. Vos, T., et al.: FITTEST: a new continuous and automated testing process for future internet applications. In: CSMR-WCRE. IEEE (2014)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to I. S. W. B. Prasetya .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Prasetya, I.S.W.B., Dastani, M., Prada, R., Vos, T.E.J., Dignum, F., Kifetew, F. (2020). Aplib: Tactical Agents for Testing Computer Games. In: Baroglio, C., Hubner, J.F., Winikoff, M. (eds) Engineering Multi-Agent Systems. EMAS 2020. Lecture Notes in Computer Science(), vol 12589. Springer, Cham. https://doi.org/10.1007/978-3-030-66534-0_2

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-66534-0_2

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-66533-3

  • Online ISBN: 978-3-030-66534-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics