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.

44.1 KB
Raw Blame
# tabletennis: robot table tennis, real time (docs/framework_zh.md §4.2, §8). Migrated from the legacy tree in stage 2
# (scripts/olympiad/tabletennis, scripts/olympiad/shared/tabletennis). Since 2026-10-07 (review item C2) the robot
# stands on an x-y rail base (D9) and the players' robots serve by the ITTF service laws (sim/serve.py, D2, D10, D11);
# the legacy machine-serve recordings no longer apply and were retired from the golden set (README). Since 2026-10-09
# (revision wallclock-10 / duel-wallclock-8) every body obeys the real robot's limits (principle B0): the Franka Panda
# arm on fencing-3's real-limits servo, the rail with real velocity / acceleration / jerk limits, the scripted opponent
# held to the same limits and recalibrated. The declarations below are data: the core, tools/generate.py, tools/check
# and the prompt read them.

[sport]
name = "tabletennis"
title = "Table tennis"
summary = "robot table tennis in a continuous world slowed by a factor S (MuJoCo Franka Panda + paddle on an x-y rail base behind the end line, both held to the real robot's limits: the Panda's joint velocity, acceleration, jerk, torque and torque rate, the rail's speed, acceleration and jerk; DeepMind ball and table model), seen only through two cameras of four frames each; one game to 5 points (lead by 2 from 4:4, at 6:6 the next point wins); the players' robots serve by the ITTF service laws (a toss device on the robot projects the ball at least 16 cm up from a point you choose behind your end line, you strike it as it falls; 2 serves each, from 4:4 one each); format match: you against a scripted opponent (level 1-4; you serve first), format duel: two players"
protocol = "realtime"
revision = "wallclock-15+duel-wallclock-12+low-inloop-1+core-0.2"   # bump on any change that alters play (sim/, the rules, the observation); 6/4: the players' images (fine arm meshes), 7/5: the rail base, 8/6: the players serve, 9/7: table contact allowed (D4), table avoidance, serve receive recalibrated; 10/8: the real robot's limits (arm servo, rail, low-level checks), the limits-aware stroke planner, the opponent held to the limits (serve library) and recalibrated; 11/9: at most 2 service lets in a row (D12); 12/10: self-collision on the rail version (the arm and paddle against its links, column and carriage; [self_collision]); 13 (match only): the scripted opponent recalibrated (short services, L1/L2 rally; screening 2026-10-11); 14/11 (re-screen 2026-10-12, the Embodied Olympics screening notes): realistic restitution (ball-table: a ball dropped from 30 cm bounces 23 cm, ITTF 2.1.3; ball-blade 0.80), the execution scatter 1 cm / 1.5 deg / 5 %, the servo's JerkLimiter brakes relative to the moving reference (#94), the serve depth rule D13 (the bounce on the receiver's court >= 0.2 m from the net), the serve library rebuilt, the platform's hit keeps its blade speed (no uniform 0.9 pre-scale of the contact velocity with the limits-aware planner, the table-avoidance via on the contact velocity's line; rally.contact_prescale / via_pose); 15/12 (the user's decision of 2026-10-12 on the joint-velocity rule, option A): the arm's setpoint generator and the stroke planner at 0.9 of the velocity limits, and the joint-velocity reflex (a physical arm joint faster than 1.05 x its limit stops the robot for 1 s, then it resumes from rest), and the collision reflex (the robot's links or paddle pressing on the table with more than 20 N stop it the same way); low-inloop-1 (2026-10-13, shared skill in the loop): the low tasks' hits are played by the player's own hit.py in a skill container per seat ([modes.low.inloop]), its compute counted in match time
physics = "mujoco"
image = "ghcr.io/mll-lab-nu/efe:embodied-olympics-match-0.1.0"
status = "sport"
publish = true
category = "robotics-sports-arena"

[arm]                                  # the real robot the arms are held to (bodies/franka_panda/body.toml, bodies/limits.py)
body = "franka_panda"                  # the scene's arm is MuJoCo Menagerie's Panda (panda_nohand): the Panda's limits
joints = "^joint(?P<j>[1-7])(?P<arm>_b)?$"   # tools/arm_limits.py: the arm joints of the scenes (duel: _b = robot B)
files = ["trajopt.py"]                 # the limits-aware stroke planner the simulator imports (bodies/trajopt.py)

[rulebook]
name = "ITTF Laws of Table Tennis (ITTF Statutes 2025, chapter 2)"
version = "2025 (effective 1 January 2025)"
url = "https://db.ittf.com/sites/default/files/public/2025-02/ITTF_Statutes_2025_tracked_changes_version.pdf"

[[deviations]]
id = "D1"
rule = "ITTF 2.11, 2.12"
text = "one game to 5 points (from 4:4 a lead of 2 is needed, at 6:6 the next point wins: 7 points at most) instead of a best-of-games match with games to 11"
affects_result = true
[[deviations]]
id = "D2"
rule = "ITTF 2.6.1, 2.6.2, 2.6.4, 2.6.5"
text = "the robot holds its paddle and has no free hand: a toss device on the robot makes the toss. The server sends toss {pos, height} (the racket sports' common form): the ball rests stationary at pos for 0.1 s (2.6.1), then it is projected straight up with no spin so that it rises height metres above pos (2.6.2: 0.16 <= height <= 1.0); pos must be behind the end line and above the playing surface (the whole ball, 2.6.4), within 0.9 m of the server's base horizontally and at most 0.9 m above the table (the device's reach). Until the toss the ball is out of sight in the server's column. Not judged: the ball hidden from the receiver (2.6.4; the toss happens in view of both cameras), the free arm (2.6.5). Judged as in the Laws: the toss must fall without touching anything until it is struck, as it falls, behind the end line and above the playing surface (2.6.2-2.6.4, checked at every physics step), and the service must touch the server's court and then directly the receiver's (2.6.3); a dropped toss or any other failed service is the receiver's point (2.10.1.1)"
affects_result = true
[[deviations]]
id = "D3"
rule = "ITTF 2.5.7"
text = "only the blade can strike the ball: the ball touching the handle or arm loses the point"
affects_result = true
[[deviations]]
id = "D4"
rule = "ITTF 2.10.1.9-2.10.1.11"
text = "as in the Laws, the robot or its paddle touching the playing surface (or the floor) is not a fault; touching the net assembly loses the point (2.10.1.10). The table is fixed in the simulation and cannot be moved, so 2.10.1.9 (moving the playing surface) never applies; 2.10.1.11 (the free hand touching the playing surface) does not apply to a one-arm robot that has no free hand; the table physically stops a robot or paddle pressing on it (until revision wallclock-8 / duel-wallclock-6 any contact with the table, net or floor lost the point)"
affects_result = true
[[deviations]]
id = "D5"
rule = "ITTF 2.10.1.7"
text = "any double hit loses the point, deliberate or not"
affects_result = true
[[deviations]]
id = "D6"
rule = "ITTF 2.15.4"
text = "the expedite rule's 13-return limit applies from the first point: the receiver's 13th good return in a rally wins it the point (this bounds every rally); unlike 2.13.3 / 2.15.4 under the expedite system, the service still changes every 2 points (one each from 4:4)"
affects_result = true
[[deviations]]
id = "D7"
rule = "ITTF 2.9.1.3 (let)"
text = "duel: faults by both players at the same instant (both arms touching the table, or both robots touching the ball in the same millisecond) are a let"
affects_result = true
[[deviations]]
id = "D8"
rule = "- (cost limit, not from the rulebook)"
text = "if 40 points (lets included) are played the game ends: the player ahead wins; at a level score the player who won the last point (a game has at most 13 scoring points and, by D12, at most 2 service lets before each of them, so only lets from simultaneous faults (D7) could reach it)"
affects_result = true

[[deviations]]
id = "D9"
rule = "- (embodiment, not from the rulebook)"
text = "the player is a robot arm (Franka Panda, 7 joints) with a paddle on a pedestal carried by an x-y rail base behind its end line: travel |x| <= 1.0 m, 0.13-1.03 m behind the end line (base y from -1.50 to -2.40 m, the column's front 1 cm behind the end line at most), up to 2 m/s, 8 m/s^2 (the drives' force limit) and 200 m/s^3 (estimated) per axis; it cannot lean over the table. Both the arm and the rail obey the real robot's limits (revision wallclock-10): the arm runs on fencing-3's 1 kHz servo, a jerk-limited setpoint within the Panda's joint velocity, acceleration and jerk limits (the jerk also capped by its 1000 N m/s torque-rate limit), torques within 87 / 12 N m changing by at most 1 N m per ms; the rail on a jerk-limited setpoint within its limits. A human player is not limited this way"
affects_result = true

[[deviations]]
id = "D10"
rule = "- (ITTF chapter 3 regulates delay with warnings and penalty points; not in the Laws)"
text = "undue delay has a fixed limit: the server must toss within 5 s (game time) after the serve opens (0.8 s after the previous point, the receiver being ready), else it is a failed service (the receiver's point, recorded as serve_fault:undue_delay); a player's third such fault loses it the match (in place of chapter 3's warning, penalty points and the referee's disqualification for repeated misconduct)"
affects_result = true
[[deviations]]
id = "D11"
rule = "ITTF 2.13.1, 2.13.2"
text = "no lot for the first service: format match - you serve first; format duel - the runner plays both orders of the first server (match.first_server); format duel - before every point both robots are put back at rest in the ready pose with their bases at home"
affects_result = true

[[deviations]]
id = "D12"
rule = "ITTF 2.9.1.1 (let), 2.13.3 (a let does not change the server); ITTF chapter 3: 3.4.4.1 (play shall be continuous), 3.5.2.1-3.5.2.3 (behaviour that may unfairly affect an opponent: a yellow-card warning, then penalty points)"
text = "a service that touches the net assembly and is otherwise good is a let (2.9.1.1), at most 2 in a row: the server's third service let since the last point scored is a failed service, the receiver's point (serve_fault:repeated_let). The Laws set no limit on lets, and a let does not change the server (2.13.3), so a server that can make its service clip the net at will (a low-level program replays the same joint trajectory from the same reset state; the physics is deterministic) could replay it indefinitely and, when ahead, run the game into the 40-point guard (D8); deliberately repeated lets are the conduct chapter 3 sanctions (continuity of play, 3.4.4.1; behaviour that unfairly affects an opponent, 3.5.2.1, with a warning and then a penalty point, 3.5.2.2-3.5.2.3), replaced here, as for undue delay (D10), by a fixed rule: the first two lets in a row are free, the third costs the point. state.serve shows the server lets_in_row and let_limit"
affects_result = true

[[deviations]]
id = "D13"
rule = "ITTF 2.6.3 (a good service: the server's court, then the receiver's court)"
text = "the service's bounce on the receiver's court must be at least 0.2 m from the net (the ball's centre at the contact, serve.SERVE_MIN_DEPTH), else it is a failed service (the receiver's point, serve_fault:short); a short service that touches the net is a fault, not a let. Not in the Laws: under the real restitution (revision 14/11) no robot body here can return 90 % of the services that bounce closer to the net (B9; the Embodied Olympics screening notes), so the receive would decide the game; the scripted opponent's serve library obeys the rule too"
affects_result = true

[formats.match]                       # one model seat against the scripted opponent inside the world (match.Match)
seats = ["A"]
opponent = true                       # success = winning a valid match (core/grading.py), as in the legacy task
levels = [1, 2, 3, 4]                 # the opponent level (RCB_LEVEL; default 1)
[formats.duel]
seats = ["A", "B"]
first = ["A", "B"]                    # the first server (ITTF 2.13, D11); the runner plays both orders

[modes]                               # the two modes (docs/construction_zh.md step 3; skilleval/README.md)
action_levels = ["high", "low"]       # high: the skill hit = the paddle state at contact (the stroke planner); low: joint targets
plays = ["program"]                    # direct (no-code) play: archived on branch archive/direct-play (2026-10-10)
b9_test = "test_b9_every_hit_request_is_feasible"   # robot and mode rule 2 for the hit skill (tests/test_tabletennis.py)

[modes.high]                          # Agent as Athlete: the platform provides the skill API
skills = ["hit"]                      # the high level's act {type: hit, t, pos, normal, vel} (also act, which may add base)
contract = "skill_api.py"             # CONTRACTS: request ranges, measurement, tolerances, success, authority, failure
implementation = "plugin.py:StrokeLayer"   # our implementation: the reference row of the low level's API test

[modes.low]                           # Agent as Robotics Engineer: the player implements the same skill API
implements = ["hit"]
toolkit = "seat/toolkit.toml"         # the manifest (skilleval/toolkit.py: sha256-checked)
toolkit_path = "/opt/robot/toolkit.toml"   # where the seat has it
tools = ["joint_interface", "robot_model", "robot_meshes", "ik_library", "servo_model"]
forbidden = ["hit"]                   # the core skill: never given at the low level
evaluator = "lowlevel/evaluator.py"   # hooks of skilleval/evaluate.py (API test, competition test)
reference = "lowlevel/reference"      # our hit from the toolkit only, with rehearsals on the servo model (rule 4)
boundary = "lowlevel/boundary"        # the IK block: IK to the requested pose + slew, no swing (rule 5)
reference_results = "lowlevel/reference_results.json"   # platform / reference / boundary rows (tools/skill_eval.py --record)
thresholds = { reference_min = 0.7, boundary_max = 0.05 }   # API-test success rates; the user's decision of 2026-10-13 (option C): both rows without execution scatter (the low level has none; evaluator.EXACT). Revision 15/12, 118 hidden requests (re-filtered: our implementation fulfils each in the full simulation): platform 118/118, reference 88/118 = 0.75 (Wilson 0.66-0.82), boundary 0/118. Same-conditions comparison on 179 cases (screening cmp2x2): platform 1.00 / 0.63 with the 1 cm scatter, reference 0.79 / 0.47; the reference never succeeds where the platform fails. Revision 13: 0.8 (reference 44/50)
eval_pip = ["scipy==1.18.1"]          # the evaluation image = the sim image + the seat's scipy (the deliverable may use it)
[modes.low.deliverable]               # robot and mode rule 10
path = "/app/output/skill/hit.py"
signature = "hit(t, pos, normal, vel, *, state, spec) -> one low-level command ({'type': 'traj', 'k0', 'q': rows of 9 targets} | {'type': 'slew', 'q', 'speed'} | {'type': 'hold'}) or None; the contact at control step state['step'] + round(t / 0.01) (in the API test the command takes effect at state['step']; in the match when your call returns, spec timing)"
optional = ["step(*, state, spec) -> a command or None (called every 20 ms between hits: the return to a ready pose, the base's position)"]
allowed = "numpy, scipy, mujoco, the toolkit under /opt/robot (robot_only.xml, assets, lib/tt_kinematics.py, lib/tt_servo.py) and files inside /app/output/skill; module-level memory between calls of one run; state = the low level's observe state (no images, no ball coordinates), spec = game spec's kinematics, limits, toolkit, skill_contract; no network, no other files, no other processes"
memory = "per_case"                   # API test: a fresh process per request; competition test: one process per match
time_limits_s = { load = 30, hit = 5, step = 1 }
[modes.low.cases]                     # skilleval/cases.py; rebuilt by `python3 lowlevel/evaluator.py record DIR` + `make-cases DIR`
hidden = "lowlevel/cases/hidden.jsonl.gz"   # simulator side only (the requests and their replay start states): never in the seat, not in generated tasks
public = "lowlevel/cases/public.jsonl"      # the practice subset (request, the robot's state, our implementation's plan)
practice_path = "/opt/robot/hit_cases_public.jsonl"
[modes.low.inloop]                    # the skill in the loop (skilleval/inloop.py; tools/generate.py: one skill container per seat)
skills = ["hit"]                      # the match's strokes are the player's own hit.py
step_every = 2                        # step() every 20 ms
free = ["toss"]                       # the service's toss at any time (its own rules: 409 when it is not your service)
noop = { type = "noop" }              # a failed hit changes nothing (TTMatch / TTDuel apply)
cpus = 1                              # the seat's skill container
memory = "2g"
reference_class = "builtin_players:SkillReference"   # the in-loop oracle: the camera-only reference's decisions sent as hit calls
raw_rule = "while a ball is in play (from a toss or a stroke until the point is decided: traj, slew and hold go through your hit); between points and before your toss you may send them"

[timing]
slowdown = 10                         # the official slowdown (RCB_SLOWDOWN; was 20 until 2026-10-14; badminton stays x20 this round)
start_timeout_s = 1800                # duel: up to 30 minutes to start after the first player
ready_timeout_s = 300                 # each review (after every point), else the side loses

[actions.cli]                         # the `game` shortcuts per action level (anything else: game act JSON)
high = { none = [] }
low = { hold = [] }

[seat]                                # every task's player image (the legacy tasks' OpenCV)
pip = ["opencv-python-headless==5.0.0.93"]
[seat.low]                            # the low action level's toolkit (seat/toolkit.toml 2.0.1): the robot's own model, MuJoCo, the kinematics library, the servo model
files = { "/opt/robot/robot_only.xml" = "seat/robot_only.xml", "/opt/robot/assets" = "sim/scene/assets", "/opt/robot/lib/tt_kinematics.py" = "seat/lib/tt_kinematics.py", "/opt/robot/lib/tt_servo.py" = "seat/lib/tt_servo.py", "/opt/robot/toolkit.toml" = "seat/toolkit.toml", "/opt/robot/hit_cases_public.jsonl" = "lowlevel/cases/public.jsonl" }
pip = ["mujoco==3.3.7", "absl-py==2.5.0", "etils==1.14.0", "fsspec==2026.9.0", "glfw==2.10.2", "PyOpenGL==3.1.10",
       "typing_extensions==4.16.0", "zipp==4.1.0"]   # = the sim image's MuJoCo and its closure (tests check the pin)
run = ["python -c \"import mujoco; m = mujoco.MjModel.from_xml_path('/opt/robot/robot_only.xml'); assert (m.nbody, m.njnt, m.nu) == (11, 9, 9)\"",
       "python -c \"import sys; sys.path.insert(0, '/opt/robot/lib'); import tt_kinematics as t, tt_servo; K = t.PaddleKinematics(); q, e = K.solve([0.0, -1.3, 0.3], normal=[0, 1, 0], q0=[0.286, 0.415, -0.906, -2.167, 1.277, 0.98, -1.048], base=[0.0, -1.75]); assert e < 1e-3, e; tt_servo.RobotSim()\""]
note = "Your robot's own model is /opt/robot/robot_only.xml (MJCF: the rail base, the arm and the paddle only, nothing of the world; meshes in /opt/robot/assets), with MuJoCo at the simulator's version. Your toolkit (/opt/robot/toolkit.toml) also holds two optional libraries: /opt/robot/lib/tt_kinematics.py (PaddleKinematics: forward kinematics and Jacobians of the 9 joints, damped least-squares IK of the blade centre and face normal with the base at a given position, the rail's go-to law) and /opt/robot/lib/tt_servo.py (RobotSim: your robot's own servo law on the robot-only model, to roll your joint targets out before you send them). There is no hit skill or stroke planner at this level: implementing hit(t, pos, normal, vel) is your engineering task, and your hit plays the match (the skill in the loop) (game spec skill_contract; the practice requests /opt/robot/hit_cases_public.jsonl: each the request, the robot's state and our implementation's plan). The hit contract: the blade centre at pos, its face normal along normal and its velocity vel at the contact step k_c = k_eff + round(t / 0.01) (k_eff: the step your hit's command takes effect); within 2 cm, 3 degrees, 0.15 m/s + 10 % of |vel| and 10 ms (the blade's closest pass to pos), with no refused command and no net contact"

[observation]
fields = ["point", "score", "ball", "t_since_played", "serve_in_s", "ball_in_play", "ball_state", "you_serve",
          "you_receive_serve", "serve",
          "q", "base_xy", "base_rest", "paddle_pos", "paddle_normal", "command", "qd", "q_target", "qd_target", "servo", "points", "shots",
          "heard"]
renderer = "mujoco"                   # the sport draws its own images (camera_job: a 4-frame history); see README
frame_budget_ms = 1500                # the legacy images (8 tiles 480 x 360, MuJoCo osmesa on CPU): about 0.1-0.2 s per tile, ~1.3 s per observation measured under host load (tiles cached between observations, same pixels)
columns = 4
# Since wallclock-6 / duel-wallclock-4 the arms are drawn with the Franka Panda's visual meshes (presentation/
# presentation.toml players = "25k", bundled into the simulator; renderer rule 6). Measured 2026-10-07 (8 new tiles,
# osmesa, host load 20-50 on 32 cores), median / p95 ms per observation at 2 llvmpipe threads: match scene 88 / 112,
# 25k meshes 161 / 182, full meshes 387 / 451 (1 thread: 148, 233, 564)
render_threads = 2                    # llvmpipe threads per render process (LP_NUM_THREADS); one render process per seat
sim_cpus = 6                          # the sim container: 2 seats x 2 render threads + the world, the planners and the core

[spec]                                # the rule constants and conventions (also in /spec and the prompt)
game_format = "first to 5 points; from 4:4 a lead of 2 is needed; at 6:6 the next point wins (7 at most)"
rules = "after exactly one bounce on your half, hit the ball once so that it lands on your opponent's half, directly or after touching the net (the upper table edges count, the vertical sides do not); the same holds for your opponent's returns. You lose the point for a volley, a double hit, two bounces, a miss, a ball that lands on your own half or out, the ball touching your arm or handle while it is over or travelling towards your half, or your robot or paddle touching the net assembly (touching the table is allowed). A shot that passes a player's half without touching it is out, even if it then hits that player's robot. The receiver's 13th good return in a rally wins it the point (expedite rule). At 40 points played (lets included) the player ahead wins, at a level score the player who won the last point"
serve = "the players serve (ITTF 2.6; state.you_serve, state.you_receive_serve, state.serve): you serve the first 2 points, your opponent the next 2, and so on; from 4:4 the service changes after every point (2.13.3; lets do not count). state.serve: phase waiting (the receiver is getting ready) -> open (0.8 s after the previous point; opens_in_s) -> tossed (tossed_at_step) -> done; court any (singles has no service court); deadline_in_s; detail, server, and for the server delay_faults and its own toss. The server must toss within 5 s of the serve opening (deadline_in_s), else it is a failed service (the receiver's point) and the third such fault loses the match. Toss: {type: toss, pos: [x, y, z], height} (both action levels; it takes effect like an act): the ball rests at pos for 0.1 s, then it is projected straight up with no spin to rise height metres above pos (0.16 <= height <= 1.0, Law 2.6.2: at least 16 cm); pos behind your end line and above the table (y <= -1.39, 0.02 <= z <= 0.9) and within 0.9 m of your base horizontally; until then the ball waits out of sight in your robot's column. Then strike it with your paddle (an act, which you may send before or after the toss, its contact time counted from when it takes effect as usual; state.serve.toss.projected_at_step tells when the ball leaves the device) as it falls, while it is still behind your end line and above the table; it must bounce on your court and then directly on your opponent's court, at least 0.2 m from the net (deviation D13: the ball's centre at that bounce; closer is a failed service, serve_fault:short, even if it touched the net). A service that touches the net and is otherwise good is a let (replayed), at most 2 in a row: your third service let since the last point scored is a failed service (your opponent's point, serve_fault:repeated_let; state.serve.lets_in_row counts them). Service faults are recorded as serve_fault:<reason>: <text> (docs/conventions/racket_serve_zh.md), reasons: undue_delay (no toss in time), dropped (the toss fell below the table unstruck), in_front (it came in front of the end line unstruck), position (other Law 2.6.4 breach), toss_touched (it touched something before the strike), not_projected (struck while resting), rising (struck while rising), double_hit, not_own_court (the first bounce was not on your court), out (after your court it missed the opponent's court), undecided (not decided within 3 s of the strike), robot_net (your robot touched the net assembly during the service; format match), repeated_let (your third service let in a row), short (the bounce on your opponent's court was closer than 0.2 m to the net, D13). It is a fault (your opponent's point) if the toss touches anything before your strike, you strike it while it rises or rests, it drops below the table or comes in front of the end line before you strike it, you strike it twice, or it does not bounce on your court and then on your opponent's court. If the receiver touches your service before it bounces on its court, the receiver loses the point (a let after a net touch). The receiver must return the service after its bounce like any other ball"
opponent = "format match: you serve first; the scripted opponent serves its turns (2.13.3): a toss from its end, then a serve from the official serve library (always legal: the legal services a Franka on a rail made under the real robot's limits, struck as the toss falls back through the strike point; level 1 draws from the easiest 25 % of the library - ranked by how low the ball bounces up on your court and how much spin it has: the easiest bounce highest with the least spin -, level 2 40 %, level 3 60 %, level 4 all). It returns every ball it can reach; it judges how wide and how fast your ball is and, for your service, also how short (a service it meets close to the net is harder; level 1 meets nothing nearer than 0.62 m from the net, level 4 0.45 m), and it moves faster for a service (it is ready for it: 0.65-1.05 m/s by level); higher levels react faster, reach further and play faster, wider balls with more spin (`match.opponent_level` in game spec). It obeys the same real limits as your robot: its paddle moves along its end line within the rail's 2 m/s, 8 m/s^2 and 200 m/s^3, and its shots stay within what the limited arm produces (at most 5.5 m/s off the paddle, 34 rad/s of spin, a blade speed of 2 m/s by the contact law)"
duel = "format duel: both players serve by the same rules; `match.first_server` serves the first 2 points; before every point both robots are put back at rest in the ready pose with their bases at home; both players get this document and see the game in their own frame"
world = "metres; your frame: x to your right, y towards the opponent, z up; table top z = 0, |x| <= 0.7625, |y| <= 1.37; net at y = 0, top z = 0.1525; your half y < 0; your robot faces +y on an x-y rail base behind your end line: base position base_xy (link0 at table-top height), travel |x| <= 1.0, -2.40 <= y <= -1.50, home (0, -1.75); up to 2 m/s, 8 m/s^2 and 200 m/s^3 per axis; the arm is a Franka Panda held to its real joint limits (velocity 2.175 / 2.61 rad/s, acceleration 15 / 7.5 / 10 / 12.5 / 15 / 20 / 20 rad/s^2, jerk 7500 / 3750 / 5000 / 6250 / 7500 / 10000 / 10000 rad/s^3, torque 87 / 12 N m, torque rate 1000 N m/s); its servo runs the arm at 0.9 of the velocity limits, and an arm joint faster than 1.05 x its limit triggers the robot's velocity reflex: it stops at that pose for 1 s, then resumes from rest (the stroke is lost; game spec limits.controller); its collision reflex does the same when the arm or paddle presses on the table with more than 20 N (touching the table is legal, D4, but the robot protects itself)"
ball = "radius 0.02 m, orange; gravity 9.81 m/s^2; air drag about 0.13 |v| v; spin bends the flight by a few cm; a bounce keeps about 90 % of the vertical and 87 % of the horizontal speed (a ball dropped from 30 cm bounces back to about 23 cm, ITTF 2.1.3); a ball takes about 0.6-0.9 s from the opponent to you"
reach = "the blade can meet a ball whose centre is within about 0.85 m of the shoulder (base_xy, z = 0.33) and above z = 0.12; the base moves the shoulder over the whole table width but never over the table (it stops 0.13 m behind the end line)"
blade = "15 x 15 cm; at contact its centre is 2.75 cm from the ball's centre along the face normal; with n the unit face normal the ball leaves with about v_out = v_paddle - 0.80((v_in - v_paddle).n)n + (v_in - v_paddle) - ((v_in - v_paddle).n)n"
observation = "observe: one PNG of 2 rows (camera behind your robot, camera at the side) x 4 columns (frames 40 ms apart, newest right) of 480 x 360 tiles, with each frame's control step (observation.view_steps); no ball coordinates; yellow marks every 0.25 m along the table edges; cameras' poses and intrinsics in game spec (pinhole, 45 degree vertical field of view, focal length 434.6 px, principal point at the tile centre)"
action_high = "high action level: act {type: act, t, pos, normal, vel, base?} = the blade's state at contact t seconds after the command takes effect (centre pos, face normal pointing at the opponent, velocity m/s) and optionally the base position [bx, by] at contact; limits 0 < t <= 2.5, |x| <= 2.0, -3.3 <= y <= -0.3, -0.5 <= z <= 1.5, speed <= 8 m/s, base within its travel; it replaces the stroke under way; the service moves the base (to `base`, else only as much as needed: the contact within 0.25 m sideways and 0.10 m in depth of the point 0.45 m in front of the base; arriving at rest 5 steps before the contact, or as far as it gets) and plans the swing within the real arm's limits (IK at that base position; a jerk-limited joint trajectory within the Panda's velocity, acceleration and jerk limits: a wind-up, a stroke started as late as the slowest joint allows, a follow-through; with too little time the best reachable contact, and the reply's speed_scale / plan_scale say how much of the blade speed the limits deliver; if the direct swing would pass through the table it comes down onto the contact from a pose 0.10 or 0.18 m above it - reply field approach); the reply predicts how close the arm gets; the delivered state scatters by about 1 cm, 1.5 degrees and 5 %; after the stroke the arm returns to its ready pose and the base to its rest position; {type: move, base: [bx, by]} sets that rest position (home again at each point); {type: none} returns the arm to its ready pose. Control authority: the service reads only your robot's own state (joints, targets, servo, base) and your command - never the ball or the opponent; it neither predicts the ball nor aims; its rehearsals run on a robot-only copy. Failure handling: a malformed or out-of-range act is refused (HTTP 400) and changes nothing; a contact time already passed when the act takes effect is not executed (reply stroke 'too late'; the stroke in force goes on); an unreachable pose, a blade speed beyond the joint limits or a base that cannot get there in time is executed as well as the limits allow and the reply says so (ik_residual, blade_error_m, normal_error_deg, speed_scale, base); a new act replaces the stroke under way (format duel: the plan is not rehearsed, and if the trajectory in force predicts a better contact at the new contact step it is kept, reply field kept)"
action_low = "low action level: joint position targets at 100 Hz for the base and the arm, no IK or stroke planner: traj {k0, q: rows of 9 targets [base_x, base_y, q1..q7]} (row i = control step k0 + i, <= 300 rows; consecutive rows within the per-step speed limit - 2 cm per base axis - and three consecutive rows within the acceleration limit: second difference <= acceleration limit x (10 ms)^2 - 8 m/s^2 per base axis, 15 / 7.5 / 10 / 12.5 / 15 / 20 / 20 rad/s^2 for q1..q7; the first row used must satisfy both with the target in force and its velocity), slew {q (9), speed} (every arm joint towards q at speed x its speed limit within its acceleration limit, the base towards q's base position at speed x 2 m/s with bounded acceleration and jerk), hold; the robot's 1 kHz servo follows the targets with a setpoint that never exceeds the real limits (velocity, acceleration, jerk; the arm's torques 87 / 12 N m changing by at most 1 N m per ms), so targets beyond them are followed late; game spec gives the kinematic chain (the base's two prismatic joints first), limits (limits.joint_accel_limit, joint_jerk_limit, the servo's law), the joint controller and the robot's own model (robot_model.robot_only_xml)"
real_time = "the world runs on its own clock at 1/S of real speed (S = timing.slowdown in game spec); it never waits for you; an act (or toss) takes effect at the next 10 ms control step after it arrives (the reply's took_effect); one act and one observation per seat in flight; after each point the world freezes until every player has sent game ready WHY PLAN"
scatter_and_seed = "the opponent's serves and returns and the execution scatter are drawn from the seed (RCB_SEED / DUEL_SEED)"

[score]                               # the continuous score (CONTRIBUTING "Freeze a sport"; screening 2026-10-11)
name = "point_share"
text = "points won / points played in the game (lets do not count)"
from = "share"
forfeit = 0.0
range = [0, 1]

[tiebreaks]
order = ["game"]
text = "a player's third undue-delay fault (no toss within 5 s of the serve opening) loses it the match; else the first player to 5 points with a lead of 2, or the first to 7, wins the game (the match); a let scores no point (at most 2 service lets in a row: the server's third is the receiver's point); if 40 points (lets included) are played, the player ahead wins and at a level score the player who won the last point (last resort, not from the rulebook)"
last_resort_in_prompt = true

[[exploits]]
id = "E1"
text = "an out-of-range, non-finite, too fast (speed or acceleration between rows) or malformed command is refused (HTTP 400) and changes nothing"
test = "test_exploit_bad_commands_are_refused"
[[exploits]]
id = "E2"
text = "a trajectory whose first row jumps beyond the joint speed limit from the target in force, or changes its velocity beyond the acceleration limit, is rejected; the previous command goes on and the simulator never sees the jump"
test = "test_exploit_discontinuous_start_is_rejected"
[[exploits]]
id = "E3"
text = "the observation holds no ball, opponent or seed state (only the cameras show the ball); /spec holds no seed"
test = "test_exploit_no_hidden_state"
[[exploits]]
id = "E4"
text = "a player that never moves loses every point it receives and never serves: its third undue-delay fault loses it the match (stalling gains nothing)"
test = "test_exploit_never_moving_loses"
[[exploits]]
id = "E5"
text = "the high action level adds no capability: every act and move is lowered to a low-level command that the low level's validator accepts (the same joint ranges, base travel and speed limits) and the episode, which holds only those commands, replays bit for bit"
test = "test_exploit_high_level_lowers_to_valid_low_level"
[[exploits]]
id = "E6"
text = "the robot's own model and kinematic chain given at the low level reproduce the simulator's robot (rail base and arm) and hold nothing of the world"
test = "test_exploit_robot_model_is_the_simulator_arm"
[[exploits]]
id = "E8"
text = "never serving does not pay: a player who never tosses faults on each of its services (undue delay) and its third such fault loses it the match, even when it is ahead on points"
test = "test_exploit_never_serving_is_disqualified"
[[exploits]]
id = "E9"
text = "the service is judged by the ITTF service laws only: the order of serving (2 each, one each from 4:4), toss limits refused (not your service or not yet: 409; in front of the end line, below the table, out of the device's reach, height out of range: 400), a dropped toss, a strike while the ball rises or rests, a wrong bounce sequence or a double strike is the receiver's point, a net touch on a good service is a let, a receiver obstructing the service loses the point; the receiver never sees the server's toss point (only the cameras)"
test = "test_exploit_serve_rules"
[[exploits]]
id = "E10"
text = "no command makes the robot exceed the real robot's limits: whatever the targets (rows at the speed limit that reverse every step, a slew, a hold after fast motion), the servo's setpoints stay within the arm's velocity, acceleration and jerk limits and the rail's, and the arm's torques within 87 / 12 N m changing by at most 1 N m per ms; the scripted opponent's paddle obeys the rail's limits and its shots stay within the real arm's envelope"
test = "test_exploit_real_limits_hold"
[[exploits]]
id = "E11"
text = "let stalling does not pay: a server who leads and then serves deliberate net lets (the same low-level service replayed from the same reset state, a let every time) gets at most 2 lets in a row; the third is the receiver's point (D12), so the game never reaches the 40-point guard (D8) through lets"
test = "test_exploit_let_stalling"
[[exploits]]
id = "E12"
text = "the low-level toolkit is what its manifest says (seat/toolkit.toml, skilleval/toolkit.py: the robot model, its meshes, the kinematics library and the servo model match their sha256 and versions; the seat ships exactly them); the libraries import nothing of the simulator; the kinematics library reproduces the simulator's paddle kinematics and its IK is deterministic; the servo model moves the robot exactly as the simulator does (no world contact)"
test = "test_exploit_toolkit_is_the_manifest"
[[exploits]]
id = "E13"
text = "the low level's API test: the seat gets only the public practice hit requests (the request, the robot's state and our plan; no world state, no seed); the hidden evaluation cases and their replay start states stay on the simulator side and are left out of the generated tasks (skilleval/cases.py, tools/sportlib.py)"
test = "test_exploit_hit_cases_hidden_stay_in_the_simulator"
[[exploits]]
id = "E14"
text = "the low level's deliverable (the final /app/output/skill/hit.py) is evaluated after the match in an isolated container (tools/skill_eval.py: no network, read-only, the skill as nobody) and in its own process (skilleval/sandbox.py: python -I, a scrubbed environment): it sees only what each call passes (no simulator, no ball state); a call that raises or overruns its time limit gives no command and is counted"
test = "test_exploit_hit_skill_runs_isolated"
[[exploits]]
id = "E15"
text = "skill in the loop ([modes.low.inloop], skilleval/inloop.py; a generated low task runs each seat's skill in its own skill container: no network, read-only, no simulator files): the core skill cannot be bypassed: while a ball is in play the low level refuses joint commands (409; toss at any time by its own rules) and accepts only hit, lowered by the player's own skill (on a private copy of its files, each call logged with their sha256, its compute counted in match time); a skill that fails lowers to a no-op; step() runs every 2 control steps; the episode holds the lowered commands, so it replays without the skill"
test = "test_exploit_skill_in_the_loop"


[players]
reference = "reference"               # Sport.players() names: camera-only (receiving), a rehearsed serve repertoire (serving), uses the base; wins the default configuration
reference_class = "builtin_players:Reference"
check = ["idle"]                      # the generic tests' check policy (never acts: every point ends quickly)

[fairness]
policy = "reference"                  # the camera-only reference on both seats (high level), seeds 1..N, both first servers
matches_per_order = 20                # the contract minimum: N = 40 (95% CI about +-15 pp; realtime: a wide CI only warns); an in-process duel takes 15-20 min on the shared host
max_advantage_pp = 5
mirror = "statistical"                # seat B is the mirrored world: floating-point physics is not bit-symmetric; the first server alternates (both orders)

[official]                            # grade.py computes official_config with the legacy per-format rule (README)
seeds = [1, 2, 3, 101, 111, 121, 202, 212, 222, 303, 313, 323, 404, 414, 424]
levels = [1, 2, 3, 4]
slowdowns = { program = [1, 2, 5, 10, 20] }
first_any = true

[official.hidden_seeds]                 # registered hidden seed set (tools/seeds.py; public commitments: seed_commitments.json)
sha256 = "27a0839b799c156c1d76293f31b7df2cd22fbcf94eda85b95f29a71e1d4eaab2"
counts = { "duel" = 20, "match/L1" = 20, "match/L2" = 20, "match/L3" = 20, "match/L4" = 20 }

[reference]                           # tools/check stage 5, the reference check (docs/screening/README.md)
match = "screen.reference:match"     # the shared hook (tools/screen/reference_hook.py): the step-4 loop (play.py, hooks.py; D = 5, high level)
seeds = 20                            # per official level; the screening record (r15final, seeds 1-40): truth 24/16/3/2 of 40, camera 21/16/7/0
camera_seeds = 5                      # the camera reference's playability report (L1 seeds 1-5)

[[reference.camera_wins]]             # model matches won with cameras only (screening step 5, revision 15)
format = "match"
level = 2
who = "GPT-6 Astra (Codex, program play)"
score = "6:4"
evidence = "docs/screening/tabletennis.md#revision-15-re-screen-2026-10-12"

[golden]
episodes = "golden"                   # recorded under the player-serve rules (revision 9/7); the legacy machine-serve records are retired (README)

[[tasks]]
id = "tabletennis-match-wallclock-program-standard"          # the Season-1 task name
format = "match"
action_level = "high"
play = "program"
[[tasks]]
id = "tabletennis-match-wallclock-program-lowlevel-standard"          # the Season-1 task name
format = "match"
action_level = "low"
play = "program"
[[tasks]]
id = "tabletennis-duel-wallclock-program-standard"          # the Season-1 task name
format = "duel"
action_level = "high"
play = "program"
[[tasks]]
id = "tabletennis-duel-wallclock-program-lowlevel-standard"          # the Season-1 task name
format = "duel"
action_level = "low"
play = "program"

[broadcast]                           # spectators: the replay video's camera (the whole table from the side, above)
camera = { name = "broadcast", pos = [4.4, 0.0, 2.2], lookat = [0.0, 0.0, 0.2], fovy_deg = 50, width = 640, height = 360 }

[capabilities]                        # docs/capabilities_zh.md §6
a1 = 2                                # 3D: the ball only from two cameras (triangulation, the contact point)
a2 = 2                                # dynamics: drag, spin, bounce, the contact law
a3 = 2                                # embodiment: the paddle state and the base (high) or base + joint targets with its own IK (low)
a4 = 1                                # real time: the world never waits; latency costs game time (re-screen 2026-10-12, revision 15: the sensitivity test kept A4 at L3 / L4 only, 40 seeds; secondary)
b1 = 1                                # rules: the ITTF point and service rules (toss, bounce sequence, order of serving, undue delay)
b2 = 2                                # strategy: placement away from the opponent (reading the opponent is not claimed: decision 2 of the 10-11 screening)
b3 = 0
physics = ["spin_bounce"]

[check]
stage_timeout_s = 21600               # stage 2 (~20 in-process matches) took ~75 min on a loaded shared host (4238 s on main without fine meshes); with player serves and the rail base it exceeded 1 h

# ---------------------------------------------------------------------------------------------------------------------
[self_collision]                       # real limits B0 (screening 2026-10-10, revision 12/10): the arm and paddle cannot
body = "franka_panda"                  # pass through the robot's own links or its column / carriage on the rail base;
                                       # bodies/franka_panda/body.toml [self_collision]; the pairs in the scenes below are
                                       # generated (python3 -m bodies.selfcollision scene sports/tabletennis), CI S4 compares
[[self_collision.scenes]]
scene = "sim/scene/tt_scene.xml"
robots = [{ prefix = "", suffix = "" }]
geoms = "physical"                     # the arm's meshes, the paddle, the base's column and carriage (on the rail base:
                                       # the bodies the arm stands on are part "body")
[[self_collision.scenes]]
scene = "sim/scene/tt_duel.xml"
robots = [{ prefix = "", suffix = "" }, { prefix = "", suffix = "_b" }]
geoms = "physical"