# Reasoning About Agent Types and the Hardest Logic Puzzle Ever

## Abstract

In this paper, we first propose a simple formal language to specify types of agents in terms of necessary conditions for their announcements. Based on this language, types of agents are treated as ‘first-class citizens’ and studied extensively in various dynamic epistemic frameworks which are suitable for reasoning about knowledge and agent types via announcements and questions. To demonstrate our approach, we discuss various versions of Smullyan’s *Knights and Knaves* puzzles, including the *Hardest Logic Puzzle Ever* (HLPE) proposed by Boolos (in Harv Rev Philos 6:62–65, 1996). In particular, we formalize HLPE and verify a classic solution to it. Moreover, we propose a spectrum of new puzzles based on HLPE by considering subjective (knowledge-based) agent types and relaxing the implicit epistemic assumptions in the original puzzle. The new puzzles are harder than the previously proposed ones in the literature, in the sense that they require deeper epistemic reasoning. Surprisingly, we also show that a version of HLPE in which the agents do not know the others’ types does not have a solution at all. Our formalism paves the way for studying these new puzzles using automatic model checking techniques.

## Keywords

Agent types Public announcement logic Questioning strategy Knight and Knaves The hardest logic puzzle ever## Notes

### Acknowledgments

The authors would like to thank Hans van Ditmarsch and Johan van Benthem for their detailed comments on earlier versions of this paper, and thank Gregory Wheeler for pointing out the literature on the HLPE, which helped to shape the development of this work. We are also grateful to two anonymous referees of this journal for their very valuable comments. Both authors are partially supported by the Major Program of National Social Science Foundation of China (NO.11&ZD088). Yanjing Wang is also supported by the MOE Project of Key Research Institute of Humanities and Social Sciences in Universities (No.12JJD720011).

## References

- Blackburn, P., de Rijke, M., & Venema, Y. (2002).
*Modal logic*. Cambridge University Press, CambridgeGoogle Scholar - Boolos, G. (1996). The hardest logic puzzle ever.
*The Harvard Review of Philosophy, 6*, 62–65.MathSciNetGoogle Scholar - Clarke, E. M., Grumberg, O., & Peled, D. A. (1999).
*Model Checking*. Cambridge, MA: The MIT Press.Google Scholar - French, T., van der, Hoek, W., Iliev, P., & Kooi, B. P. (2011). Succinctness of epistemic languages. In: T. Walsh (Ed.)
*Proceedings of the twenty-second international joint conference on artificial intelligence (IJCAI)*, pp 881–886.Google Scholar - Gerbrandy, J., & Groeneveld, W. (1997). Reasoning about information change.
*Journal of Logic, Language and Information 6*(2), 147–169.MathSciNetzbMATHCrossRefGoogle Scholar - Holliday, W., & Icard III. T. (2010). Moorean phenomena in epistemic logic. In:
*Advances in modal logic*, pp 178–199.Google Scholar - Liu, F. (2004).
*Dynamic variations: Update and revision for diverse agents*. Master’s thesis, MoL-2004-05. ILLC, University of Amsterdam.Google Scholar - Liu, F. (2009). Diversity of agents and their interaction.
*Journal of Logic,Language and Information, 18*(1), 23–53.MathSciNetzbMATHCrossRefGoogle Scholar - Lutz, C. (2006). Complexity and succinctness of public announcement logic. In: P. Stone, G. Weiss (Eds.)
*Proceedings of the fifth international joint conference on autonomous agents and multiagent systems (AAMAS ’06)*, (pp. 137–143). New York, NY: ACM.Google Scholar - Minică, S. (2011).
*Dynamic logic of questions*. PhD thesis, Universiteit van Amsterdam.Google Scholar - Plaza, J. (2007). Logics of public communications.
*Synthese, 158*(2), 165–179.MathSciNetzbMATHCrossRefGoogle Scholar - Rabern, B., & Rabern, L. (2008). A simple solution to the hardest logic puzzle ever.
*Logic and Analysis, 68*, 105–112.MathSciNetzbMATHGoogle Scholar - Smullyan, R. (1978).
*What is the name of this book*. Englewood Cliffs, NJ: Prentice-Hall.zbMATHGoogle Scholar - Uzquiano, G. (2010). How to solve the hardest logic puzzle ever in two questions.
*Logic and Analysis, 70*, 39–44.MathSciNetzbMATHGoogle Scholar - van Benthem, J., & Minică, S. (2009). Toward a dynamic logic of questions. In: X. He, J. F. Horty, E. Pacuit (Eds.),
*Proceedings of the 2nd international workshop on logic, rationality and interaction (LORI-II)*, vol. 5834, (pp. 27–41). Berlin: Springer, FoLLI-LNAI.Google Scholar - van Ditmarsch, H. (2011). The Ditmarsch tale of wonders—dynamics of lying. Manuscript.Google Scholar
- van Ditmarsch, H., & Kooi, B. (2006). The secret of my success.
*Synthese, 153*(2), 339–347MathSciNetCrossRefGoogle Scholar - van Ditmarsch,H. van der Hoek,W., & Kooi, B. (2007)
*Dynamic epistemic logic*. Berlin: Springer.Google Scholar - van Ditmarsch, H., van Eijck, J., Sietsma, F., & Wang, Y. (2011). On the logic of lying. In: J. van Eijck, R. Verbrugge (Eds.),
*Games, actions and social software*, (pp 41–72). Berlin: Springer.Google Scholar - Wang, Y. (2011a). On axiomatizations of PAL. In: H. van Ditmarsch, J. Lang,S. Ju (Eds.),
*Proceedings of the 3nd international workshop on logic, rationality and interaction (LORI-III)*, vol. 6953, pp. 314–327. Berlin: Springer, FoLLI-LNAI.Google Scholar - Wang, Y. (2011b). Reasoning about protocol change and knowledge. In: M. Banerjee, A. Seth (Eds.),
*Proceedings of the 4th Indian conference on logic and its applications (ICLA)*, vol 6521, pp. 189–203. Berlin: Springer, LNCS.Google Scholar - Wheeler, G. R., & Barahona, P. (2012). Why the hardest logic puzzle ever cannot be solved in less than three questions.
*Journal of Philosophical Logic, 41*(2), 493–503.MathSciNetzbMATHCrossRefGoogle Scholar - Wintein, S. (2011). On the behavior of true and false.
*Minds and Machines, 22*(1), 1–24.CrossRefGoogle Scholar