c4_v2
收藏资源简介:
该数据集包含约207.6万个Connect Four(四子棋)游戏位置,其中7.61万个位置保留为测试集。数据集旨在为Connect Four模型提供丰富的监督信号,每个棋盘位置的有效走法的动作值均通过求解器计算得出。核心信号是求解器生成的negamax列表,其他目标如最优走法、威胁掩码等均可由此派生。数据生成过程采用epsilon-greedy动作选择的求解器对弈,产生了约25万局游戏的位置分布。数据集提供了多种监督目标,包括最优走法、威胁掩码、每步动作值等,可用于训练模型预测威胁掩码、最优走法等任务。需要注意的是,由于采用epsilon-greedy生成,位置分布不同于纯最优对弈或人类对弈,且排除了镜像重复位置。
This dataset contains approximately 207.6 thousand Connect Four game positions, with 76.1 thousand reserved as the test set. It aims to provide rich supervision signals for Connect Four models, where the action values of valid moves for each board position are calculated via a solver. The core signal is the negamax list generated by the solver, and other objectives such as optimal moves, threat masks, and per-step action values can be derived from it. The data generation process uses solvers with epsilon-greedy action selection to play games, yielding a position distribution from approximately 250,000 game matches. The dataset offers multiple supervision objectives including optimal moves, threat masks, and per-step action values, which can be used to train models for tasks like predicting threat masks and optimal moves. It is worth noting that due to the adoption of epsilon-greedy generation, the position distribution differs from that of purely optimal play or human play, and mirrored duplicate positions are excluded.
Parsenal/c4_v2 数据集概述
数据集基本信息
- 数据集名称: Parsenal/c4_v2
- 许可协议: Apache-2.0
- 标签: Connect4, board_game
- 下载大小: 183,716,944 字节
- 数据集总大小: 525,207,805 字节
数据规模与划分
- 总样本数: 约 2,076,145 个棋盘局面
- 训练集: 2,000,000 个样本,大小 505,934,787 字节
- 测试集: 76,145 个样本,大小 19,273,018 字节
数据特征
- state: 字符串类型,表示棋盘状态
- turn: 字符串类型,表示当前回合
- negamax: 字符串列表,表示所有合法走法的动作价值
- optimal: 字符串类型,表示最优走法
- stage: 字符串类型,表示游戏阶段
- outcome: 字符串类型,表示对局结果
- final_move: 整型,表示最终走法
- depth: 整型,表示深度
- assistant_threats: 字符串类型,表示威胁标注
数据生成方法
- 使用求解器通过 epsilon-greedy 动作选择生成对局
- 生成约 250,000 局游戏的棋盘局面分布
- 所有局面经过洗牌
- 镜像重复局面被有意排除
标注与监督信息
数据集为每个棋盘局面提供可用于多种训练目标的监督信号:
- 最优走法
- 威胁掩码
- 每个合法走法的每步动作价值
- 可从动作价值/negamax输出推导出的局面价值或相关目标信号
威胁定义
威胁标注遵循 James D. Allen, The Complete Book of Connect Four 中的定义。
最优走法平局决胜规则
当存在多个最优走法时,按以下规则选择目标走法:
- 选择最中心的最优走法
- 如果仍有平局,选择最左侧的走法
预期用途
该数据集用于训练 granite_4_in_a_row 模型,教导模型:
- 输出威胁掩码
- 预测最优走法
此外,数据集还可用于:
- 价值预测
- 动作价值预测
- 威胁 + 策略 + 价值的多任务训练
注意事项与限制
- 由于对局通过epsilon-greedy玩法生成,局面分布与纯最优玩法或人类玩法不同
- 镜像局面被排除,如需尝试对称性增强,应单独添加
致谢
用于标注和游戏生成的求解器:
- https://github.com/ChristopheSteininger/c4.git
威胁定义基于:
- James D. Allen, The Complete Book of Connect Four




