granite-4-in-a-row

Training Format

This model is trained on Connect Four positions represented as a fixed-width token sequence.

Each training example contains:

  • a board state
  • a tactical overlay for player
  • a tactical overlay for opponent
  • the optimal next move

The board is encoded as a sequence of 42 cells (6 rows × 7 columns), read row-by-row from the top row to the bottom row and left-to-right within each row).

Cell values use:

  • X for player one’s stones
  • O for player two’s stones
  • . for empty cells

There is no explicit token for the side to move. Instead, the side to move must be inferred from the board position and overlays.

Each overlay cell uses:

  • C for an immediate winning move
  • T for a threat
  • t for a weaker but still effective minor threat
  • . for none More info in c4_v2

The full prompt is:

  1. a beginning-of-sequence token
  2. 42 board tokens
  3. 42 player overlay tokens
  4. 42 opponent overlay tokens

This gives a 127-token prompt. The target is a single token in A-G, representing the optimal column to play. The total sequence length is always 128 tokens.

Loss is masked over the board portion of the input only, the first 43 tokens:

  • the <BOS> token
  • the 42 board tokens

Example Layout

<BOS>
[42 board cells]
[42 player tactical cells]
[42 opponent tactical cells]
[target move: A-G]

This checkpoint was tested against gpt5.4 high for a set using https://github.com/google-deepmind/game_arena/tree/main/game_arena/harness/games/connect_four You can find the logs as granite_x.json and granite_o.json

Downloads last month
15
Safetensors
Model size
0.4B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Parsenal/granite-4-in-a-row

Finetuned
(7)
this model

Dataset used to train Parsenal/granite-4-in-a-row