Zero K proof that a chess position contains a checkmate

  • #1
fluidistic
Gold Member
3,923
261
Hi people,
It's been years I wanted to post this question here. I would like to build a zero knowledge proof that a given chess position contains at least one checkmate. I know that anything provable admits a zero k proof. I know about https://crypto.stackexchange.com/questions/110939/zero-knowledge-proof-applied-to-a-chess-position and .
I know it's been done already (see https://github.com/risc0/risc0/tree/main/examples/chess):
This code demonstrates a minimal example of how to use the RISC Zero zkVM to make ZK proofs about chess.


The demo uses the shakmaty crate to prove that a chess position has a checkmate without revealing what that checkmate is.
But I would like to understand exactly how to do so, every single step. There are other ways to accomplish it. I think I should be able to transform the problem into a graph/map with 3 colors scheme. I.e. if I can convince the Verifier that I can color the map with 3 colors such that no 2 colors are adjacent, then the proof would be complete. The hard part I don't know how to do is to apply an algorithm to transform a given FEN (or chess position) into such a graph. For example, this position
Code:
6Q1/8/8/8/8/8/5K2/7k w - - 0 1
contains 4 ways to checkmate in 1.
 
Computer science news on Phys.org
  • #2
You need to feed the FEN into a chess engine, and get it to tell you what all of the legal moves are and what the resulting positions are.
 
  • #3
pasmith said:
You need to feed the FEN into a chess engine, and get it to tell you what all of the legal moves are and what the resulting positions are.
Not exactly. I could use shakmaty (not even a,chess engine) like risc0 does, to assert whether the FEN contains a checkmate. You don't even need to invoke the command to check all legal moves. However risc0 does more than this, for it is designed to be a real 0k setup. It's over my,head for now.
 

Similar threads

  • Math Proof Training and Practice
Replies
25
Views
2K
  • Precalculus Mathematics Homework Help
Replies
4
Views
2K
  • Math Proof Training and Practice
3
Replies
83
Views
17K
  • Linear and Abstract Algebra
Replies
1
Views
2K
  • Math Proof Training and Practice
3
Replies
77
Views
10K
  • Math Proof Training and Practice
6
Replies
175
Views
20K
  • Math Proof Training and Practice
4
Replies
105
Views
12K
  • Math Proof Training and Practice
Replies
16
Views
5K
  • Set Theory, Logic, Probability, Statistics
Replies
11
Views
3K
  • Math Proof Training and Practice
Replies
28
Views
5K
Back
Top