Skip to content

The first exam for code agents in the physical world: frozen robot tasks from many benchmark suites, each answered with a program and verified in a separate sandbox. Runs on Harbor.

19.8 KB
Raw Blame
# fencing (epee): one FIE direct-elimination bout between two robot fencers, fenced phrase by phrase (docs/framework_zh.md
# §4.2, §8). fencing-7 (the owner's decision of 2026-10-13): the phrase-level construction. Every phrase starts on guard;
# each fencer chooses an intention, executed by fixed skills on a Unitree G1 humanoid (NVIDIA's SONIC whole-body
# policy tracking our fencing motions, the point skill on the sword arm); the phrases were measured in the fencing-6
# world and are replayed from a table (phrases.py). Screening: docs/screening/fencing.md (section 6, "Phrase-level
# construction"). The simulator: phrases.py (the phrases), bout.py (the bout referee), opponent.py (the scripted
# fencer), fencing.py + cameras.py (the scene and the images). The declarations below are data: the core,
# tools/generate.py, tools/check and the prompt read them.
#
# A PREVIEW (the maintainers, Chi, 2026-10-14): accepted as a strategy special case, publishable and open to model runs,
# but not counted in the main board's capability statistics (deviation D12). It departs from the construction rules
# (docs/construction_zh.md P1/P2/P5, docs/framework_zh.md §6.3.1): the command is a tactical intention for a whole
# phrase, and four intentions (rline, stop, counter, draw) carry a fixed, published trigger; the agent's skill is
# choosing and reading the opponent, not moving the robot. tools/check stage 1 fails on [capabilities] (none of a1-a3
# is 2), declared honestly. A next version should bring distance and timing back (choosing the starting gap or the
# moment to go, or a free starting gap once our own footwork and lunge policy is trained).

[sport]
name = "fencing"
title = "Robot epee fencing"
summary = "two Unitree G1 humanoids (the robot library's, NVIDIA's SONIC whole-body policy on the legs, waist and free arm, the point skill on the sword arm) holding real epees fence one FIE direct-elimination bout (15 touches or 9 minutes of fencing time, no draws; unwillingness to fight, FIE t.124) phrase by phrase: every phrase starts on guard 1.95 m apart, both fencers choose one of nine tactical intentions (lunge, low lunge, point in line, reactive line, stop-hit, counter-attack, delayed lunge, retreat, draw), each starts after a random 0-50 ms, and the phrase is played out as it was measured in MuJoCo (2916 phrases: every pair of intentions and delays); format bout: you against a scripted fencer that reads your choices (levels 1-2, `game spec` opponent), format duel: two players choosing at the same time"
protocol = "turn"
revision = "fencing-7+core-0.2"       # bump on any change that alters play (the phrase table, the rules, the opponent, the observation)
physics = "the phrases: MuJoCo 3.3.7 (1 ms physics steps, 10 ms control steps), two Unitree G1 of the robot library (bodies/unitree_g1, 29 DOF; Unitree's motor torque-speed curves through the library's output stage) with epees, robot x robot, blade x body and blade x blade contacts (bodies/contacts.py), NVIDIA SONIC (GR00T-WholeBodyControl b042411) on the legs, waist and free arm, the point skill on the sword arm, fencing-6's apparatus and phrase referee; each of the 2916 phrases measured once in that world (it is deterministic: 2799 earlier measurements of 1953 of the phrases all ended as in that run, with the same result at the same step) and replayed from sports/fencing/phrases/table.json"
image = "ghcr.io/mll-lab-nu/efe:embodied-olympics-match-0.1.0"
status = "sport"
publish = true                        # both formats are PREVIEW formats ([formats.*] preview = true, D12)
category = "robotics-sports-arena"

[body]                                # the robot library (bodies/README.md): the robot and its tool, for the scene
name = "unitree_g1"
hand = "epee"                         # bodies/hands/epee.xml (a real epee's mass, #88)
controllers = []                      # the phrases are replayed; their controllers (SONIC, the point skill) ran when they were measured

[rulebook]
name = "FIE Technical Rules (t.) and Material Rules (m.), epee"
version = "August 2026"
url = "https://static.fie.org/uploads/40/204126-Technical%20rules%20August%202026%20ang.pdf"
articles = "on guard (t.22); fencing time (t.37); direct-elimination bout to 15 hits or three periods of three minutes with a one-minute rest, 9 minutes of effective fencing time; more hits wins; equal at time: one minute for a deciding hit, the winner if still equal drawn by lot before it (t.39, t.40); at 4-4 in a pool bout at epee a double hit is not counted (t.38.1.b); clock end (t.44); epee: point only, whole body target, double hits count for both (t.90-t.93); unwillingness to fight: one minute of fencing without a hit, P-red to both, then P-black to the lower score, no P-card at 14-14 (t.124, t.170 0.5); the epee under 770 g (m.14); point pressure more than 750 g (m.19.2); apparatus: hits of 2-10 ms registered, none under 2 ms, double-hit window 40-50 ms (Material Rules Annexe B, B. Epee); blade at most 90 cm (m.16.3), guard through a 13.5 cm gauge (m.17.1)"
material_rules = "https://static.fie.org/uploads/40/204156-book%20material%20August%202026%20ang.pdf"
rules_check = "sports/fencing/rules_check.md (every article and value checked against the two PDFs)"

[[deviations]]
id = "D1"
rule = "t.22, t.28-t.31 (the bout's phrases and footwork)"
text = "the bout is fenced phrase by phrase: every phrase starts with both fencers on guard 1.95 m apart (pelvis to pelvis), each fencer chooses one of nine intentions (`game spec` intentions) executed by fixed skills on the robot, each starts its intention after 0, 10, ... or 50 ms (drawn per phrase), and the phrase ends at the first touch or after 3 s without one; distance, footwork between phrases and the length of the piste are not part of the bout (the screening found the robots' footwork too slow for a bout over the piste: docs/screening/fencing.md)"
affects_result = true
[[deviations]]
id = "D2"
rule = "t.91, m.19, Material Rules Annexe B"
text = "the robot's whole structure is the target (t.91: the whole body), its epee (guard, blade, grip) is not; the apparatus measures the force on the point along the blade (> 7.35 N for >= 2 ms, three consecutive 1 ms samples; lockout 45 ms, inside the 40-50 ms tolerance)"
affects_result = true
[[deviations]]
id = "D3"
rule = "t.24, t.25, t.33-t.35, t.56.10"
text = "a phrase that ended in a fall, a corps-a-corps or a fencer over a limit counts as a phrase without a touch (none of the 2916 measured phrases did)"
affects_result = false
[[deviations]]
id = "D4"
rule = "t.39, t.40"
text = "the 9 minutes of fencing time are one period (no one-minute rests); every phrase takes its measured fencing time (to the halt, 3 s without a touch)"
affects_result = true
[[deviations]]
id = "D5"
rule = "t.38.1.b"
text = "at 14-14 a double touch is not counted (the pool bout's rule at 4-4 applied to the 15-touch bout; the 2026 rules have no clause for 14-14 in direct elimination)"
affects_result = true
[[deviations]]
id = "D6"
rule = "t.158-t.170"
text = "no cards or penalties (the robots cannot commit the faults they punish), except the P-cards for unwillingness to fight (t.124)"
affects_result = false
[[deviations]]
id = "D7"
rule = "t.39 (competition formula)"
text = "one direct-elimination bout instead of a competition"
affects_result = false
[[deviations]]
id = "D8"
rule = "-"
text = "the fencer is the robot library's Unitree G1 (bodies/unitree_g1) with the epee on its right wrist mount, its legs, waist and free arm on NVIDIA's SONIC whole-body policy (tracking our en garde, step and lunge motions), its sword arm on the point skill; a lunge from guard covers about 0.25 m in 0.4 s, so the phrases are fenced from 1.95 m, where a lunge reaches the chest; you command it by intentions, not by motions"
affects_result = true
[[deviations]]
id = "D9"
rule = "t.124"
text = "unwillingness to fight as the FIE applies it to direct-elimination bouts (t.124.1): one minute of fencing time without a hit -> 'Halt!'; the first time a P-red card to both fencers, a penalty hit each; the second time the P-black card to the fencer with the lower score, who loses the bout, at equal scores to the fencer who loses a seeded lot (t.124.1.b.i: lots for fencers not in the FIE ranking); no P-card at 14-14 (t.124.3.a): the minute restarts; the minute restarts after each hit, double, annulled double and penalty hit (t.124.3.d), not after a phrase without a touch; t.124 does not apply in the extra minute (t.124.3.f)"
affects_result = true
[[deviations]]
id = "D10"
rule = "m.14-m.19"
text = "the epee is rigid (its blade does not bend) and its point is a sphere; its mass is a real standard-parts epee's (Leon Paul: 0.455 kg, balance 12 cm in front of the guard; bodies/hands/epee.xml)"
affects_result = false
[[deviations]]
id = "D11"
rule = "-"
text = "the two ends of the piste are not exactly alike in the simulation (the same phrase fenced from the other end ends differently in 205 of the 1431 pairs of mirrored phrases, about one in seven), so each phrase draws the end each fencer fences from, with probability 1/2 each: both fencers meet the same chances"
affects_result = true
[[deviations]]
id = "D12"
rule = "-"
text = "a preview, accepted by the maintainers (2026-10-14) as a strategy special case: a symmetric zero-sum game of intentions whose phrase table comes from the physics; the agent controls neither distance nor timing, so it is tested on reading the opponent only (capabilities a1 0, a2 0, a3 1, b2 2; tools/check stage 1 requires one of a1-a3 primary and fails), against construction_zh.md P1/P2/P5 (skills take motion targets and do not choose strategy) and framework_zh.md §6.3.1; publishable and open to model runs, not counted in the main board's capability statistics (both formats `preview = true`: never an official configuration, no hidden seeds)"
affects_result = false

[formats.bout]                        # seat A against the scripted fencer (opponent.Opponent; side B)
preview = true                        # D12: playable, never official (core 0.2.21: official_config = 0; tools/seeds.py: no cell)
seats = ["A"]
opponent = true                       # success = winning a valid bout (core/grading.py)
levels = [1, 2]                       # the opponent level (RCB_LEVEL; default 1)
[formats.duel]
preview = true                        # D12, as bout
seats = ["A", "B"]
first = ["A", "B"]                    # the first player chooses first in every phrase (kept hidden), is the first fencer of the phrase draws and of the lots

[modes]
action_levels = ["low"]               # the intention for a phrase is the robot's whole command, as a release command in the other turn sports
plays = ["program"]

[timing]
clock_s = 3600                        # turn protocol: each seat's chess clock, on its own turn only
start_timeout_s = 1800

[actions.cli]                         # `game phrase lunge`
low = { phrase = ["intention"] }

[observation]
fields = ["score", "phrase", "fencing_time_s", "time_left_s", "extra_minute", "priority", "passivity", "phrases",
          "committed"]
renderer = "mujoco"                   # the images are drawn by the sport (cameras.py, MuJoCo osmesa) in each seat's render worker
frame_budget_ms = 4000                # 4 tiles of 800 x 360, osmesa on the CPU
columns = 2

[spec]                                # the rule constants (/spec adds the intentions, the phrase table, the cameras)
bout = "one FIE direct-elimination bout (t.39-t.40): the first to 15 touches wins; 9 minutes of fencing time (one period); at time the fencer ahead wins; at equal scores one more minute for a deciding touch with priority drawn by lot before it (seeded), the priority holder winning if still equal; a double touch counts for both except at 14-14 (not counted); in the extra minute a double leaves the scores equal. Unwillingness to fight (t.124): one minute of fencing time without a touch: the first time both fencers get a P-red card, a penalty touch each; the second time the fencer with the lower score gets the P-black card and loses the bout (at equal scores: the one who loses a lot, seeded); no card at 14-14; the minute restarts after every touch, double, annulled double and penalty touch, not after a phrase without a touch; it does not apply in the extra minute (observation `passivity`)"
phrase = "every phrase starts with both fencers on guard 1.95 m apart; each fencer has chosen one intention (`game spec` intentions) and starts it after 0, 10, 20, 30, 40 or 50 ms (each equally likely, drawn for each fencer and phrase from the seed, after both have chosen); the phrase ends at the first touch (the apparatus: the point's force along the blade above 7.35 N for 2 ms on the opponent's body; the other's touch within 45 ms is a double) or after 3 s without one; it takes its fencing time from the bout clock (a clock that ends during a phrase ends it without a touch, t.44). The phrases were measured in MuJoCo (D1, D8); `game spec` phrase_table gives, for every pair of intentions, how many of the 72 equally likely phrases (36 pairs of delays x both ends of the piste) end with a touch for you, for the opponent, a double or none"
duel = "both players choose their intention for the next phrase; the first player's choice is kept hidden from the other until the phrase is fenced"
observation = "the state: the score, the phrase number, the fencing time and the time left, the extra minute and the priority, the passivity minute and the P-cards, and every phrase so far (your intention and the opponent's, both start delays, the result, its fencing time, the score after it, cards); the image: 2 rows (side camera beside the piste, top camera above it) x 2 columns (the last phrase half-way and at its end) of 800 x 360 tiles, your robot red, the opponent blue, the points yellow"
scripted_opponent = "format bout: the computer fencer chooses its intention before each phrase from what it has seen of the bout (both fencers' intentions and the results), never from your choice for this phrase; it knows the phrase table. Level 1 reads you with a few simple models of a player (repeats, answers, copies, plays what just won, goes round the menu) but mostly keeps a slow habit (the best answer to your whole-bout mix); level 2 predicts your next intention from your patterns, also models how you read it, answers what it expects, and now and then plays the table's equilibrium mix"

[tiebreaks]
order = ["touches", "passivity", "time", "deciding_touch", "priority"]
text = "the first to 15 touches wins (FIE t.40.1); a second minute without a touch (unwillingness to fight, FIE t.124) loses the bout for the fencer with the lower score, at equal scores for the one who loses a lot (seeded); at the end of the 9 minutes the fencer ahead wins; at equal scores one more minute is fenced and the first touch decides; if the scores are still equal after it, the fencer with priority, drawn by lot (seeded) before the extra minute, wins (FIE t.40.3)"
last_resort_in_prompt = true

[[exploits]]
id = "E1"
text = "an unknown intention, a wrong type, an extra field (a start delay or an end chosen by the player) is refused and changes nothing"
test = "test_exploit_bad_intentions_refused"
[[exploits]]
id = "E2"
text = "the scripted fencer chooses its intention for a phrase without seeing the agent's: after the same bout so far, every choice of the agent meets the same intention"
test = "test_exploit_opponent_cannot_see_your_choice"
[[exploits]]
id = "E3"
text = "format duel: the first player's choice stays out of the other player's observation until the phrase is fenced"
test = "test_exploit_duel_choice_hidden"
[[exploits]]
id = "E4"
text = "`game spec` phrase_table is the table the bout plays (all 2916 phrases, 72 per pair over both ends), and every phrase of a bout is the table's phrase for its delays and ends"
test = "test_exploit_spec_is_the_simulator"
[[exploits]]
id = "E5"
text = "the start delays and the ends of the piste come from the seed and the phrase number, not from the intentions (uniform over 0-50 ms; each end with probability 1/2)"
test = "test_exploit_phrase_draws_seeded_not_chosen"
[[exploits]]
id = "E6"
text = "every bout has a winner (touches, passivity, time, the deciding touch or the priority), also when nobody ever touches"
test = "test_exploit_no_draws"
[[exploits]]
id = "E7"
text = "stalling does not pay: both fencers retreating every phrase get the P-red cards after a minute and the P-black card decides the bout after the next"
test = "test_exploit_passivity_cards"
[[exploits]]
id = "E8"
text = "a fixed intention every phrase, or a uniformly random one, loses the majority of its bouts against level 1"
test = "test_exploit_simple_programs_lose"
[[exploits]]
id = "E9"
text = "at 14-14 a double is not counted and the minute restarts; at 13-14 it ends the bout"
test = "test_exploit_double_at_14_14_not_counted"
[[exploits]]
id = "E10"
text = "a phrase whose touch would come after the end of time ends without it (t.44); equal scores at time start the extra minute with priority drawn"
test = "test_exploit_clock_ends_the_phrase"

[players]
reference = "reference"               # Sport.players() names: reads only `game spec` and the state
reference_class = "builtin_players:Reference"
check = ["random"]                    # policies for the generic tests

[fairness]
policy = "rival"                      # the reference drawing from a stream of the seed and its seat
matches_per_order = 400               # N = 800: 95% CI about +-3.5 pp
max_advantage_pp = 5
mirror = "exact"                      # the phrase draws and the lots follow the first order, not the seat

[official]
seeds = [1, 2, 3, 101, 111, 121, 202, 212, 222]
first_any = true
levels = [1, 2]

[score]                               # the continuous score (core/score.py)
name = "touch_share"
text = "touches scored / touches scored by both fencers (a double counts for both; 0.5 if neither scored)"
from = "share"
forfeit = 0.0
range = [0, 1]

[reference]                           # tools/check stage 5, the reference check (docs/screening/README.md)
match = "reference_check:reference_match"   # one bout of the reference against the scripted fencer, as step 4 plays it; camera = truth (no images to read)
seeds = 200                           # seeds 1..200 per level: at the step-4 rates (61.5 %, 48.0 %) 20 seeds fail the check 1 time in 3, 200 seeds 1 in 300
camera_seeds = 200                    # the same player as truth, so the same seeds

[golden]
episodes = "golden"                   # sports/fencing/golden/<case>/

[[tasks]]
format = "bout"
action_level = "low"
id = "fencing-bout-wallclock-program-standard"      # the Season-1 task names ([[tasks]] id)
[[tasks]]
format = "duel"
action_level = "low"
id = "fencing-duel-wallclock-program-standard"

[broadcast]                           # spectators: the replay video's camera
camera = { name = "broadcast", pos = [0.0, -7.95, 1.75], lookat = [0.0, 0.0, 0.8], fovy_deg = 45, width = 960, height = 400 }

[capabilities]                        # docs/capabilities_zh.md
a1 = 0                                # no perception: the state gives every phrase's intentions and result
a2 = 0                                # the phrases' physics is measured; the agent does not predict it
a3 = 1                                # what each intention does on this robot (the phrase table), not how to move it
a4 = 0                                # turn-based: no real-time timing
b1 = 1                                # FIE rules (15 touches, 14-14, the clock, unwillingness to fight, the extra minute, priority) shape the bout and the state, but no evidence yet that using them pays: a reference that stalls when ahead lost 5 points of touch share (screening report, section 6)
b2 = 2                                # reading the opponent: the levels adapt to the agent's patterns; the reference without reading (the equilibrium mix) does clearly worse at level 1 (screening report, section 6)
b3 = 0
physics = ["contact"]

[check]                               # tools/check limits
stage_timeout_s = 28800               # stage 4: 800 rendered duels in the image (osmesa, 2 seats' 2 x 2 tiles per phrase) at about 23 s each, about 5 h