The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
t_perf_ns: int64
t_epoch_ns: int64
t_sec: double
event: string
x: double
y: double
button: string
pressed: bool
dx: double
dy: double
key: string
session_id: null
screen_video: null
input_events: null
input_samples: null
metadata: null
-- schema metadata --
pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 1478
to
{'session_id': Value('string'), 'screen_video': Value('string'), 'input_events': Value('string'), 'input_samples': Value('string'), 'metadata': Value('string')}
because column names don't match
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 149, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 129, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 489, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2818, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2355, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2388, in _iter_arrow
pa_table = cast_table_to_features(pa_table, self.features)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2271, in cast_table_to_features
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
t_perf_ns: int64
t_epoch_ns: int64
t_sec: double
event: string
x: double
y: double
button: string
pressed: bool
dx: double
dy: double
key: string
session_id: null
screen_video: null
input_events: null
input_samples: null
metadata: null
-- schema metadata --
pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 1478
to
{'session_id': Value('string'), 'screen_video': Value('string'), 'input_events': Value('string'), 'input_samples': Value('string'), 'metadata': Value('string')}
because column names don't matchNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
- ๐ฐ Executive Summary & Scientific Motivation
- ๐ฏ Mathematical Action Space Formalization
- ๐ก๏ธ Privacy & Capture Guarantee
- ๐ฌ Dataset Architecture & Pipeline Flow
- ๐ Data Schema & Field Specifications
- ๐ Sub-Frame Temporal Synchronization Mechanics
- โ๏ธ Synthetic LLM Clickers vs. Authentic Human Gameplay
- ๐ Multi-Framework SDK Suite
- ๐ Standardized Benchmark Tasks & Split Layout
- ๐ Live Dataset Metrics
- ๐ Citation & Attribution
๐ CRUSADER KINGS III: HUMAN GAMEPLAY MULTIMODAL TELEMETRY DATASET
๐ฐ The Sovereign Grand Strategy Benchmark for Vision-Language-Action (VLA) Foundation Models & Autonomous GUI Agents
๐ฌ "Every click. Every drag. Every panicked Alt-Tab before an unexpected inheritance crisis."
๐ Table of Contents
- ๐ฐ Executive Summary & Research Vision
- ๐ฏ Mathematical Action Space Formalization
- ๐ก๏ธ Privacy & Capture Protocols
- ๐ฌ Dataset Architecture & Flow
- ๐ Schema & Data Dictionary
- ๐ Sub-Frame Temporal Synchronization Engine
- โ๏ธ Synthetic vs. Real Human Gameplay Matrix
- ๐ Multi-Framework SDK Suite (PyTorch, JAX, HuggingFace, Ray)
- ๐ Standardized Benchmark Tasks & Split Layout
- ๐ Live Dataset Metrics
- ๐ Citation & License
๐ฐ Executive Summary & Scientific Motivation
Crusader Kings III (CK3) represents the ultimate boss level for multimodal artificial intelligence. Unlike current Web-GUI or OS-desktop benchmarks (such as WebArena, Mind2Web, OSWorld) that feature simple layout hierarchies and static HTML elements, playing Crusader Kings III demands an agent that can master:
- Multi-Layered Tooltip Hierarchies: Cascading tooltips that require hovering over text triggers, holding lock keys, and navigating nested explanation popups.
- Spatial-Temporal Map Navigation: Continuous 2D map panning, smooth zooming, army movement routing, and territory micro-management.
- Complex Multi-Variable Decision Graphs: Long-horizon strategic planning, dynastic succession management, council politics, and war declaration timing under severe information density.
- High-Frequency Motor Control: Sub-millisecond cursor trajectory dynamics, hesitation intervals, drag selection, and wheel scrolling.
This dataset provides over 610+ hours of continuous, authentic human gameplay sessions, pairing 1080p 30 FPS desktop screen captures with 60 Hz uniform temporal grids & nanosecond discrete hardware event logs.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ THE MULTIMODAL LOOP โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโ Visual Observation St โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ 1080p Screen Videoโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบโ Multimodal VLA Policy โ โ
โ โ (30 FPS H.264) โ โ (ACT, Diffusion Policy, VLM) โ โ
โ โโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ โ
โ โฒ โ โ
โ โ Action Pred at โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโ Ground-Truth Action at โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ 60 Hz Telemetry โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบโ Trajectory Loss & Off-Policy โ โ
โ โ & Event Streams โ โ Reinforcement Learning โ โ
โ โโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ฏ Mathematical Action Space Formalization
We formulate the gameplay telemetry as a Partially Observable Markov Decision Process (POMDP) defined by the tuple $\mathcal{M} = (\mathcal{S}, \mathcal{A}, \mathcal{P}, \mathcal{R}, \gamma, \Omega, \mathcal{O})$.
1. State Observation $\mathcal{O}_t$
At discrete timestep $t$, the observation consists of a high-definition RGB screen frame:
2. Action Vector $\mathbf{a}_t$
The continuous-discrete hybrid action vector $\mathbf{a}_t \in \mathcal{A}$ at 60 Hz sampling rate is defined as:
Where:
- $(x_t, y_t) \in [0, 1920] \times [0, 1080] \subset \mathbb{R}^2$ represents normalized/absolute cursor coordinates.
- $b_{\text{left}}, b_{\text{right}}, b_{\text{middle}} \in {0, 1}$ represent binary mouse button states.
- $\Delta x_{\text{scroll}}, \Delta y_{\text{scroll}} \in \mathbb{Z}$ represent scroll wheel delta values.
- $\mathbf{k}_t \in {0, 1}^{K}$ represents a multi-hot binary vector over $K=104$ keyboard keys.
๐ก๏ธ Privacy & Capture Guarantee
Zero Background Telemetry & Strict Application Isolation All data was collected via a custom recorder (CK3 Auto Dataset Recorder). The input listener utilizes low-level OS hooks configured to log events EXCLUSIVELY while
ck3.exeis the active, focused foreground window.
- A 1.0-second focus grace period ensures that any accidental window tab-outs immediately halt event capturing.
- No private DMs, personal web browsing, or background keypresses are ever recorded.
๐ฌ Dataset Architecture & Pipeline Flow
Every gameplay session is archived in a self-contained, timestamped directory: ck3_YYYYMMDD_HHMMSS/.
Ethosoft/ck3-gameplay-mouse-keyboard-dataset/
โโโ README.md
โโโ .gitattributes
โโโ UPLOAD_MANIFEST_CK3.txt
โโโ ck3_20260602_210003/
โโโ screen.mp4 # 30 FPS H.264 desktop screen capture (gdigrab)
โโโ input_events.csv # Raw discrete event stream (move, click, scroll, key down/up)
โโโ input_samples.csv # Uniform 60 Hz temporal grid of cursor & key states
โโโ metadata.json # Session Rosetta Stone (sync formulas, hardware, encoder log)
โโโ ffmpeg.log # Raw FFmpeg encoder log for full reproducibility
๐ Data Capture Sequence (Mermaid Diagram)
sequenceDiagram
autonumber
participant Human as ๐ฎ Human Player
participant OS as ๐ป OS Window Manager
participant Listener as ๐ฐ๏ธ Input Event Listener
participant FFmpeg as ๐ฅ FFmpeg Video Recorder
participant Sync as โฑ๏ธ Sub-Frame Sync Engine
participant HF as ๐ค Hugging Face Hub
Human->>OS: Interacts with Crusader Kings III
OS->>Listener: Dispatches Low-Level Mouse/Keyboard Events
alt CK3 is Active Foreground Window
Listener->>Sync: Log Timestamped Raw Event (t_perf_ns, t_epoch_ns)
Sync->>Sync: Resample to 60 Hz Uniform Grid
else CK3 Lost Focus (>1.0s Grace)
Listener->>Listener: Mute Recording (Privacy Shield)
end
FFmpeg->>Sync: Write 1080p 30FPS H.264 Video Stream
Sync->>HF: Commit Aligned Directory (screen.mp4 + input_*.csv + metadata.json)
๐ Data Schema & Field Specifications
๐ Click to expand metadata.json Rosetta Stone Specification
The metadata.json file serves as the single source of truth for temporal anchoring, process verification, and hardware encoder settings.
{
"app": "CK3 Auto Dataset Recorder",
"session_id": "20260602_210003",
"created_utc": "2026-06-02T18:00:04.251968+00:00",
"game_process": {
"pid": 14492,
"name": "ck3.exe",
"exe": "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Crusader Kings III\\binaries\\ck3.exe"
},
"video": {
"path": "C:\\CK3Recorder\\datasets\\ck3_20260602_210003\\screen.mp4",
"fps": 30,
"ffmpeg_popen_perf_ns": 28668031260300,
"ffmpeg_popen_sec_from_t0": 0.0237803
},
"input": {
"events_csv": "C:\\CK3Recorder\\datasets\\ck3_20260602_210003\\input_events.csv",
"samples_csv": "C:\\CK3Recorder\\datasets\\ck3_20260602_210003\\input_samples.csv",
"sample_hz": 60,
"contains": ["mouse_move", "mouse_click", "mouse_scroll", "key_press", "key_release"]
},
"privacy": {
"record_only_when_ck3_foreground": true,
"foreground_lost_grace_sec": 1.0
},
"sync": {
"t0_perf_ns": 28668007480000,
"t0_epoch_ns": 1780423203740019200,
"video_time_sec_formula": "video_time_sec ~= input_t_sec - ffmpeg_popen_sec_from_t0"
}
}
๐ Click to expand input_events.csv Discrete Event Schema
Captures raw hardware events as they occur with dual-clock nanosecond timestamps.
| Column | Type | Description | Example Values |
|---|---|---|---|
t_perf_ns |
int64 |
High-resolution performance counter timestamp (nanoseconds). | 28668020748900 |
t_epoch_ns |
int64 |
UTC Epoch timestamp (nanoseconds). | 1780423203753234800 |
t_sec |
float64 |
Relative time in seconds since session start ($t_0$). | 0.0132689 |
event |
string |
Discrete event type. | mouse_move, mouse_click, mouse_scroll, key_press, key_release |
x |
int32 |
Cursor X pixel coordinate ($0 \le x \le 1920$). | 1378 |
y |
int32 |
Cursor Y pixel coordinate ($0 \le y \le 1080$). | 911 |
button |
string |
Mouse button indicator. | Button.left, Button.right, Button.middle |
pressed |
boolean |
State of button or key. | True, False |
dx, dy |
int32 |
Scroll wheel movement deltas. | 0, 1 or 0, -1 |
key |
string |
Pressed/released key identifier. | 'Key.space', 'Key.shift', 'a' |
๐ Click to expand input_samples.csv Uniform 60 Hz Resampled Schema
Resampled on a clean 60 Hz temporal grid ($\Delta t \approx 16.66$ ms). Ideal for fixed-time-step ML models without variable sample rate handling.
| Column | Type | Description | Example Values |
|---|---|---|---|
t_perf_ns |
int64 |
Performance counter timestamp for the 60 Hz frame. | 28668019447900 |
t_epoch_ns |
int64 |
UTC Epoch timestamp for the 60 Hz frame. | 1780423203752236000 |
t_sec |
float64 |
Elapsed time in seconds. | 0.0119679 |
x |
int32 |
Instantaneous cursor X coordinate. | 1379 |
y |
int32 |
Instantaneous cursor Y coordinate. | 928 |
left |
boolean |
State of Left Mouse Button. | True / False |
right |
boolean |
State of Right Mouse Button. | True / False |
middle |
boolean |
State of Middle Mouse Button. | True / False |
pressed_keys |
string |
Delimited string of currently held keys. | `'Key.shift |
๐ Sub-Frame Temporal Synchronization Mechanics
To achieve exact alignment between screen pixels in screen.mp4 and user inputs in input_samples.csv or input_events.csv, use the sub-frame sync equation:
Where:
- $t_{\text{input_sec}}$ is the
t_seccolumn in the CSV files. - $\text{ffmpeg_popen_sec_from_t0}$ is extracted from
metadata.json["video"]["ffmpeg_popen_sec_from_t0"]. - Frame index $N$ in
screen.mp4corresponds to:
Input Event Timestamp (t_sec = 1.054s)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบ
โ Offset Correction (-0.023s)
โผ
Video Relative Time (t_video = 1.031s)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบ
โ FPS Multiply (30 FPS)
โผ
Target Frame Index (Frame N = 30) โโโบ [ Extract Frame from screen.mp4 ]
โ๏ธ Synthetic LLM Clickers vs. Authentic Human Gameplay
| Dimension | Synthetic LLM / Rule-Based Clickers | CK3 Human Gameplay Dataset (This Work) |
|---|---|---|
| Cursor Pathing | Teleportation / Rigid Linear Vectors | Natural Fitts' Law Curvature, Acceleration & Micro-Tremors |
| Decision Speed | Fixed Artificial Delay | Dynamic Human Hesitation (10ms reaction to 5s strategic pauses) |
| Error & Correction | Perfect execution or total failure | Realistic Human Misclicks, Menu Dragging & Self-Correction |
| UI Traversal | Direct coordinate hits | Exploratory Hovering & Tooltip Hierarchy Traversal |
| Dataset Scale | Small / Synthetic (~10-50 trajectories) | 617 Sessions (~610+ hours, ~200+ GB) |
๐ Multi-Framework SDK Suite
1. PyTorch & PyTorch Lightning DataModule
import os
import json
import cv2
import pandas as pd
import torch
from torch.utils.data import Dataset, DataLoader
class CK3MultimodalDataset(Dataset):
"""
PyTorch Dataset loader for CK3 Gameplay Video + 60Hz Action Alignment.
"""
def __init__(self, session_dir, transform=None):
self.session_dir = session_dir
self.transform = transform
with open(os.path.join(session_dir, "metadata.json"), "r") as f:
self.meta = json.load(f)
self.offset = self.meta["video"]["ffmpeg_popen_sec_from_t0"]
self.samples = pd.read_csv(os.path.join(session_dir, "input_samples.csv"))
self.cap = cv2.VideoCapture(os.path.join(session_dir, "screen.mp4"))
self.fps = self.meta["video"]["fps"]
def __len__(self):
return len(self.samples)
def __getitem__(self, idx):
row = self.samples.iloc[idx]
t_video = row["t_sec"] - self.offset
frame_idx = max(0, int(t_video * self.fps))
self.cap.set(cv2.CAP_PROP_POS_FRAMES, frame_idx)
ret, frame = self.cap.read()
if not ret:
frame = torch.zeros((3, 1080, 1920), dtype=torch.uint8)
else:
frame = torch.from_numpy(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)).permute(2, 0, 1)
action = {
"cursor": torch.tensor([row["x"] / 1920.0, row["y"] / 1080.0], dtype=torch.float32),
"buttons": torch.tensor([row["left"], row["right"], row["middle"]], dtype=torch.float32)
}
return frame, action
2. JAX / Flax Data Loading Pipeline
import jax
import jax.numpy as jnp
import numpy as np
def jax_collate_fn(batch):
frames, actions = zip(*batch)
frames_np = np.stack([f.numpy() for f in frames])
cursors_np = np.stack([a["cursor"].numpy() for a in actions])
return {
"image": jnp.array(frames_np),
"cursor_target": jnp.array(cursors_np)
}
3. Spatial Cursor Heatmap EDA Script (Matplotlib / Seaborn)
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
def generate_cursor_heatmap(csv_path, output_png="heatmap.png"):
df = pd.read_csv(csv_path)
plt.figure(figsize=(16, 9), dpi=100)
sns.kdeplot(
x=df['x'], y=df['y'],
cmap="rocket", fill=True, thresh=0, levels=100
)
plt.xlim(0, 1920)
plt.ylim(1080, 0) # Invert Y for screen coordinates
plt.title("Crusader Kings III - Spatial Cursor Density Heatmap")
plt.axis("off")
plt.tight_layout()
plt.savefig(output_png)
print(f"๐ฅ Heatmap saved to {output_png}")
# generate_cursor_heatmap("input_samples.csv")
๐ Standardized Benchmark Tasks & Split Layout
We define four standardized benchmark tasks for evaluating vision-language-action agents on CK3:
- Task A: Next-Frame Cursor Trajectory Prediction ($L_2$ Pixel Error):
- Predict $(x_{t+1}, y_{t+1})$ given image frame $O_t$ and historical context.
- Task B: Mouse Button Click Classification (F1-Score):
- Predict whether left, right, or middle mouse button will be triggered.
- Task C: Keyboard Shortcut Intent Recognition:
- Predict spacebar pause/unpause or map mode hotkey activations.
- Task D: Action Chunking Horizon Prediction (ACT / Diffusion):
- Predict a sequence of $K=16$ future actions $\mathbf{a}_{t:t+K}$ simultaneously.
๐ Recommended Session Split Layout
- Training Set: 500 Sessions (
ck3_20260602_*tock3_20260720_*) - Validation Set: 50 Sessions (
ck3_20260721_*tock3_20260727_*) - Test Benchmark Set: 67 Sessions (
ck3_20260728_*tock3_20260802_*)
๐ Live Dataset Metrics
Current Dataset Phase 1 Progress:
[โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ] 100% (617 / 617 Initial Target Sessions)
| Metric | Specification Details |
|---|---|
| Total Recorded Sessions | 617 Sessions |
| Total Repository Files | 3,088 Files |
| Recording Period | June 2, 2026 โ August 2, 2026 |
| Video Format | 1080p @ 30 FPS (H.264, gdigrab, CRF 20) |
| Input Sampling | 60 Hz Uniform Grid + Microsecond Raw Events |
| Captured Action Dimensions | Cursor Coordinates $(x,y)$, Mouse Buttons, Wheel Deltas, Keyboard State |
| Total Storage Footprint | ~200+ GB Video + 12+ GB CSV Telemetry |
| Dataset License | Creative Commons Attribution 4.0 International (CC BY 4.0) |
๐ Citation & Attribution
If you utilize this dataset in your research, benchmarks, or AI projects, please cite it using the following BibTeX format:
@dataset{ck3_gameplay_mouse_keyboard_2026,
title = {CK3 Gameplay Mouse & Keyboard Telemetry Dataset},
author = {Yaฤฤฑz Ekrem Dalar},
year = {2026},
publisher = {Hugging Face},
month = {August},
doi = {10.57967/hf/9535},
url = {https://huggingface.co/datasets/Ethosoft/ck3-gameplay-mouse-keyboard-dataset},
note = {Multimodal 1080p video and 60 Hz input telemetry dataset for Crusader Kings III}
}
- Downloads last month
- 1,180