CoolFace
Modelpublic

mateuszgrzyb/searchless-chess-vit-small

sourceHugging Facemitupdated 7mo agoView on Hugging Face
0likes13downloads
Model Card

♟️ Searchless Chess: ViT-Small (1817 ELO)

This is the high-efficiency model of the Searchless Chess project—a compact neural network that plays chess at a strong club level (~1817 ELO) relying purely on neural intuition, without any search algorithms (no minimax, no alpha-beta pruning).

  • —Architecture: Vision Transformer (ViT)
  • —Parameters: 2.64M
  • —Estimated ELO: 1817
  • —Training Data: 316M positions from Lichess/Stockfish

📊 Performance Metrics

MetricValue
ELO (Estimated)1817
Tier 4 Puzzles (1000-1250)82% Accuracy
Tier 6 Puzzles (1500-1750)68% Accuracy
Tier 8 Puzzles (2000-2250)34% Accuracy

🎯 Why this model?

Despite having only 2.64M parameters, this model outperforms the ResNet-XL (24.7M parameters), proving that Vision Transformers are 10x more parameter-efficient for chess. It achieves an impressive 688 ELO per million parameters, making it the most optimized model in the series.

🚀 Quick Start & Usage

This repository provides everything needed to run or fine-tune the model:

  • —model.keras: Complete model (architecture + weights) in Keras 3 format.
  • —model.weights.h5: Standalone weights.
  • —config.json: Model architecture configuration.

Which file to use?

  • —Use `model.keras` for a quick "plug-and-play" experience, as it contains both the model architecture and the trained weights in one file.
  • —Use `config.json` and `model.weights.h5` if you prefer to build the model structure manually in your code and load only the parameters (e.g., for custom fine-tuning).

Using the model in Python

To use this model for playing chess, use the ChessAI wrapper provided in the official GitHub repository. It handles the FEN-to-Tensor encoding and move selection logic.

python
# 1. Clone the repository: git clone https://github.com/mateuszgrzyb-pl/searchless-chess
# 2. Use the following code:

import chess
from src.chess_ai.core.model import ChessAI

# Load the chess engine (provide path to the downloaded model.keras)
chess_bot = ChessAI('path/to/vit-small/model.keras')

# Create a chess board
board = chess.Board()

# Play a game
board.push_san("e4")  # Your move
engine_move = chess_bot.make_move(board)  # Engine responds via neural intuition
board.push(engine_move)

print(board)
print(f"Engine played: {engine_move}")

For detailed instructions on board encoding, training, and evaluation, visit the Searchless Chess GitHub.

🔬 Model Architecture

The model treats the chess board as a set of tokens. Unlike traditional CNNs that look at local patterns, the Vision Transformer uses self-attention to understand the global relationship between all pieces simultaneously (e.g., a bishop's long-range pressure on a king).

  • —Patch Size: 1x1 (each square is a token)
  • —Embedding Dim: 256
  • —Num of Heads: 4
  • —Transformer Layers: 5

📂 Dataset

The model was trained on the [Lichess Stockfish Normalized](https://huggingface.co/datasets/mateuszgrzyb/lichess-stockfish-normalized) dataset, consisting of 316M deduplicated positions with evaluations.

📜 Citation

If you use this model in your research, please cite:

bibtex
@software{grzyb2025searchless,
  author = {Grzyb, Mateusz},
  title = {Searchless Chess: Master-Level Chess Through Pure Neural Intuition},
  year = {2025},
  publisher = {Hugging Face},
  url = {https://huggingface.co/mateuszgrzyb/searchless-chess-vit-small}
}

📧 Contact