Flankfall-RL / README.md
GradAscend's picture
Flankfall RL self-play telemetry: matches, events, snapshots, trajectories, training metrics
1522199 verified
|
Raw History Blame Contribute Delete
7.57 kB
metadata
license: cc-by-nc-4.0
pretty_name: Flankfall RL self-play telemetry
tags:
  - reinforcement-learning
  - self-play
  - multi-agent
  - game-ai
  - real-time-strategy
  - ml-agents
size_categories:
  - 10M<n<100M
configs:
  - config_name: matches
    data_files: tables/match.parquet
  - config_name: match_outcome
    data_files: tables/match_outcome.parquet
  - config_name: match_participant
    data_files: tables/match_participant.parquet
  - config_name: match_event
    data_files: match_event/*.parquet
  - config_name: match_snapshot
    data_files: match_snapshot/*.parquet
  - config_name: decisions
    data_files: trajectories/decisions/*.parquet
  - config_name: rewards
    data_files: trajectories/rewards/*.parquet
  - config_name: training_metric
    data_files: tables/training_metric.parquet
  - config_name: training_run
    data_files: tables/training_run.parquet
  - config_name: training_session
    data_files: tables/training_session.parquet
  - config_name: agent_version
    data_files: tables/agent_version.parquet
  - config_name: eval_vs_scripted
    data_files: tables/mv_eval_vs_scripted.parquet

Flankfall RL self-play telemetry

All telemetry from training a reinforcement-learning commander for Flankfall, a real-time tactics game built in Unity, between 2026-09-21 and 2026-10-19: 29 training runs, ~132 h of CPU training, 12.4 M agent steps and 47,684 matches.

Code, agent definition and models: https://github.com/furkanbk/Flankfall-RL. The design document (docs/RL-DESIGN.md) explains every field.

The task

Two sides (red, blue) fight over capture zones. A side wins by holding every zone, reaching the points target, destroying the enemy, or on a tiebreak when the clock runs out. Fog of war hides unspotted enemies. One shared-weight policy (MA-POCA, Unity ML-Agents) runs once per army at every decision tick and picks an action type (Hold / Move / Attack / Retreat), a target hex in a radius-4 disc around the army (61 cells), a formation (4) and a purchase (5).

Files

Config / path Rows One row is
matches — tables/match.parquet 47,684 a match: mode, seed, randomised zone layout (JSON), rules_hash / sim_hash / obs_hash / map_hash (game-version fingerprints), tick_count, ticks_per_second
match_participant 95,368 one side of a match: team, controller (policy, scripted, scripted:bait, scripted:raider), agent_version_id, starting loadout
match_outcome 47,684 winner, reason, tiebreak, is_draw, final_state (JSON)
match_event — match_event/*.parquet 45,511,485 one event (match_id, seq, tick, team, event_type, schema_version, payload JSON)
match_snapshot — match_snapshot/*.parquet 834,893 (match_id, tick, state JSON): every army's position, size and combat state, every zone's owner and progress
decisions — trajectories/decisions/*.parquet 7,956,487 one agent decision with its exact observation tensors and chosen action (see below); covers 8,281 matches, 2.9 M rows are scripted-commander decisions
rewards — trajectories/rewards/*.parquet 843,638 (match_id, tick, reward_red): the reward paid to red at a decision tick (blue gets its negative)
training_metric 36,383 TensorBoard scalar (run_id, tag, step, global_step, wall_time, value) — losses, entropy, cumulative reward, Elo
training_run / training_session / agent_version 29 / 96 / 76 experiment lineage: trainer config, parent run, notes, checkpoints, Elo
eval_vs_scripted 63 summary: policy win rate per evaluation against the scripted commander
tables/ruleset, tables/map, tables/mv_outcomes, tables/training_metric_file small game-rule values per rules_hash, map ids, outcome summary per run/mode, ingested TensorBoard files

JSON columns (layout, loadout, payload, state, final_state, config, values) are stored as JSON strings.

Match modes

mode Matches Who plays
selfplay 43,086 the training policy vs. snapshots of itself (plus scripted opponents in some stages)
eval 3,332 a frozen policy vs. the fixed scripted commander on the held-out authored map
record 680 scripted vs. scripted, recorded as behaviour-cloning demonstrations
duel 524 scripted style vs. scripted style (teacher validation)
play, watch 62 editor sessions: policy vs. policy (play) and scripted vs. scripted (watch)

Event types (match_event.event_type)

decision 35,991,506 · zone_progress 2,912,652 · unit_died 1,634,027 · damage_tick 1,527,443 · snapshot 834,893 · engagement_start 615,315 · army_spawned 567,914 · engagement_end 432,193 · economy_tick 407,253 · army_destroyed 240,400 · purchase 185,061 · zone_flip 67,473 · match_start 47,684 · match_end 47,671

Example payloads:

{"event_type": "decision", "payload": {"army": 3, "action": "hold", "target": [-4, 0], "purchase": -1, "scripted": false, "formation": "line"}}
{"event_type": "economy_tick", "payload": {"money": {"red": 9, "blue": 9}, "income": {"red": 0.2, "blue": 0.2}}}
{"event_type": "match_end", "payload": {"winner": "blue", "reason": "TimeExpired", "tiebreak": "ArmyValue", "seconds": 120, "army_value": {"red": 90, "blue": 100}, "...": "..."}}

Decision rows (trajectories/decisions)

Column Type Meaning
match_id, tick, army_id, team which army decided, when
scripted bool the decision came from a scripted commander, not the policy
n_armies, n_zones int how many rows of the entity buffers are filled
vector list the 300-float vector observation (self army, global state, terrain disc) — older obs_hash values have 239
armies list flattened 16 × 24 army entity buffer (own + spotted enemy armies)
zones list flattened 8 × 20 zone entity buffer
action_type, target_cell, formation, purchase int the action taken on each of the four branches
aborted bool the match was aborted
rules_hash, obs_hash string game-rules and observation-layout version, use them to group rows with the same layout

The exact meaning of every slot is in unity/RL/CommanderObsLayout.cs in the code repository.

Traits and caveats

  • Not human data. Almost everything is bot-vs-bot (policy self-play or scripted commanders).
  • Several game versions. The game changed during training. Always group by rules_hash / obs_hash (in matches and trajectories) before comparing; the observation width changed (239 → 300) on 2026-09-28.
  • Balanced sides. Red wins 22,987, blue 23,711, 587 draws, 399 aborted.
  • End reasons: AllZonesHeld 35 %, ArmyDestroyed 34 %, PointsReached 17 %, TimeExpired 12 %, Aborted 1 %.
  • Selfplay dominates (90 % of matches). Evaluation matches use one authored map that is never used in training (zone layouts in training are randomised every episode).
  • decision events in match_event and the rows in trajectories/decisions describe the same decisions: the events carry the human-readable action, the trajectories carry the tensors.

Loading

from datasets import load_dataset
evals = load_dataset("GradAscend/Flankfall-RL", "eval_vs_scripted", split="train").to_pandas()

import pandas as pd
events = pd.read_parquet("match_event/match_event-00000.parquet")

License

CC BY-NC 4.0. © 2026 Berat Furkan Koçak.