Qwen3-0.6B 路 tic-tac-toe (MAIN Lab, Benchmark #006)

Benchmark #006

Qwen3-0.6B, fully fine-tuned to play perfect tic-tac-toe. The teacher was an exact minimax solver. Trained by Claude Code.

Checked against every possible opponent line, as X and as O: 0 losses (619 lines).

Use

Plain completion, no chat template. The answer is one digit (the square).

from transformers import AutoTokenizer, AutoModelForCausalLM
tok = AutoTokenizer.from_pretrained("MAIN-Lab/qwen3-0.6b-tictactoe")
model = AutoModelForCausalLM.from_pretrained("MAIN-Lab/qwen3-0.6b-tictactoe")
prompt = "Tic-tac-toe. You play O. Pick the best square (1-9).\nX 2 3\n4 O 6\n7 8 X\nBest move: "
ids = tok(prompt, return_tensors="pt", add_special_tokens=False).input_ids
print(tok.decode(model.generate(ids, max_new_tokens=1)[0, -1:]))   # an edge: 2, 4, 6 or 8

Empty squares are shown by their number. "You play X/O" names the side to move.

Results (same prompt and code for every model)

Test Qwen3-0.6B before Gemma 3 270M SmolLM3-3B This model
Best move, all 4,520 boards 58.9% 57.8% 57.3% 100%
Best move, 719 never-seen boards* 60.6% 59.9% 58.8% 96.8%
Opponent lines lost (exhaustive) 560 / 1,023 458 / 901 603 / 1,112 0 / 619
Losses vs perfect player (1,000 games) 971 1,000 992 0
Wins vs random player (1,000 games) 56% 62% 49% 93% (0 losses)
Writes a legal square (free text) 71% 89% 11% 100%

A random player picks the best move 58% of the time. * A separate run trained without 719 boards (15% of symmetry classes, with every rotation and mirror) to test generalization. This released model trained on all boards.

Training

  • Data: all 4,520 reachable non-terminal boards. Target = the set of moves that keep the game value. Loss = 鈭抣og P(any best square), over the full vocabulary.
  • Full fine-tune, embeddings frozen, AdamW, bf16 autocast, 4 CPU cores.
  • Phase A: 3,000 steps 脳 32 without the held-out boards (~6 h). Phase B: 1,500 steps 脳 32 on all boards (3.5 h). It stopped once every board was answered correctly twice in a row.

Limits

Tic-tac-toe is tiny and fully solved, so the model could see every board. This shows a small model can absorb a perfect teacher exactly. It says nothing about games too big to enumerate.

Code: tictac/ in the MAIN Lab repo. License: Apache-2.0 (same as Qwen3-0.6B).

Downloads last month
17
Safetensors
Model size
0.8B params
Tensor type
BF16
路
Inference Providers NEW
This model isn't deployed by any Inference Provider. 馃檵 Ask for provider support

Model tree for MAIN-Lab/qwen3-0.6b-tictactoe

Finetuned
Qwen/Qwen3-0.6B
Finetuned
(1,520)
this model

Space using MAIN-Lab/qwen3-0.6b-tictactoe 1