Skip to content

FHE.Chess ready

Compare
Choose a tag to compare
@MikeHatchi MikeHatchi released this 11 Aug 21:24
· 63 commits to main since this release

contribution to ZAMA.ai

FHE.Chess (Fully Homomorphic Encryption Chess app)
v1.0.0 (FHE ready)

  • Chess_app
  • Client-Server architecture :
    • client: local machine with Chess_app + network
    • Server: remote machine with training data and scripts, deployed models in proper client-server FHE architecture, weights, …
  • Dataset: White and Black of rating 2000 ELO
  • Normal and Quantized AI (2 models: SOURCE and TARGET)
  • 2 main modes:
    • WhiteAI (AI as white vs Human as black)
      • 3 contextual modes: clear, simfhe, deepfhe
    • White H (Human as white vs Human as black)
  • All documentation

Detailed of the 3 contextual modes:
- clear: non-encryption context. Fast inferences,
- simfhe: encrypted context thanks to simulation of FHE computations. Fast inferences,
- deepfhe: encrypted context thanks to FHE. Very slow inferences (because model complexity + hardware),
AI mainly starts its moves the same way, after several white & black moves its moves are relevant.

  • Reported bugs:

    • false positive authorized en-passant moves,
    • false positive authorized move of kings even if the targeted (aka destination) square conducts to check,
    • because of the dual chess developments: one from scratch, one from python-chess, the latter crashes the Chess app when a move is not "legal".
  • To Do:

    • migrate current architecture to future architecture (client(local): chess_app + client FHE (private keys) | server(remote): models + server FHE (public keys)),
    • resolve false positive authorized moves.
  • Job done:

    • Quantized AI (2nd model TARGET) trained on data
    • Simulation VL + FHE
    • Adding training & test metrics within documentation
    • Fixed Chess App. bugs + add outcome
    • Wrap the client-server into Docker containers (done but not necessary then deleted)
    • Detailed documentation + add quantized, sim. VL and FHE explanation
    • re-implement final FHE AI (aka OFHE_ZV bot) to fit with Lichess API for ranking (out of scope)