Ricochet Robots Reloaded: A Case-Study in Multi-shot ASP Solving

  • Martin Gebser
  • Roland Kaminski
  • Philipp Obermeier
  • Torsten Schaub
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9060)


Nonmonotonic reasoning is about drawing conclusions in the absence of (complete) information. Hence, whenever new information arrives, one may have to withdraw previously drawn conclusions. In fact, Answer Set Programming is nowadays regarded as the computational embodiment of nonmonotonic reasoning. However, traditional answer set solvers do not account for changing information. Rather they are designed as one-shot solvers that take a logic program and compute its stable models, basta! When new information arrives the program is extended and the solving process is started from scratch once more. Hence the dynamics giving rise to nonmonotonicity is not reflected by such solvers and left to the user. This shortcoming is addressed by multi-shot solvers that embrace the dynamicity of nonmonotonic reasoning by allowing a reactive procedure to loop on solving while acquiring changes in the problem specification.

In this paper, we provide a hands-on introduction to multi-shot solving with clingo 4 by modeling the popular board game of Ricochet Robots. Our particular focus lies on capturing the underlying turn based playing through the procedural-declarative interplay offered by the Python-ASP integration of clingo 4. From a technical perspective, we provide semantic underpinnings for multi-shot solving with clingo 4 by means of a simple stateful semantics along with operations reflecting clingo 4 functionalities.


Logic Program Stable Model Operational Semantic Partial Assignment Input Language 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Bobrow, D. (ed.): Special issue on nonmonotonic logic, vol. 13. Artificial Intelligence (1980)Google Scholar
  2. 2.
    Brewka, G.: Nonmonotonic Reasoning: From Theoretical Foundation to Efficient Computation. Dissertation, Universität Hamburg (1989), revised version appeared as: Cambridge Tracts in Theoretical Computer Science. Cambridge University Press (1990)Google Scholar
  3. 3.
    Baral, C.: Knowledge Representation, Reasoning and Declarative Problem Solving. Cambridge University Press (2003)Google Scholar
  4. 4.
    Brewka, G., Eiter, T., Truszczyński, M.: Answer set programming at a glance. Communications of the ACM 54(12), 92–103 (2011)CrossRefGoogle Scholar
  5. 5.
    Butko, N., Lehmann, K., Ramenzoni, V.: Ricochet Robots — a case study for human complex problem solving. In: Proceedings of the Annual Santa Fe Institute Summer School on Complex Systems (CSSS 2005) (2005)Google Scholar
  6. 6.
    Engels, B., Kamphans, T.: On the complexity of Randolph’s robot game. Research Report 005, Institut für Informatik, Universität Bonn (2005)Google Scholar
  7. 7.
    Engels, B., Kamphans, T.: Randolph’s robot game is NP-hard? Electronic Notes in Discrete Mathematics 25, 49–53 (2006)MathSciNetCrossRefMATHGoogle Scholar
  8. 8.
    Engels, B., Kamphans, T.: Randolph’s robot game is NP-complete? In: Proceedings of the Twenty-second European Workshop on Computational Geometry (EWCG 2006), pp. 157–160 (2006)Google Scholar
  9. 9.
    Gebser, M., Jost, H., Kaminski, R., Obermeier, P., Sabuncu, O., Schaub, T., Schneider, M.: Ricochet robots: A transverse ASP benchmark. In: Cabalar, P., Son, T.C. (eds.) LPNMR 2013. LNCS, vol. 8148, pp. 348–360. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  10. 10.
  11. 11.
    Gebser, M., Kaminski, R., Kaufmann, B., Schaub, T.: Clingo = ASP + control: Preliminary report. In: Leuschel, M., Schrijvers, T. (eds.) Technical Communications of the Thirtieth International Conference on Logic Programming (ICLP 2014). Theory and Practice of Logic Programming, Online Supplement (2014) see also arXiv:1405.3694v1 Google Scholar
  12. 12.
    Gebser, M., Kaminski, R., Kaufmann, B., Schaub, T.: Clingo = ASP + control: Extended report (2014),
  13. 13.
    Eén, N., Sörensson, N.: Temporal induction by incremental SAT solving. Electronic Notes in Theoretical Computer Science 89(4) (2003)Google Scholar
  14. 14.
    Gebser, M., Kaminski, R., Kaufmann, B., Ostrowski, M., Schaub, T., Thiele, S.: Engineering an incremental ASP solver. In: Garcia de la Banda, M., Pontelli, E. (eds.) ICLP 2008. LNCS, vol. 5366, pp. 190–205. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  15. 15.
    Oikarinen, E., Janhunen, T.: Modular equivalence for normal logic programs. In: Brewka, G., Coradeschi, S., Perini, A., Traverso, P. (eds.) Proceedings of the Seventeenth European Conference on Artificial Intelligence (ECAI 2006), pp. 412–416. IOS Press (2006)Google Scholar
  16. 16.
    Gebser, M., Kaminski, R., König, A., Schaub, T.: Advances in gringo series 3. In: Delgrande, J.P., Faber, W. (eds.) LPNMR 2011. LNCS, vol. 6645, pp. 345–351. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  17. 17.
    Gebser, M., Kaminski, R., Kaufmann, B., Ostrowski, M., Schaub, T., Thiele, S.: A user’s guide to gringo, clasp, clingo, and iclingo. (2010)
  18. 18.
    Calimeri, F., Faber, W., Gebser, M., Ianni, G., Kaminski, R., Krennwallner, T., Leone, N., Ricca, F., Schaub, T.: ASP-Core-2: Input language format (2012),

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  • Martin Gebser
    • 1
    • 2
  • Roland Kaminski
    • 2
  • Philipp Obermeier
    • 2
  • Torsten Schaub
    • 2
    • 3
  1. 1.Aalto UniversityFinland
  2. 2.University of PotsdamGermany
  3. 3.Inria RennesFrance

Personalised recommendations