Datasets:
language: en
license: mit
tags:
- tic-tac-toe
- xo
- synthetic
- board-game
- classification
task_categories:
- text-classification
size_categories:
- 10K<n<100K
pretty_name: FemtoXO Dataset (Synthetic XO Games)
configs:
- config_name: default
data_files: data.jsonl
FemtoXO Dataset – Synthetic Tic‑Tac‑Toe Games
FemtoXO Dataset is a large collection of board states and moves from randomly played Tic‑Tac‑Toe games.
It was created to train the FemtoXO model, a tiny Transformer that plays as X.
Dataset Summary
Each row represents one board position where it is X’s turn to play, along with the move X made in that turn.
The dataset is entirely synthetic and was generated programmatically by simulating 10,000 full random games and recording every X‑turn state.
- Total samples: ≈ 90,000 (varies slightly due to different game lengths)
- Format: JSON Lines (
.json) - Language: not applicable (board symbols)
Data Structure
Each line is a JSON object with two fields:
| Field | Type | Description |
|---|---|---|
board |
string (length 9) | Board state: . = empty, X = player X, O = player O |
move |
integer (0–8) | The index of the cell (0‑based, row‑major) chosen by X |
Example:
{"board": "X..O.....", "move": 4}
Data Splits
The data is provided as a single file (data.json) containing all samples.
During training we typically split it into:
- Train: 90%
- Validation: 10%
Generation Process
- Start with an empty 3×3 board (all
.). - Players alternate turns (
Xfirst, thenO), each choosing a random legal move. - Before every X move, save the current board state and the chosen move.
- Game ends on a win or a draw (board full).
The complete generator script is available in the FemtoXO repository under src/train.py.
Usage
You can load the dataset directly with 🤗 Datasets:
from datasets import load_dataset
dataset = load_dataset("abdelkader-dev/XO_matches")
print(dataset['train'][0])
Known Limitations
- Random strategy: Moves are chosen uniformly, so the dataset does not contain optimal/Minimax play. A model trained on this data will learn only to avoid immediate mistakes but not to force a win/draw optimally.
- No board rotation/augmentation: All boards are in fixed orientation. You can apply data augmentation (rotations/reflections) during training to improve robustness.
Citation
If you use this dataset, please cite:
@dataset{femto-xo,
author = {Abdelkader Hazerchi},
title = {FemtoXO Dataset: Synthetic Tic‑Tac‑Toe Games},
year = {2025},
url = {https://huggingface.co/datasets/abdelkader-dev/XO_matches}
}
License
MIT – feel free to use, modify, and share.