messages listlengths 3 3 | tools listlengths 1 1 |
|---|---|
[
{
"role": "system",
"content": "You are playing one seat in a turn-based game, against other players.\n\nEach time it is your turn you are given: a briefing on the game's rules, the current state of the board as your seat can see it, and the COMPLETE list of actions you are allowed to take right now.\n\nHow... | [
{
"type": "function",
"function": {
"name": "take_action",
"description": "Take exactly one of the legal actions offered this turn. action_id must be copied exactly from the legal action list.",
"parameters": {
"type": "object",
"properties": {
"action_id": {
... |
[
{
"role": "system",
"content": "You are playing one seat in a turn-based game, against other players.\n\nEach time it is your turn you are given: a briefing on the game's rules, the current state of the board as your seat can see it, and the COMPLETE list of actions you are allowed to take right now.\n\nHow... | [
{
"type": "function",
"function": {
"name": "take_action",
"description": "Take exactly one of the legal actions offered this turn. action_id must be copied exactly from the legal action list.",
"parameters": {
"type": "object",
"properties": {
"action_id": {
... |
[
{
"role": "system",
"content": "You are playing one seat in a turn-based game, against other players.\n\nEach time it is your turn you are given: a briefing on the game's rules, the current state of the board as your seat can see it, and the COMPLETE list of actions you are allowed to take right now.\n\nHow... | [
{
"type": "function",
"function": {
"name": "take_action",
"description": "Take exactly one of the legal actions offered this turn. action_id must be copied exactly from the legal action list.",
"parameters": {
"type": "object",
"properties": {
"action_id": {
... |
[
{
"role": "system",
"content": "You are playing one seat in a turn-based game, against other players.\n\nEach time it is your turn you are given: a briefing on the game's rules, the current state of the board as your seat can see it, and the COMPLETE list of actions you are allowed to take right now.\n\nHow... | [
{
"type": "function",
"function": {
"name": "take_action",
"description": "Take exactly one of the legal actions offered this turn. action_id must be copied exactly from the legal action list.",
"parameters": {
"type": "object",
"properties": {
"action_id": {
... |
[
{
"role": "system",
"content": "You are playing one seat in a turn-based game, against other players.\n\nEach time it is your turn you are given: a briefing on the game's rules, the current state of the board as your seat can see it, and the COMPLETE list of actions you are allowed to take right now.\n\nHow... | [
{
"type": "function",
"function": {
"name": "take_action",
"description": "Take exactly one of the legal actions offered this turn. action_id must be copied exactly from the legal action list.",
"parameters": {
"type": "object",
"properties": {
"action_id": {
... |
[
{
"role": "system",
"content": "You are playing one seat in a turn-based game, against other players.\n\nEach time it is your turn you are given: a briefing on the game's rules, the current state of the board as your seat can see it, and the COMPLETE list of actions you are allowed to take right now.\n\nHow... | [
{
"type": "function",
"function": {
"name": "take_action",
"description": "Take exactly one of the legal actions offered this turn. action_id must be copied exactly from the legal action list.",
"parameters": {
"type": "object",
"properties": {
"action_id": {
... |
[
{
"role": "system",
"content": "You are playing one seat in a turn-based game, against other players.\n\nEach time it is your turn you are given: a briefing on the game's rules, the current state of the board as your seat can see it, and the COMPLETE list of actions you are allowed to take right now.\n\nHow... | [
{
"type": "function",
"function": {
"name": "take_action",
"description": "Take exactly one of the legal actions offered this turn. action_id must be copied exactly from the legal action list.",
"parameters": {
"type": "object",
"properties": {
"action_id": {
... |
[
{
"role": "system",
"content": "You are playing one seat in a turn-based game, against other players.\n\nEach time it is your turn you are given: a briefing on the game's rules, the current state of the board as your seat can see it, and the COMPLETE list of actions you are allowed to take right now.\n\nHow... | [
{
"type": "function",
"function": {
"name": "take_action",
"description": "Take exactly one of the legal actions offered this turn. action_id must be copied exactly from the legal action list.",
"parameters": {
"type": "object",
"properties": {
"action_id": {
... |
[
{
"role": "system",
"content": "You are playing one seat in a turn-based game, against other players.\n\nEach time it is your turn you are given: a briefing on the game's rules, the current state of the board as your seat can see it, and the COMPLETE list of actions you are allowed to take right now.\n\nHow... | [
{
"type": "function",
"function": {
"name": "take_action",
"description": "Take exactly one of the legal actions offered this turn. action_id must be copied exactly from the legal action list.",
"parameters": {
"type": "object",
"properties": {
"action_id": {
... |
[
{
"role": "system",
"content": "You are playing one seat in a turn-based game, against other players.\n\nEach time it is your turn you are given: a briefing on the game's rules, the current state of the board as your seat can see it, and the COMPLETE list of actions you are allowed to take right now.\n\nHow... | [
{
"type": "function",
"function": {
"name": "take_action",
"description": "Take exactly one of the legal actions offered this turn. action_id must be copied exactly from the legal action list.",
"parameters": {
"type": "object",
"properties": {
"action_id": {
... |
[
{
"role": "system",
"content": "You are playing one seat in a turn-based game, against other players.\n\nEach time it is your turn you are given: a briefing on the game's rules, the current state of the board as your seat can see it, and the COMPLETE list of actions you are allowed to take right now.\n\nHow... | [
{
"type": "function",
"function": {
"name": "take_action",
"description": "Take exactly one of the legal actions offered this turn. action_id must be copied exactly from the legal action list.",
"parameters": {
"type": "object",
"properties": {
"action_id": {
... |
[
{
"role": "system",
"content": "You are playing one seat in a turn-based game, against other players.\n\nEach time it is your turn you are given: a briefing on the game's rules, the current state of the board as your seat can see it, and the COMPLETE list of actions you are allowed to take right now.\n\nHow... | [
{
"type": "function",
"function": {
"name": "take_action",
"description": "Take exactly one of the legal actions offered this turn. action_id must be copied exactly from the legal action list.",
"parameters": {
"type": "object",
"properties": {
"action_id": {
... |
[
{
"role": "system",
"content": "You are playing one seat in a turn-based game, against other players.\n\nEach time it is your turn you are given: a briefing on the game's rules, the current state of the board as your seat can see it, and the COMPLETE list of actions you are allowed to take right now.\n\nHow... | [
{
"type": "function",
"function": {
"name": "take_action",
"description": "Take exactly one of the legal actions offered this turn. action_id must be copied exactly from the legal action list.",
"parameters": {
"type": "object",
"properties": {
"action_id": {
... |
[
{
"role": "system",
"content": "You are playing one seat in a turn-based game, against other players.\n\nEach time it is your turn you are given: a briefing on the game's rules, the current state of the board as your seat can see it, and the COMPLETE list of actions you are allowed to take right now.\n\nHow... | [
{
"type": "function",
"function": {
"name": "take_action",
"description": "Take exactly one of the legal actions offered this turn. action_id must be copied exactly from the legal action list.",
"parameters": {
"type": "object",
"properties": {
"action_id": {
... |
[
{
"role": "system",
"content": "You are playing one seat in a turn-based game, against other players.\n\nEach time it is your turn you are given: a briefing on the game's rules, the current state of the board as your seat can see it, and the COMPLETE list of actions you are allowed to take right now.\n\nHow... | [
{
"type": "function",
"function": {
"name": "take_action",
"description": "Take exactly one of the legal actions offered this turn. action_id must be copied exactly from the legal action list.",
"parameters": {
"type": "object",
"properties": {
"action_id": {
... |
[
{
"role": "system",
"content": "You are playing one seat in a turn-based game, against other players.\n\nEach time it is your turn you are given: a briefing on the game's rules, the current state of the board as your seat can see it, and the COMPLETE list of actions you are allowed to take right now.\n\nHow... | [
{
"type": "function",
"function": {
"name": "take_action",
"description": "Take exactly one of the legal actions offered this turn. action_id must be copied exactly from the legal action list.",
"parameters": {
"type": "object",
"properties": {
"action_id": {
... |
[
{
"role": "system",
"content": "You are playing one seat in a turn-based game, against other players.\n\nEach time it is your turn you are given: a briefing on the game's rules, the current state of the board as your seat can see it, and the COMPLETE list of actions you are allowed to take right now.\n\nHow... | [
{
"type": "function",
"function": {
"name": "take_action",
"description": "Take exactly one of the legal actions offered this turn. action_id must be copied exactly from the legal action list.",
"parameters": {
"type": "object",
"properties": {
"action_id": {
... |
[
{
"role": "system",
"content": "You are playing one seat in a turn-based game, against other players.\n\nEach time it is your turn you are given: a briefing on the game's rules, the current state of the board as your seat can see it, and the COMPLETE list of actions you are allowed to take right now.\n\nHow... | [
{
"type": "function",
"function": {
"name": "take_action",
"description": "Take exactly one of the legal actions offered this turn. action_id must be copied exactly from the legal action list.",
"parameters": {
"type": "object",
"properties": {
"action_id": {
... |
[
{
"role": "system",
"content": "You are playing one seat in a turn-based game, against other players.\n\nEach time it is your turn you are given: a briefing on the game's rules, the current state of the board as your seat can see it, and the COMPLETE list of actions you are allowed to take right now.\n\nHow... | [
{
"type": "function",
"function": {
"name": "take_action",
"description": "Take exactly one of the legal actions offered this turn. action_id must be copied exactly from the legal action list.",
"parameters": {
"type": "object",
"properties": {
"action_id": {
... |
[
{
"role": "system",
"content": "You are playing one seat in a turn-based game, against other players.\n\nEach time it is your turn you are given: a briefing on the game's rules, the current state of the board as your seat can see it, and the COMPLETE list of actions you are allowed to take right now.\n\nHow... | [
{
"type": "function",
"function": {
"name": "take_action",
"description": "Take exactly one of the legal actions offered this turn. action_id must be copied exactly from the legal action list.",
"parameters": {
"type": "object",
"properties": {
"action_id": {
... |
[
{
"role": "system",
"content": "You are playing one seat in a turn-based game, against other players.\n\nEach time it is your turn you are given: a briefing on the game's rules, the current state of the board as your seat can see it, and the COMPLETE list of actions you are allowed to take right now.\n\nHow... | [
{
"type": "function",
"function": {
"name": "take_action",
"description": "Take exactly one of the legal actions offered this turn. action_id must be copied exactly from the legal action list.",
"parameters": {
"type": "object",
"properties": {
"action_id": {
... |
Raifu Wars — Warrior SFT, built-in AI on Arboretum (v0)
Experimental first cut — read the limitations before training on it.
Two facts the repository name does not carry:
- the teacher is the game's built-in heuristic AI, not a human and not a strong model
- every row is the same map, Arboretum, across 40 seeds
Treat this as something to be superseded rather than built on.
Supervised fine-tuning data for an LLM that plays a seat in Raifu Wars, a turn-based strategy game, through the Warrior protocol — a game-to-sidecar REST contract that lets an agent occupy a human seat.
Every row is one decision by the game's built-in "classic" AI, paired with the exact board
state and legal action list a human (or an LLM) would have been shown at that moment. The target
is a take_action tool call.
Why this exists
Prompting alone did not work, and the failure was measured rather than assumed. Across 80 matches against the built-in AI, a 4B model was told in plain English what the built-in AI would do on that exact board, and:
| told the built-in AI would… | complied |
|---|---|
fight |
13.0% |
move |
52.7% |
tier up |
10.1% |
take rush (ever, across both runs) |
0 / 1258 offered |
Hint-level-1 raised overall agreement from 36.3% to 40.1% (z=2.41, p=0.016) — a real effect that converted to zero wins in 40 matches. A hint is a suggestion and can be declined. A trained target cannot. That is the gap this dataset is meant to close.
Format
OpenAI chat format, one JSON object per line:
{
"messages": [
{"role": "system", "content": "<Warrior protocol system prompt>"},
{"role": "user", "content": "<rules briefing + board + legal actions + 'Take one action now.'>"},
{"role": "assistant", "content": null,
"tool_calls": [{"type": "function",
"function": {"name": "take_action",
"arguments": "{\"action_id\": \"move_9_3\"}"}}]}
],
"tools": [ { "type": "function", "function": { "name": "take_action", "...": "..." } } ]
}
tools carries the per-row schema, whose action_id enum is exactly the legal set for that board
— so the model is trained under the same constraint it is served under.
Some trainers expect content: "" rather than content: null on a tool-calling assistant turn.
Contents
| rows | 9,894 (9,050 train / 844 validation) |
| distinct matches | 40 (all on Arboretum, 21×22) |
| approx. tokens | ~19.9M train / ~1.9M validation |
| mean prompt | ~6,600 characters |
Action distribution of the training target:
| action | share |
|---|---|
| move | 35.6% |
| end turn | 22.5% |
| attack | 10.3% |
| rush | 9.6% |
| discard | 6.2% |
| reload / fortify | 5.9% |
| play card | 5.6% |
| tier choice | 3.8% |
| select tile | 0.6% |
How it was built
Traces are emitted by the game itself (RW_WARRIOR_TRACE=1), which records the offered action set
and the chosen action at the moment of choice, before the action is applied — so the state
describes the board the decision was made on, not the one it produced.
Conversion is tools/make_dataset.py in the Warrior repo. Four properties worth knowing:
- The prompt is rendered by the sidecar itself. The converter imports the live
LLMPolicyand calls the same functions the serving path calls. A reimplementation would drift, and that failure is silent and total — train on one distribution, serve another, nothing reports it. - Hints are stripped. Some source traces come from runs where the built-in AI's intended phase was shown to the model. Training on that would teach reliance on a field that does not exist at inference.
- Deduplicated by content. The two source runs used identical seeds, so their decisions overlap heavily: 6,980 of 16,832 rows were exact duplicates of prompt and action, and were dropped.
- Split by match, not by row. Decisions inside one match share a board, roster and map, so a random row split would put near-identical positions on both sides and report memorisation as validation.
Limitations — read before training
One map — Arboretum. Every row is the same 21×22 board, which is unique to Arboretum among the shipped maps and is uniform across all 16,874 source decisions. Rosters, spawns, characters and dice vary by seed; the terrain does not. A model trained here may learn tile preferences specific to this map, and validation cannot detect that because the validation split shares the map.
40 seeds is the real sample size, not 9,894. Rows within a match are strongly correlated. The effective diversity is far lower than the row count suggests.
The teacher is good, not optimal. The built-in AI beats a random-legal-move control 83–17 and comfortably beats the LLM policies measured against it, but it is a hand-written heuristic, not a solved policy. This is imitation of a decent player.
last_action is omitted. At inference the sidecar appends a line describing how the previous
action resolved, mid-turn. Traces do not record it, so it is absent here. This is a known
train/serve mismatch, left explicit rather than filled with invented context.
Rare classes are rare. tier_kills appears 10 times and select tile 59. Do not expect
competence there.
No why supervision in practice. The schema supports a why field, but the policy that
generated these traces does not produce one, so essentially no row carries a rationale.
Provenance
Both source runs used the same 40 seeds and the same build, with the model seat rotating across
all four positions so no result reflects a single seat's advantage. Every trace carries source,
hint_level, seed and match_id; only source: cpu rows are included here.
Licence
GPL-3.0.
Note what that does and does not cover. It applies to this dataset as released by Yotis Studios. It is not a grant over Raifu Wars itself: the game, its assets and its rules text remain the rights holder's, and rules prose reproduced inside these prompts is here because a training row cannot be reconstructed without it.
Citation
Generated with the Warrior protocol reference implementation. See the
Warrior repository for the protocol specification,
the reference sidecar, and the measurement tooling (offer-rate.py, hint-divergence.py,
check-action-coverage.py).
- Downloads last month
- 38