Datasets:
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,95 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language: en
|
| 3 |
license: mit
|
| 4 |
+
tags:
|
| 5 |
+
- tic-tac-toe
|
| 6 |
+
- xo
|
| 7 |
+
- synthetic
|
| 8 |
+
- board-game
|
| 9 |
+
- classification
|
| 10 |
+
task_categories:
|
| 11 |
+
- text-classification
|
| 12 |
+
size_categories:
|
| 13 |
+
- 10K<n<100K
|
| 14 |
+
pretty_name: "FemtoXO Dataset (Synthetic XO Games)"
|
| 15 |
+
configs:
|
| 16 |
+
- config_name: default
|
| 17 |
+
data_files: data.jsonl
|
| 18 |
---
|
| 19 |
+
|
| 20 |
+
# FemtoXO Dataset – Synthetic Tic‑Tac‑Toe Games
|
| 21 |
+
|
| 22 |
+
**FemtoXO Dataset** is a large collection of board states and moves from randomly played Tic‑Tac‑Toe games.
|
| 23 |
+
It was created to train the [FemtoXO model](https://huggingface.co/your-username/FemtoXO), a tiny Transformer that plays as **X**.
|
| 24 |
+
|
| 25 |
+
## Dataset Summary
|
| 26 |
+
|
| 27 |
+
Each row represents one board position **where it is X’s turn to play**, along with the move X made in that turn.
|
| 28 |
+
The dataset is entirely synthetic and was generated programmatically by simulating 10,000 full random games and recording every X‑turn state.
|
| 29 |
+
|
| 30 |
+
- **Total samples:** ≈ 90,000 (varies slightly due to different game lengths)
|
| 31 |
+
- **Format:** JSON Lines (`.jsonl`)
|
| 32 |
+
- **Language:** not applicable (board symbols)
|
| 33 |
+
|
| 34 |
+
## Data Structure
|
| 35 |
+
|
| 36 |
+
Each line is a JSON object with two fields:
|
| 37 |
+
|
| 38 |
+
| Field | Type | Description |
|
| 39 |
+
|---------|---------|-------------|
|
| 40 |
+
| `board` | string (length 9) | Board state: `.` = empty, `X` = player X, `O` = player O |
|
| 41 |
+
| `move` | integer (0–8) | The index of the cell (0‑based, row‑major) chosen by X |
|
| 42 |
+
|
| 43 |
+
**Example:**
|
| 44 |
+
```json
|
| 45 |
+
{"board": "X..O.....", "move": 4}
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
## Data Splits
|
| 49 |
+
|
| 50 |
+
The data is provided as a single file (`data.jsonl`) containing all samples.
|
| 51 |
+
During training we typically split it into:
|
| 52 |
+
- **Train:** 90%
|
| 53 |
+
- **Validation:** 10%
|
| 54 |
+
|
| 55 |
+
## Generation Process
|
| 56 |
+
|
| 57 |
+
1. Start with an empty 3×3 board (all `.`).
|
| 58 |
+
2. Players alternate turns (`X` first, then `O`), each choosing a random legal move.
|
| 59 |
+
3. Before every X move, save the current board state and the chosen move.
|
| 60 |
+
4. Game ends on a win or a draw (board full).
|
| 61 |
+
|
| 62 |
+
The complete generator script is available in the [FemtoXO repository](https://huggingface.co/your-username/FemtoXO) under `src/train.py`.
|
| 63 |
+
|
| 64 |
+
## Usage
|
| 65 |
+
|
| 66 |
+
You can load the dataset directly with 🤗 Datasets:
|
| 67 |
+
|
| 68 |
+
```python
|
| 69 |
+
from datasets import load_dataset
|
| 70 |
+
|
| 71 |
+
dataset = load_dataset("your-username/femto-xo")
|
| 72 |
+
print(dataset['train'][0])
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
## Known Limitations
|
| 76 |
+
|
| 77 |
+
- **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.
|
| 78 |
+
- **No board rotation/augmentation:** All boards are in fixed orientation. You can apply data augmentation (rotations/reflections) during training to improve robustness.
|
| 79 |
+
|
| 80 |
+
## Citation
|
| 81 |
+
|
| 82 |
+
If you use this dataset, please cite:
|
| 83 |
+
|
| 84 |
+
```
|
| 85 |
+
@dataset{femto-xo,
|
| 86 |
+
author = {Abdelkader Hazerchi},
|
| 87 |
+
title = {FemtoXO Dataset: Synthetic Tic‑Tac‑Toe Games},
|
| 88 |
+
year = {2025},
|
| 89 |
+
url = {https://huggingface.co/datasets/abdelkader-dev/femto-xo-dataset-json}
|
| 90 |
+
}
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
## License
|
| 94 |
+
|
| 95 |
+
MIT – feel free to use, modify, and share.
|