c4_v2 / README.md
Parsenal's picture
Update README.md
38abb48 verified
metadata
dataset_info:
  features:
    - name: state
      dtype: string
    - name: turn
      dtype: string
    - name: negamax
      list: string
    - name: optimal
      dtype: string
    - name: stage
      dtype: string
    - name: outcome
      dtype: string
    - name: final_move
      dtype: int64
    - name: depth
      dtype: int64
    - name: assistant_threats
      dtype: string
  splits:
    - name: train
      num_bytes: 505934787
      num_examples: 2000000
    - name: test
      num_bytes: 19273018
      num_examples: 76145
  download_size: 183716944
  dataset_size: 525207805
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*
      - split: test
        path: data/test-*
license: apache-2.0
tags:
  - connect4
  - board_game

Parsenal/c4_v2

The dataset contains about 2.076M positions, with 76.1k positions reserved for the test split.

Overview

This dataset was created to provide rich supervision for Connect Four models.
For each board position, the action value of every valid move is computed using a solver:

The core signal is the solver-produced negamax list over valid moves.
Aside from threat annotations, most other targets can be derived directly from this list.

Data generation

  • Games were generated by solver play with epsilon-greedy action selection.
  • This produced a distribution of positions from roughly 250k games.
  • Positions were shuffled.
  • 76.1k positions were selected for the test split.
  • Mirror duplicates were intentionally excluded.

Labels and supervision

For each position, the dataset provides supervision that can support several training objectives:

  • Optimal move
  • Threat masks
  • Per-move action values for valid moves
  • Signals that can be reduced to position value or related targets from the action-value / negamax outputs

Threat definitions

Connect Four example position

Threat annotations follow the definitions from **James D. Allen, _The Complete Book of Connect Four_**.

Optimal move tie-breaking

When more than one move is optimal, the selected target move is chosen by the following rules:

  1. Choose the most central optimal move.
  2. If there is still a tie, choose the leftmost move.

Intended use

This dataset was used to train granite_4_in_a_row by teaching the model to:

  • output threat masks
  • predict the optimal move

However, the dataset contains much richer supervision than that setup alone. It can also be used for:

  • value prediction
  • action-value prediction
  • multi-task training over threats + policy + value

Notes and limitations

  • Because games are generated with epsilon-greedy play, the position distribution is not the same as pure optimal play or human play.
  • Mirrored positions are excluded, so to try symmetry augmentation you should add it separately.

Attribution

Solver used for annotation and game generation:

Threat definitions based on:

  • James D. Allen, The Complete Book of Connect Four