AndrewThompson1233/chess_lite
Reinforcement Learning • Updated • 12 • 1
The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.
Dataset containing 706,000 chess positions evaluated by Stockfish 16.1. Built for training policy-value networks (AlphaZero / Leela Chess Zero style architectures).
Format: compressed .npz archive.
states: float32 array of shape (N, 15, 8, 8).plans: int64 array of shape (N, 3, 1) with candidate move indices (from_square * 64 + to_square).evals: float32 array of shape (N,) containing normalized position scores.import numpy as np
import torch
from torch.utils.data import Dataset
class StrategicChessDataset(Dataset):
def __init__(self, npz_path):
data = np.load(npz_path)
self.states = data["states"]
self.evals = data["evals"]
self.best_moves = data["plans"][:, 0, 0]
def __len__(self):
return len(self.states)
def __getitem__(self, idx):
state = torch.from_numpy(self.states[idx]).float()
move = torch.tensor(self.best_moves[idx], dtype=torch.long)
val = torch.tensor(self.evals[idx], dtype=torch.float32)
return state, move, val
Apache 2.0.