Abstract
We describe an executable specification and a total correctness proof of a King and Rook vs King (KRK) chess endgame strategy within the proof assistant Isabelle/HOL. This work builds upon a previous computer-assisted correctness analysis performed using the constraint solver URSA. The distinctive feature of the present machine verifiable formalization is that all central properties have been automatically proved by the SMT solver Z3 integrated into Isabelle/HOL, after being suitably expressed in linear integer arithmetic. This demonstrates that the synergy between the state-of-the-art automated and interactive theorem proving is mature enough so that very complex conjectures from various AI domains can be proved almost in a “push-button” manner, yet in a rich logical framework offered by the modern ITP systems.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Since squares that a knight attacks are not on the same line with the square that it is on, the clear line condition is always satisfied.
- 2.
This definition is weaker then the one given by FIDE, as it does not take into account reachability from the initial position. Still, this does not threaten the correctness of our results, as we do cover all legal positions in the strong FIDE sense.
- 3.
This is only implicitly stated in the FIDE chess rules, as positions are defined to be legal only if they are reachable from the starting state where both kings are present, and kings cannot be captured. In our KRK formalization, the condition that both kings are present is implicitly imposed by the position representation.
- 4.
In the chess literature, half-move is sometimes called ply, and full-move move.
- 5.
The largest SMT formula in the proof has more than 67,000 atoms. Proofs were checked in around 8 CPU minutes on a multiprocessor 1.9GHz machine with 2 GB RAM per CPU when SMT solvers are used in the oracle mode and when SMT proof reconstruction was not performed. SMT proof reconstruction is the slowest part of proof-checking, but it can be done in a quite reasonable time of 29 CPU minutes. The whole formalization has around 12,000 lines of Isabelle/Isar code.
References
Armand, M., Faure, G., Grégoire, B., Keller, C., Théry, L., Werner, B.: A modular integration of SAT/SMT solvers to coq through proof witnesses. In: Jouannaud, J.-P., Shao, Z. (eds.) CPP 2011. LNCS, vol. 7086, pp. 135–150. Springer, Heidelberg (2011)
Ballarin, C.: Interpretation of locales in isabelle: theories and proof contexts. In: Borwein, J.M., Farmer, W.M. (eds.) MKM 2006. LNCS (LNAI), vol. 4108, pp. 31–43. Springer, Heidelberg (2006)
Böhme, S., Weber, T.: Fast LCF-style proof reconstruction for Z3. In: Kaufmann, M., Paulson, L.C. (eds.) ITP 2010. LNCS, vol. 6172, pp. 179–194. Springer, Heidelberg (2010)
Bratko, I.: Proving correctness of strategies in the AL1 assertional language. Inform. Process. Lett. 7(5), 223–230 (1978)
Edelkamp, S.: Symbolic exploration in two-player games: preliminary results. In: AIPS 2002 Workshop on Planning via Model-Checking (2002)
FIDE. The FIDE Handbook, chapter E.I. The Laws of Chess (2004). Available for download from the FIDE website
Hurd, J.: Formal verification of chess endgame databases. In: Theorem Proving in Higher Order Logics: Emerging Trends, Oxford University CLR Report (2005)
Hurd, J., Haworth, G.: Data assurance in opaque computations. In: van den Herik, H.J., Spronck, P. (eds.) ACG 2009. LNCS, vol. 6048, pp. 221–231. Springer, Heidelberg (2010)
Janičić, P.: URSA: a system for uniform reduction to SAT. Logical Methods Comput. Sci. 8(3:30) (2012)
Maliković, M., Janičić, P.: Proving correctness of a KRK chess endgame strategy by SAT-based constraint solving. ICGA J. 36(2), 81–99 (2013)
Maliković, M., Čubrilo, M.: What were the last moves? Int. Rev. Comput. Softw. 5(1), 59–70 (2010)
Maliković, M., Čubrilo, M., Janičić, P.: Formalization of a strategy for the KRK chess endgame. In: Conference on Information and Intelligent Systems (2012)
Thompson, K.: Retrograde analysis of certain endgames. ICCA J. 9(3), 131–139 (1986)
Acknowledgments
The authors are grateful to Sascha Böhme and Jasmin Christian Blanchette for their assistance in using SMT solvers from Isabelle/HOL and to Chantal Keller for her assistance in using SMT solvers from Coq. The first and the second author were supported in part by the grant ON174021 of the Ministry of Science of Serbia.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer International Publishing Switzerland
About this paper
Cite this paper
Marić, F., Janičić, P., Maliković, M. (2015). Proving Correctness of a KRK Chess Endgame Strategy by Using Isabelle/HOL and Z3. In: Felty, A., Middeldorp, A. (eds) Automated Deduction - CADE-25. CADE 2015. Lecture Notes in Computer Science(), vol 9195. Springer, Cham. https://doi.org/10.1007/978-3-319-21401-6_17
Download citation
DOI: https://doi.org/10.1007/978-3-319-21401-6_17
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-21400-9
Online ISBN: 978-3-319-21401-6
eBook Packages: Computer ScienceComputer Science (R0)