diff --git a/.github/workflows/games.yml b/.github/workflows/games.yml index ebee4f6..4aa0cfa 100644 --- a/.github/workflows/games.yml +++ b/.github/workflows/games.yml @@ -41,6 +41,7 @@ jobs: with: {python-version: '3.12'} - run: python -m pip install -e . - run: harbor run --game-suite minihack-balrog --standard --list + - run: harbor run --game-suite vex3 --standard --list - run: python game_first_exam/tests/test_game_harbor.py fresh-clone-smoke: runs-on: ubuntu-latest @@ -77,8 +78,50 @@ jobs: name: fresh-clone-room-evidence path: jobs/ retention-days: 7 + browser-game-smoke: + runs-on: ubuntu-latest + timeout-minutes: 35 + strategy: + fail-fast: false + matrix: + include: + - {suite: vex3, control: vex3/missed_jump} + steps: + - uses: actions/checkout@v4 + with: {persist-credentials: false} + - uses: actions/setup-python@v5 + with: {python-version: '3.12'} + - uses: docker/setup-docker-action@v5 + with: + version: v29.5.2 + set-host: true + daemon-config: '{"features":{"containerd-snapshotter":true}}' + - run: python -m pip install -e . + - name: Run the reference solution + env: + SUITE: ${{ matrix.suite }} + run: | + harbor run --game-suite "$SUITE" --standard -c configs/harbor/oracle.json \ + --jobs-dir "$PWD/jobs" --job-name browser-reference -y + python ci_checks/check-browser-game-result.py jobs/browser-reference 1 + - name: Run the failure control + env: + CONTROL: ${{ matrix.control }} + run: | + python "game_first_exam/tests/benchmarks/$CONTROL/run_harbor.py" + python ci_checks/check-browser-game-result.py jobs 0 + - uses: actions/upload-artifact@v4 + if: always() + with: + name: ${{ matrix.suite }}-smoke-evidence + path: | + jobs/*/result.json + jobs/*/*/artifacts/data/final.json + jobs/*/*/verifier/reward.json + jobs/*/*/trial.log + retention-days: 7 invariants: - needs: [static, adapters, harbor, fresh-clone-smoke] + needs: [static, adapters, harbor, fresh-clone-smoke, browser-game-smoke] if: ${{ always() }} runs-on: ubuntu-latest steps: @@ -87,4 +130,5 @@ jobs: ADAPTERS: ${{ needs.adapters.result }} HARBOR: ${{ needs.harbor.result }} SMOKE: ${{ needs.fresh-clone-smoke.result }} - run: test "$STATIC" = success && test "$ADAPTERS" = success && test "$HARBOR" = success && test "$SMOKE" = success + BROWSER_SMOKE: ${{ needs.browser-game-smoke.result }} + run: test "$BROWSER_SMOKE" = success && test "$STATIC" = success && test "$ADAPTERS" = success && test "$HARBOR" = success && test "$SMOKE" = success diff --git a/ci_checks/check-browser-game-result.py b/ci_checks/check-browser-game-result.py new file mode 100644 index 0000000..e37df34 --- /dev/null +++ b/ci_checks/check-browser-game-result.py @@ -0,0 +1,25 @@ +"""Verify the Harbor verdict from a browser game's reference or control run.""" +import json +import sys +from pathlib import Path + + +def check(trial_dir, expected): + paths = ( + trial_dir.glob("*/verifier/reward.json") if expected == 1 else + (path for path in trial_dir.glob("*/*/verifier/reward.json") + if path.parents[2].name != "browser-reference") + ) + rewards = list(paths) + if len(rewards) != 1: + raise ValueError(f"Expected one verifier result under {trial_dir}, found {len(rewards)}") + reward = json.loads(rewards[0].read_text()) + errors = ("infra_error", "sim_error", "environment_error") + if (not reward.get("result_valid") or any(reward.get(key) != 0 for key in errors) + or reward.get("steps", 0) <= 0 or reward.get("success") != expected): + raise ValueError(f"Expected a valid result with success={expected}: {reward}") + print(f"{rewards[0]}: success={expected}, steps={reward['steps']}") + + +if __name__ == "__main__": + check(Path(sys.argv[1]), int(sys.argv[2])) diff --git a/configs/game_benchmarks.toml b/configs/game_benchmarks.toml index 8f77b59..9cc8bfe 100644 --- a/configs/game_benchmarks.toml +++ b/configs/game_benchmarks.toml @@ -14,3 +14,6 @@ schema = "game_first_exam/benchmarks/babaisai/instance_schema.py" [benchmarks.minihack] schema = "game_first_exam/benchmarks/minihack/instance_schema.py" + +[benchmarks.vex3] +schema = "game_first_exam/benchmarks/vex3/instance_schema.py" diff --git a/configs/game_suites/vex3.toml b/configs/game_suites/vex3.toml new file mode 100644 index 0000000..b21f1ab --- /dev/null +++ b/configs/game_suites/vex3.toml @@ -0,0 +1,10 @@ +schema_version = "game-suite/2.1" +version = "1.0.0" +tier = "smoke" +name = "games-vex3-minimal-v1.0.0" +files_images = ["connection-files", "game-files", "vex3-files"] + +[[tasks]] +name = "vex3-act-one-i01-standard" +benchmark = "vex3" +family = "act-one" diff --git a/docs/demos/vex3/act-one-clear.mp4 b/docs/demos/vex3/act-one-clear.mp4 new file mode 100644 index 0000000..1633d0d Binary files /dev/null and b/docs/demos/vex3/act-one-clear.mp4 differ diff --git a/docs/demos/vex3/missed-jump.mp4 b/docs/demos/vex3/missed-jump.mp4 new file mode 100644 index 0000000..d1a3eae Binary files /dev/null and b/docs/demos/vex3/missed-jump.mp4 differ diff --git a/game_first_exam/benchmarks/vex3/adapter.py b/game_first_exam/benchmarks/vex3/adapter.py new file mode 100644 index 0000000..3b3161f --- /dev/null +++ b/game_first_exam/benchmarks/vex3/adapter.py @@ -0,0 +1,144 @@ +"""Play the first numbered Vex 3 act using keyboard input and native outcomes.""" +from base64 import b64decode +from contextlib import ExitStack +from datetime import datetime, timedelta, timezone +from io import BytesIO +from pathlib import Path +from urllib.parse import unquote, urlsplit + +import numpy as np +from PIL import Image +from playwright.sync_api import sync_playwright + +from contracts import Capabilities, Transition +from encoding import png, state_hash + +KEYS = { + "wait": (), + "right": ("ArrowRight",), + "left": ("ArrowLeft",), + "jump": ("ArrowUp",), + "jump_right": ("ArrowRight", "ArrowUp"), + "jump_left": ("ArrowLeft", "ArrowUp"), + "slide": ("ArrowRight", "ArrowDown"), +} +ORIGIN = "http://vex.test" + + +class Adapter: + def __init__(self, instance, assets=None): + self.resources = ExitStack() + try: + self.start((Path(assets) / "game").resolve()) + except BaseException: + self.close() + raise + + def start(self, root): + driver = self.resources.enter_context(sync_playwright()) + browser = driver.chromium.launch(args=["--mute-audio"]) + self.resources.callback(browser.close) + self.page = browser.new_page(viewport={"width": 800, "height": 600}) + + def serve(route): + url = urlsplit(route.request.url) + path = (root / unquote(url.path).lstrip("/")).resolve() + if url.netloc == "vex.test" and path.is_relative_to(root) and path.is_file(): + route.fulfill(path=path) + else: + route.abort() + + self.page.route("**/*", serve) + self.cdp = self.page.context.new_cdp_session(self.page) + start = datetime(2025, 1, 1, tzinfo=timezone.utc) + self.page.clock.install(time=start) + self.page.clock.pause_at(start + timedelta(seconds=1)) + self.page.goto(ORIGIN + "/index.html?level=1", wait_until="domcontentloaded") + for _ in range(1000): + self.page.clock.run_for(64) + self.state = self.page.evaluate("() => window.gameAPI?.getState()") + if self.state and self.state["is_actionable"] and str(self.state["game_state"]["level"]) == "1": + break + else: + raise RuntimeError(f"Act 1 did not open: {self.state}") + if self.state["metrics"]["deaths"] != 0: + raise RuntimeError("Act 1 opened after a death") + # The player spawns above the floor. Anchor the opening to first contact. + for _ in range(120): + player = self.state["game_state"]["player"] + if player and player["state"] == "0" and player["vx"] == player["vy"] == 0: + break + self.page.clock.run_for(16) + self.state = self.page.evaluate("gameAPI.getState()") + if self.done(): + raise RuntimeError("Act ended before the player reached the floor") + else: + raise RuntimeError(f"Act 1 did not settle at spawn: {player}") + # The same grounded player can leave the 30 Hz Phaser accumulator + # at different offsets after loading. Start each episode at one + # fixed offset so a 64 ms action produces the same native ticks. + self.page.evaluate("() => { window.__vex3Game._deltaTime = 44 / 3; }") + self.capture() + + def spec(self): + return { + "adapter_version": "1.0.0", + "capabilities": Capabilities(True, "enum").to_dict(), + "action_schema": {"type": "string", "enum": list(KEYS)}, + "goal": "Finish Act 1 without dying.", + } + + def success(self): + return (str(self.state["game_state"]["level"]) == "1" and + self.state["metrics"]["deaths"] == 0 and self.state["terminal"]["outcome"] == "success") + + def done(self): + return self.state["terminal"]["isTerminal"] or self.state["metrics"]["deaths"] > 0 + + def step(self, action): + if self.done() or action not in KEYS: + raise ValueError("Expected a legal action in a live act") + for key in KEYS[action]: + self.page.keyboard.down(key) + try: + for _ in range(4): + self.page.clock.run_for(16) + self.state = self.page.evaluate("gameAPI.getState()") + if self.done(): + break + finally: + for key in KEYS[action]: + self.page.keyboard.up(key) + self.capture() + return Transition(float(self.success()), self.done()) + + def metrics(self): + metrics = self.state["metrics"] + return { + "deaths": metrics["deaths"], + "checkpoints_passed": metrics["checkpoints_passed"], + "success": int(self.success()), + } + + def fingerprint(self): + board = self.state["game_state"] + return state_hash({ + "level": board["level"], + "player": board["player"], + "deaths": self.state["metrics"]["deaths"], + "success": int(self.success()), + }) + + def capture(self): + data = self.cdp.send("Page.captureScreenshot", {"format": "png"})["data"] + with Image.open(BytesIO(b64decode(data))) as image: + self.rgb = np.array(image.convert("RGB")) + + def observe(self): + return {"image_png_base64": png(self.rgb)} + + def frame(self): + return self.rgb + + def close(self): + self.resources.close() diff --git a/game_first_exam/benchmarks/vex3/instance_schema.py b/game_first_exam/benchmarks/vex3/instance_schema.py new file mode 100644 index 0000000..062c3c7 --- /dev/null +++ b/game_first_exam/benchmarks/vex3/instance_schema.py @@ -0,0 +1,13 @@ +SCHEMA_VERSION = "1.0.0" +BENCHMARK = "vex3" +FIELDS = {"engine_commit"} +METRICS = {"success"} +PROFILES = {"native-rgb-v1"} +REDUCERS = {("family_macro", "1.0.0")} + + +def validate(value): + if value["seed"] != 42 or value["engine_commit"] != "e5ddb16df85b91a1d17bb0577621cc7c5e65d738": + raise ValueError("unknown GameWorld-Games version") + if (value["env_id"], value["family"], value["max_steps"]) != ("vex-3", "act-one", 1500): + raise ValueError("unknown GameWorld task configuration") diff --git a/game_first_exam/benchmarks/vex3/metric_rules.py b/game_first_exam/benchmarks/vex3/metric_rules.py new file mode 100644 index 0000000..388982c --- /dev/null +++ b/game_first_exam/benchmarks/vex3/metric_rules.py @@ -0,0 +1,18 @@ +def validate_metrics(final, instance): + metrics = final["metrics"] + deaths = metrics["deaths"] + if type(deaths) is not int or deaths < 0: + raise ValueError("Invalid native death count") + checkpoints = metrics["checkpoints_passed"] + if type(checkpoints) is not int or not 0 <= checkpoints <= 4: + raise ValueError("Invalid native checkpoint count") + success = metrics["success"] + if type(success) is not int or success not in (0, 1): + raise ValueError("Invalid native success flag") + won = success == 1 + if won and deaths: + raise ValueError("Act 1 requires a deathless finish") + if final["terminated"] != bool(won or deaths): + raise ValueError("Terminal flag disagrees with native result") + if final["success"] != won or final["return"] != float(won): + raise ValueError("Reward disagrees with native result") diff --git a/game_first_exam/benchmarks/vex3/requirements.txt b/game_first_exam/benchmarks/vex3/requirements.txt new file mode 100644 index 0000000..70da3b9 --- /dev/null +++ b/game_first_exam/benchmarks/vex3/requirements.txt @@ -0,0 +1,5 @@ +playwright==1.55.0 +numpy==1.26.4 +pillow==10.4.0 +imageio-ffmpeg==0.6.0 +imageio==2.37.0 diff --git a/game_first_exam/images/vex3-files/FILES.json b/game_first_exam/images/vex3-files/FILES.json new file mode 100644 index 0000000..7dadced --- /dev/null +++ b/game_first_exam/images/vex3-files/FILES.json @@ -0,0 +1,10 @@ +{ + "source": "game_first_exam/benchmarks/vex3", + "files": { + "adapter.py": "b9bc530426cf8f8712786a3bb4c55545a32980e71ec301d0d9448c81a10fc2b2", + "instance_schema.py": "a999b2c2d4e27914f92d8db1d9eb67949c6c73bc71bb8575957e246b6e412fa0", + "metric_rules.py": "9765b7395cbc73570c99b18a738864fbda3439fc5ea1eb96396cb1aa1f52f2c1", + "requirements.txt": "f7b63cd5e9d2d806613a620bb7340f27ce6735ba76c9d5a08f77d48e527d4733" + }, + "image": "ghcr.io/mll-lab-nu/efe:vex3-files-0.1.0@sha256:e1eb278ee4601219ca01e409b7b3759ffed8771c65a7300422bac5e192eb2ae6" +} diff --git a/game_first_exam/images/vex3-files/VERSION b/game_first_exam/images/vex3-files/VERSION new file mode 100644 index 0000000..6e8bf73 --- /dev/null +++ b/game_first_exam/images/vex3-files/VERSION @@ -0,0 +1 @@ +0.1.0 diff --git a/game_first_exam/tasks/vex3/README.md b/game_first_exam/tasks/vex3/README.md new file mode 100644 index 0000000..17e7a17 --- /dev/null +++ b/game_first_exam/tasks/vex3/README.md @@ -0,0 +1,19 @@ +# Vex 3 Act 1 + +The standard task loads the first numbered act from the pinned GameWorld browser game. The agent sees RGB screenshots and uses movement, jumps, and slides. A deathless finish scores one, and the first death ends the attempt with a score of zero. Checkpoints are recorded as a secondary metric. + +The adapter pauses between actions. Once the player lands at spawn, it fixes the 30 Hz Phaser clock phase so the same 64 ms input interval advances the same native updates across runs. + +Run the reference and failure control from the repository root. + +```sh +harbor run --game-suite vex3 --standard -a oracle -y +python game_first_exam/tests/benchmarks/vex3/missed_jump/run_harbor.py +``` + +| Replay | Native result | +| --- | --- | +| [Act 1 clear](../../../docs/demos/vex3/act-one-clear.mp4) | Four checkpoints and zero deaths | +| [Missed opening jump](../../../docs/demos/vex3/missed-jump.mp4) | One death | + +[Vex 3 source and rights notice](https://github.com/gameworld-project/GameWorld-Games/tree/e5ddb16df85b91a1d17bb0577621cc7c5e65d738/benchmark/30_vex-3) diff --git a/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/DIGEST b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/DIGEST new file mode 100644 index 0000000..524c22b --- /dev/null +++ b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/DIGEST @@ -0,0 +1 @@ +sha256:5bed0e3c1f1a7dc29d54ffb1a3fecb3944a9921eafa73a6b5f65d82bfc3aae3a diff --git a/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/README.md b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/README.md new file mode 100644 index 0000000..4b05bc6 --- /dev/null +++ b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/README.md @@ -0,0 +1,35 @@ +# vex3-act-one-i01-standard + +| | | +|---|---| +| Benchmark | GameWorld Vex 3 | +| Mode | standard (`game-standard/2.2`) | +| Twin | — (none: GameWorld Vex 3 has no privileged mode, PROTOCOL §2) | +| Simulator / robot | `vex3` / `game-agent` | +| Family / instance | `act-one` / seed 42 | +| Oracle | `full` | +| Agent time budget | 600 s; tokens: protocol default (docs/protocol/running.md "Official runs") | +| Base image | `docker.io/library/python:3.12.10-slim-bookworm@sha256:fd95fa221297a88e1cf49c55ec1828edd7c5a428187e67b5d1805692d11588db` | + +## Task +Clear the first numbered act in one life using keyboard input. + +## Difficulty +Time jumps over rotating saws, slide underneath a spiked overhang, and climb to the exit using the level's walls and ziplines. The first death ends the attempt. + +## Reference solution +See `solution/`. + +## Verification +The simulator reads GameWorld's native completion event and death count. The isolated verifier validates the terminal state and awards one point for a deathless clear of Act 1. + +## Resources +Caps per container (PROTOCOL §6). + +| Container | CPUs | Memory | Processes | GPU memory | Disk | +|---|---|---|---|---|---| +| `main` (the agent's) | 1 | 1 GiB | 256 | no GPU | 2 GiB | +| `sim` | 1 | 1 GiB | 128 | no GPU | — | +| verifier (as `main`) | 1 | 1 GiB | no cap | no GPU | 2 GiB | + +- GPU: not needed. diff --git a/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/environment/Dockerfile b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/environment/Dockerfile new file mode 100644 index 0000000..10dcc84 --- /dev/null +++ b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/environment/Dockerfile @@ -0,0 +1,9 @@ +FROM docker.io/library/python:3.12.10-slim-bookworm@sha256:fd95fa221297a88e1cf49c55ec1828edd7c5a428187e67b5d1805692d11588db +RUN apt-get update && apt-get install -y --no-install-recommends bash curl git nodejs npm ca-certificates \ + && rm -rf /var/lib/apt/lists/* +RUN npm install -g @openai/codex@0.167.1 && npm cache clean --force +COPY --from=ghcr.io/mll-lab-nu/efe:game-files-0.6.0@sha256:bfb708928954d5cc194a614ab772a65b1e56f381b49dfeb2227c3d609e5f2ecc /game_client.py /app/game_client.py +COPY --from=ghcr.io/mll-lab-nu/efe:connection-files-0.1.0@sha256:6d1002dea6ca507b4148d3196e233838e645b33bcfa9a27ae4a43027ae519999 /service_connection.py /app/service_connection.py +ENV PYTHONUNBUFFERED=1 PYTHONPATH=/app +RUN mkdir -p /app/output +WORKDIR /app diff --git a/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/environment/docker-compose.yaml b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/environment/docker-compose.yaml new file mode 100644 index 0000000..7fa17b4 --- /dev/null +++ b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/environment/docker-compose.yaml @@ -0,0 +1,43 @@ +services: + main: + pids_limit: 256 # rcb-monitor + volumes: # rcb-monitor + - rcb_limits:/run/rcb-limits:ro # rcb-monitor + depends_on: [sim] + sim: + cpus: 1 # rcb-monitor + mem_limit: 1024m # rcb-monitor + pids_limit: 128 # rcb-monitor + volumes: # rcb-monitor + - rcb_observe:/run/rcb-observe:ro # rcb-monitor + build: + context: sim + dockerfile: Dockerfile + working_dir: /srv + command: python3 /srv/server.py + environment: + RCB_WALL_CLOCK_S: "600" + # >>> rcb_monitor (resource monitor, PROTOCOL §6; generated by images/monitor/rcb_monitor/inject.py) + rcb_monitor: + image: ghcr.io/mll-lab-nu/efe:monitor-0.5.0@sha256:ecc5f24f1516ca11711d7c2d3ac07c89f79cd9220812c1244498ec71e352402a + pid: host + cgroup: host + network_mode: none + cap_add: [SYS_PTRACE] + cpus: 0.5 + mem_limit: 256m + pids_limit: 64 + restart: on-failure + working_dir: /var/rcb-monitor + volumes: + - ./rcb_monitor/limits.json:/opt/rcb_monitor/limits.json:ro + - rcb_limits:/run/rcb-limits + - rcb_observe:/run/rcb-observe + environment: + RCB_LIMITS_ENFORCE: ${RCB_LIMITS_ENFORCE:-0} + RCB_LIMITS_TOLERANCE: ${RCB_LIMITS_TOLERANCE:-0.05} + command: ["python3", "/opt/rcb_monitor/monitor.py", "run"] + # <<< rcb_monitor +volumes: # rcb-monitor + rcb_limits: # rcb-monitor + rcb_observe: # rcb-monitor diff --git a/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/environment/rcb_monitor/limits.json b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/environment/rcb_monitor/limits.json new file mode 100644 index 0000000..7df0040 --- /dev/null +++ b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/environment/rcb_monitor/limits.json @@ -0,0 +1,26 @@ +{ + "agent_timeout_sec": 600, + "caps": { + "main": { + "cpus": 1.0, + "disk_gb": 2.0, + "memory_gb": 1.0, + "pids": 256 + }, + "sim": { + "cpus": 1.0, + "memory_gb": 1.0, + "pids": 128 + } + }, + "disk_gb": 2.0, + "disk_tick_sec": 60, + "format": "rcb-limits/2", + "gpu": false, + "mode": "standard", + "scope_services": [ + "main" + ], + "task": "vex3-act-one-i01-standard", + "tick_sec": 5 +} diff --git a/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/environment/sim/Dockerfile b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/environment/sim/Dockerfile new file mode 100644 index 0000000..4394711 --- /dev/null +++ b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/environment/sim/Dockerfile @@ -0,0 +1,18 @@ +FROM docker.io/library/python:3.12.10-slim-bookworm@sha256:fd95fa221297a88e1cf49c55ec1828edd7c5a428187e67b5d1805692d11588db +ENV PYTHONUNBUFFERED=1 +COPY --from=ghcr.io/mll-lab-nu/efe:vex3-files-0.1.0@sha256:e1eb278ee4601219ca01e409b7b3759ffed8771c65a7300422bac5e192eb2ae6 /requirements.txt /srv/requirements.txt +RUN apt-get update && apt-get install -y --no-install-recommends git ca-certificates && rm -rf /var/lib/apt/lists/* +RUN pip install --no-cache-dir -r /srv/requirements.txt +COPY --from=ghcr.io/mll-lab-nu/efe:game-files-0.6.0@sha256:bfb708928954d5cc194a614ab772a65b1e56f381b49dfeb2227c3d609e5f2ecc /server.py /srv/server.py +COPY --from=ghcr.io/mll-lab-nu/efe:game-files-0.6.0@sha256:bfb708928954d5cc194a614ab772a65b1e56f381b49dfeb2227c3d609e5f2ecc /reducers.py /srv/reducers.py +COPY --from=ghcr.io/mll-lab-nu/efe:game-files-0.6.0@sha256:bfb708928954d5cc194a614ab772a65b1e56f381b49dfeb2227c3d609e5f2ecc /config_schema.py /srv/config_schema.py +COPY --from=ghcr.io/mll-lab-nu/efe:game-files-0.6.0@sha256:bfb708928954d5cc194a614ab772a65b1e56f381b49dfeb2227c3d609e5f2ecc /contracts.py /srv/contracts.py +COPY --from=ghcr.io/mll-lab-nu/efe:game-files-0.6.0@sha256:bfb708928954d5cc194a614ab772a65b1e56f381b49dfeb2227c3d609e5f2ecc /encoding.py /srv/encoding.py +COPY --from=ghcr.io/mll-lab-nu/efe:game-files-0.6.0@sha256:bfb708928954d5cc194a614ab772a65b1e56f381b49dfeb2227c3d609e5f2ecc /recording.py /srv/recording.py +COPY --from=ghcr.io/mll-lab-nu/efe:vex3-files-0.1.0@sha256:e1eb278ee4601219ca01e409b7b3759ffed8771c65a7300422bac5e192eb2ae6 /adapter.py /srv/adapter.py +RUN python -m playwright install --with-deps --only-shell chromium +RUN git init /tmp/upstream && cd /tmp/upstream && git remote add origin https://github.com/gameworld-project/GameWorld-Games.git && git sparse-checkout init --cone && git sparse-checkout set benchmark/30_vex-3 && git fetch --depth=1 --filter=blob:none origin e5ddb16df85b91a1d17bb0577621cc7c5e65d738 && git checkout --detach FETCH_HEAD && mv benchmark/30_vex-3 /srv/game && rm -rf /tmp/upstream +COPY --from=ghcr.io/mll-lab-nu/efe:vex3-files-0.1.0@sha256:e1eb278ee4601219ca01e409b7b3759ffed8771c65a7300422bac5e192eb2ae6 /instance_schema.py /srv/instance_schema.py +COPY instance.json /srv/instance.json +WORKDIR /srv +CMD ["python3", "/srv/server.py"] diff --git a/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/environment/sim/instance.json b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/environment/sim/instance.json new file mode 100644 index 0000000..1904ee7 --- /dev/null +++ b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/environment/sim/instance.json @@ -0,0 +1,25 @@ +{ + "schema_version": "game-instance/2.2", + "protocol": "game-standard/2.2", + "adapter_version": "1.0.0", + "capabilities": { + "images": true, + "action_mode": "enum", + "timing": "action-stepped", + "native_truncation": false + }, + "benchmark": "vex3", + "env_id": "vex-3", + "family": "act-one", + "seed": 42, + "max_steps": 1500, + "engine_commit": "e5ddb16df85b91a1d17bb0577621cc7c5e65d738", + "initial_state_sha256": "3852adf0c4e3ecbaa330477c70b184934972c484568355fa1e8f8cac4cd4d4a2", + "observation_profile": "native-rgb-v1", + "metric_spec": { + "primary": "success", + "reducer": "family_macro", + "reducer_version": "1.0.0", + "success_label": "act_one_clear" + } +} diff --git a/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/instruction.md b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/instruction.md new file mode 100644 index 0000000..635270e --- /dev/null +++ b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/instruction.md @@ -0,0 +1,27 @@ +# Vex 3 + +Finish Act 1 without dying. Use wait, left, right, jump, jump_right, jump_left or slide. Use the RGB screenshot to choose when to jump, slide, or change direction. Each step holds its keys for up to 64 ms. A death ends the run. A deathless clear earns one point. Death or running out of the 1,500 actions earns zero. + +Use the live service through `/app/game_client.py`: + +```python +from game_client import GameClient +game = GameClient() +print(game.spec()) +obs = game.observe() +print(obs["observation"]) +# obs = game.step(action, expected_step=obs["step"]) +``` + +The public envelope contains step, done, steps_remaining and time_left_s. Each action requires the current expected_step and a request_id; the client creates an ID if omitted. Retry a lost response only with the same ID and identical payload. The service deduplicates it without advancing the environment again. Only spec, observe, status and submit are available. Agent-written output files do not determine scores. + +## External material +The network is open. You may install packages (pip, apt), and you may search for, download and use public tools, robot models and pretrained controllers: finding existing work and adapting it to this task is encouraged. Say in your notes what you used. You may read anything installed in your container, this benchmark's own source code included. The one thing not to look up is a ready-made solution to this exact task, such as this benchmark's reference solutions. This is an honour rule; trials are reviewed. + +## Resources +Your container: **1 CPUs**, **1 GiB of memory**, **256 processes and threads** and **2 GiB** of disk (new files under `/app`, `/tmp` and `/root`). Your container has no GPU. The simulator runs in its own container and does not count against these. CPU only slows you down; a process that goes over any other cap can be killed. Usage and caps: `/run/rcb-limits/usage.json`. + +## Time limit +You have 600 seconds to complete this task. Do not cheat by using online solutions or hints specific to this task. + +This is wall-clock time from the start of your session; the time you wait for the simulator service counts. When it is up you are stopped without warning and the episode is graded as it stands at that moment. The service's `time_left_s` counts the same limit from your first request to the service, so it never runs out before your time does: your real time left is `time_left_s` minus the time you spent before that request. Plan by it. Your session started when you received this task. `/run/rcb-limits/usage.json`, rewritten every few seconds, gives the time left on this limit (`time_left_s`) and its end (`deadline_utc`), counted from a little before your session started, so it never gives you more time than you have: read it (or run `date`) before you decide that time is short, never guess. Waiting counts too: a tool call that sends input to a process that keeps running (an interactive interpreter, a simulator loop, a server) can wait for the whole wait or yield time you give it even when the answer is printed at once, so give such calls a short wait and poll again if the output is not complete, or run one-shot scripts that exit when they are done. Installing packages is not cheating (`## External material` above). diff --git a/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/solution/route.json b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/solution/route.json new file mode 100644 index 0000000..3b623a9 --- /dev/null +++ b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/solution/route.json @@ -0,0 +1,90 @@ +[ + "right", "right", "right", "right", "right", "right", "right", "right", + "right", "right", "right", "jump_right", "right", "right", "right", "right", + "right", "right", "right", "right", "right", "right", "right", "left", + "wait", "wait", "wait", "wait", "right", "right", "right", "right", + "right", "right", "slide", "slide", "slide", "slide", "slide", "slide", + "slide", "slide", "slide", "slide", "slide", "slide", "right", "right", + "right", "right", "right", "right", "right", "wait", "wait", "wait", + "wait", "wait", "wait", "wait", "wait", "wait", "wait", "wait", + "wait", "wait", "wait", "wait", "jump_left", "jump_left", "jump_left", "jump_left", + "slide", "slide", "slide", "slide", "slide", "slide", "slide", "right", + "right", "right", "right", "right", "right", "right", "right", "right", + "right", "right", "right", "right", "right", "right", "right", "jump_right", + "jump_right", "jump_right", "jump_right", "jump_right", "slide", "slide", "slide", "slide", + "slide", "slide", "wait", "wait", "wait", "wait", "wait", "wait", + "jump_right", "jump_right", "jump_right", "jump_right", "jump_right", "jump_right", "jump_right", "jump_right", + "jump_right", "jump_right", "jump_right", "jump_right", "jump_right", "jump_right", "jump_right", "jump_right", + "jump_right", "jump_right", "jump_right", "jump_right", "jump_right", "jump_right", "jump_left", "jump_left", + "jump_left", "jump_left", "jump_left", "jump_left", "jump_left", "jump_left", "jump_left", "jump_left", + "jump_left", "left", "left", "left", "jump_left", "jump_left", "jump_left", "jump_left", + "jump_left", "left", "left", "left", "left", "left", "left", "left", + "left", "left", "left", "left", "left", "jump_left", "jump_left", "jump_left", + "left", "left", "left", "left", "left", "left", "left", "left", + "left", "left", "left", "left", "left", "left", "left", "left", + "left", "left", "left", "left", "wait", "wait", "wait", "wait", + "wait", "left", "left", "left", "left", "left", "left", "left", + "left", "left", "left", "left", "left", "wait", "wait", "wait", + "wait", "wait", "wait", "wait", "wait", "wait", "wait", "wait", + "wait", "left", "left", "left", "left", "left", "left", "wait", + "wait", "wait", "wait", "wait", "wait", "wait", "wait", "wait", + "wait", "wait", "wait", "left", "left", "left", "left", "left", + "left", "left", "left", "left", "left", "left", "left", "left", + "left", "jump_left", "jump_left", "jump_left", "left", "wait", "wait", "wait", + "wait", "wait", "wait", "wait", "wait", "wait", "wait", "wait", + "wait", "wait", "wait", "wait", "wait", "wait", "wait", "wait", + "wait", "wait", "wait", "wait", "wait", "slide", "slide", "slide", + "left", "left", "left", "left", "left", "left", "left", "left", + "left", "left", "left", "left", "left", "jump_left", "jump_left", "jump_left", + "jump_left", "jump_left", "jump_left", "jump_left", "wait", "wait", "wait", "wait", + "wait", "wait", "wait", "wait", "wait", "wait", "wait", "wait", + "wait", "wait", "wait", "wait", "wait", "wait", "wait", "wait", + "wait", "jump_left", "jump_left", "jump_left", "jump_left", "jump_left", "jump_left", "left", + "left", "left", "left", "jump_left", "jump_left", "jump_left", "jump_left", "jump_left", + "jump_left", "left", "left", "left", "left", "left", "left", "left", + "left", "left", "left", "left", "left", "wait", "wait", "wait", + "wait", "wait", "wait", "wait", "wait", "wait", "wait", "wait", + "wait", "wait", "wait", "wait", "wait", "wait", "wait", "jump_left", + "jump_left", "jump_left", "jump_right", "jump_right", "jump_right", "jump_right", "jump_right", "slide", + "slide", "slide", "left", "left", "left", "left", "left", "left", + "left", "jump_left", "jump_left", "jump_left", "jump_left", "wait", "wait", "wait", + "wait", "wait", "wait", "wait", "wait", "wait", "slide", "slide", + "right", "right", "jump_right", "jump_right", "jump_right", "jump_right", "jump_right", "jump_right", + "jump_right", "wait", "wait", "wait", "wait", "wait", "wait", "wait", + "wait", "wait", "wait", "wait", "wait", "wait", "wait", "wait", + "wait", "wait", "wait", "wait", "wait", "wait", "wait", "wait", + "wait", "wait", "wait", "jump_right", "jump_right", "jump_right", "jump_right", "jump_right", + "jump_right", "jump_right", "jump_right", "left", "left", "left", "left", "left", + "left", "left", "left", "left", "left", "left", "left", "left", + "left", "left", "wait", "wait", "left", "left", "left", "left", + "left", "left", "left", "left", "left", "left", "left", "jump_right", + "jump_right", "jump_right", "jump_right", "jump_right", "jump", "jump", "jump", "jump", + "jump_right", "jump_right", "left", "left", "left", "left", "left", "jump_right", + "jump_right", "jump_right", "jump_right", "jump_right", "jump_right", "jump_right", "jump_right", "jump_right", + "left", "left", "left", "left", "left", "left", "left", "jump_left", + "left", "left", "left", "left", "left", "left", "left", "left", + "left", "left", "left", "left", "left", "jump_left", "jump_left", "jump_left", + "jump_left", "left", "left", "jump_left", "left", "left", "left", "left", + "left", "left", "wait", "left", "left", "right", "wait", "wait", + "wait", "wait", "wait", "wait", "right", "right", "right", "right", + "right", "right", "right", "wait", "right", "wait", "right", "right", + "wait", "right", "right", "wait", "right", "wait", "right", "right", + "wait", "right", "left", "left", "left", "left", "wait", "wait", + "wait", "wait", "wait", "wait", "wait", "wait", "right", "right", + "right", "right", "right", "right", "right", "right", "right", "right", + "right", "right", "right", "right", "right", "jump_right", "right", "right", + "right", "right", "wait", "wait", "wait", "wait", "wait", "wait", + "wait", "wait", "wait", "wait", "wait", "wait", "wait", "wait", + "wait", "wait", "wait", "wait", "wait", "wait", "wait", "wait", + "wait", "wait", "wait", "wait", "wait", "wait", "wait", "wait", + "wait", "right", "right", "right", "right", "right", "right", "right", + "jump", "wait", "wait", "wait", "wait", "wait", "wait", "right", + "right", "right", "right", "right", "right", "right", "right", "right", + "right", "right", "right", "right", "right", "right", "right", "right", + "right", "right", "right", "right", "right", "right", "right", "right", + "right", "right", "right", "right", "right", "right", "right", "right", + "right", "right", "right", "right", "right", "right", "right", "right", + "right", "right", "right", "right", "right", "right", "right", "right", + "right", "right", "right", "right", "right", "right", "right", "right", + "right", "right", "right" +] diff --git a/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/solution/solve.py b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/solution/solve.py new file mode 100644 index 0000000..c6ea020 --- /dev/null +++ b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/solution/solve.py @@ -0,0 +1,10 @@ +import json +from pathlib import Path +from game_client import GameClient + +game = GameClient() +state = game.observe() +for move in json.loads(Path(__file__).with_name("route.json").read_text()): + if state["done"]: + break + state = game.step(move, expected_step=state["step"]) diff --git a/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/solution/solve.sh b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/solution/solve.sh new file mode 100755 index 0000000..a856bf7 --- /dev/null +++ b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/solution/solve.sh @@ -0,0 +1,3 @@ +#!/bin/bash +set -euo pipefail +exec python3 /solution/solve.py diff --git a/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/task.toml b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/task.toml new file mode 100644 index 0000000..5753e2b --- /dev/null +++ b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/task.toml @@ -0,0 +1,58 @@ +schema_version = "1.3" +artifacts = [{ source = "/var/rcb-monitor/", service = "rcb_monitor" }, { source = "/data/final.json", service = "sim" }, + { source = "/data/episode.jsonl", service = "sim" }, + { source = "/data/recording.json", service = "sim" }, + { source = "/data/replay.mp4", service = "sim" }, + { source = "/data/replay.last.png", service = "sim" }, + "/app/output/", +] + +[task] +name = "embodied-first-exam/vex3-act-one-i01-standard" +description = "Clear Vex 3 Act 1 in one life." +keywords = ["game", "vex3", "platformer", "timing", "standard-mode"] + +[metadata] +task_type = "trajectory" +simulator = "vex3" +robot = "game-agent" +family = "act-one" +dynamics = "static" +protocol = "game-standard/2.2" +oracle = "full" +instance_seed = 42 +expert_time_estimate_hours = 0.5 + +[verifier] +timeout_sec = 120.0 +environment_mode = "separate" +network_mode = "no-network" + +# Resources (PROTOCOL §6): seal the monitor's record first. +[[verifier.collect]] +service = "rcb_monitor" +command = "python3 /opt/rcb_monitor/monitor.py seal --wait 90" +timeout_sec = 120 + +[[verifier.collect]] +service = "main" +command = "kill -9 -1 2>/dev/null; exit 0" +timeout_sec = 30 + +[[verifier.collect]] +service = "sim" +command = "kill -USR1 $(cat /data/server.pid); i=0; while [ ! -f /data/collection.ready ] && [ $i -lt 30 ]; do sleep 1; i=$((i+1)); done; test -f /data/collection.ready && test -f /data/final.json" +timeout_sec = 40 + +[agent] +timeout_sec = 600.0 +network_mode = "public" + +[environment] +build_timeout_sec = 1200.0 +cpus = 1 +memory_mb = 1024 +storage_mb = 2048 + +[verifier.env] +RCB_LIMITS_ENFORCE = "${RCB_LIMITS_ENFORCE:-0}" diff --git a/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/tests/Dockerfile b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/tests/Dockerfile new file mode 100644 index 0000000..a9ec7eb --- /dev/null +++ b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/tests/Dockerfile @@ -0,0 +1,11 @@ +FROM docker.io/library/python:3.12.10-slim-bookworm@sha256:fd95fa221297a88e1cf49c55ec1828edd7c5a428187e67b5d1805692d11588db +COPY test.sh instance.json /tests/ +COPY --from=ghcr.io/mll-lab-nu/efe:game-files-0.6.0@sha256:bfb708928954d5cc194a614ab772a65b1e56f381b49dfeb2227c3d609e5f2ecc /grade.py /tests/grade.py +COPY --from=ghcr.io/mll-lab-nu/efe:game-files-0.6.0@sha256:bfb708928954d5cc194a614ab772a65b1e56f381b49dfeb2227c3d609e5f2ecc /reducers.py /tests/reducers.py +COPY --from=ghcr.io/mll-lab-nu/efe:game-files-0.6.0@sha256:bfb708928954d5cc194a614ab772a65b1e56f381b49dfeb2227c3d609e5f2ecc /config_schema.py /tests/config_schema.py +COPY --from=ghcr.io/mll-lab-nu/efe:vex3-files-0.1.0@sha256:e1eb278ee4601219ca01e409b7b3759ffed8771c65a7300422bac5e192eb2ae6 /instance_schema.py /tests/instance_schema.py +COPY --from=ghcr.io/mll-lab-nu/efe:vex3-files-0.1.0@sha256:e1eb278ee4601219ca01e409b7b3759ffed8771c65a7300422bac5e192eb2ae6 /metric_rules.py /tests/metric_rules.py +RUN chmod +x /tests/test.sh +# resources (PROTOCOL §6) # rcb-monitor +COPY --from=ghcr.io/mll-lab-nu/efe:monitor-0.5.0@sha256:ecc5f24f1516ca11711d7c2d3ac07c89f79cd9220812c1244498ec71e352402a /opt/rcb_monitor/rcb_limits.py /tests/rcb_limits.py +COPY rcb_limits.json /tests/rcb_limits.json diff --git a/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/tests/instance.json b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/tests/instance.json new file mode 100644 index 0000000..1904ee7 --- /dev/null +++ b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/tests/instance.json @@ -0,0 +1,25 @@ +{ + "schema_version": "game-instance/2.2", + "protocol": "game-standard/2.2", + "adapter_version": "1.0.0", + "capabilities": { + "images": true, + "action_mode": "enum", + "timing": "action-stepped", + "native_truncation": false + }, + "benchmark": "vex3", + "env_id": "vex-3", + "family": "act-one", + "seed": 42, + "max_steps": 1500, + "engine_commit": "e5ddb16df85b91a1d17bb0577621cc7c5e65d738", + "initial_state_sha256": "3852adf0c4e3ecbaa330477c70b184934972c484568355fa1e8f8cac4cd4d4a2", + "observation_profile": "native-rgb-v1", + "metric_spec": { + "primary": "success", + "reducer": "family_macro", + "reducer_version": "1.0.0", + "success_label": "act_one_clear" + } +} diff --git a/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/tests/rcb_limits.json b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/tests/rcb_limits.json new file mode 100644 index 0000000..7df0040 --- /dev/null +++ b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/tests/rcb_limits.json @@ -0,0 +1,26 @@ +{ + "agent_timeout_sec": 600, + "caps": { + "main": { + "cpus": 1.0, + "disk_gb": 2.0, + "memory_gb": 1.0, + "pids": 256 + }, + "sim": { + "cpus": 1.0, + "memory_gb": 1.0, + "pids": 128 + } + }, + "disk_gb": 2.0, + "disk_tick_sec": 60, + "format": "rcb-limits/2", + "gpu": false, + "mode": "standard", + "scope_services": [ + "main" + ], + "task": "vex3-act-one-i01-standard", + "tick_sec": 5 +} diff --git a/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/tests/test.sh b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/tests/test.sh new file mode 100755 index 0000000..0cf878a --- /dev/null +++ b/game_first_exam/tasks/vex3/vex3-act-one-i01-standard/tests/test.sh @@ -0,0 +1,6 @@ +#!/bin/bash +rm -rf /logs/verifier/* +trap 'p=$(command -v python3 || command -v python); "$p" /tests/rcb_limits.py verify' EXIT # resources, after the grader (PROTOCOL §6) +p=$(command -v python3 || command -v python); "$p" /tests/rcb_limits.py sanitize /app/output || true # untrusted agent files (PROTOCOL H.1) +mkdir -p /logs/verifier +python3 /tests/grade.py 2>/logs/verifier/grade.log diff --git a/game_first_exam/tests/benchmarks/vex3/exported.toml b/game_first_exam/tests/benchmarks/vex3/exported.toml new file mode 100644 index 0000000..99b9c8a --- /dev/null +++ b/game_first_exam/tests/benchmarks/vex3/exported.toml @@ -0,0 +1,7 @@ +[protocols] +standard = ["game-standard/2.2"] + +[[tasks]] +name = "vex3-act-one-i01-standard" +source_task = "GameWorld-30-Act1" +protocol = "game-standard/2.2" diff --git a/game_first_exam/tests/benchmarks/vex3/missed_jump/run_harbor.py b/game_first_exam/tests/benchmarks/vex3/missed_jump/run_harbor.py new file mode 100644 index 0000000..e71d12b --- /dev/null +++ b/game_first_exam/tests/benchmarks/vex3/missed_jump/run_harbor.py @@ -0,0 +1,33 @@ +import json +import shutil +import subprocess +import sys +import tempfile +from pathlib import Path + + +def main(): + root = Path.cwd() + prepare = root / "scripts/prepare_games.py" + if not prepare.is_file(): + raise SystemExit("Run this script from the Game Exam repository root.") + staging = root / "jobs/prepared" + staging.mkdir(parents=True, exist_ok=True) + run = Path(tempfile.mkdtemp(prefix="vex3-missed-jump-", dir=staging)) + config = run / "control.json" + subprocess.run([sys.executable, str(prepare), "--suite", "vex3", "--output", str(config)], + check=True) + rows = json.loads(config.read_text())["tasks"] + if len(rows) != 1: + raise RuntimeError("Expected one Vex 3 task.") + task = Path(rows[0]["path"]).resolve() + if not task.is_relative_to(run) or task.name != "vex3-act-one-i01-standard": + raise RuntimeError("Expected a staged copy of Vex 3 Act 1.") + shutil.copyfile(Path(__file__).with_name("solve.py"), task / "solution/solve.py") + subprocess.run([sys.executable, str(root / "scripts/stamp_mtimes.py"), "--full", str(task)], check=True) + subprocess.run(["harbor", "run", "-c", str(config), "-a", "oracle", + "--jobs-dir", str(root / "jobs"), "-y"], check=True) + + +if __name__ == "__main__": + main() diff --git a/game_first_exam/tests/benchmarks/vex3/missed_jump/solve.py b/game_first_exam/tests/benchmarks/vex3/missed_jump/solve.py new file mode 100644 index 0000000..98e42a1 --- /dev/null +++ b/game_first_exam/tests/benchmarks/vex3/missed_jump/solve.py @@ -0,0 +1,6 @@ +from game_client import GameClient + +game = GameClient() +state = game.observe() +while not state["done"]: + state = game.step("right", expected_step=state["step"]) diff --git a/game_first_exam/tests/test_game_harbor.py b/game_first_exam/tests/test_game_harbor.py index e6e71f6..3993ade 100644 --- a/game_first_exam/tests/test_game_harbor.py +++ b/game_first_exam/tests/test_game_harbor.py @@ -32,13 +32,13 @@ class GameSelection(unittest.TestCase): def test_game_only_default_and_all_selection_never_launches(self): for flags, expected in ((["--list", "--standard"], 30), - (["--all", "--standard", "--list"], 42)): + (["--all", "--standard", "--list"], 43)): with self.subTest(flags=flags), contextlib.redirect_stdout(io.StringIO()) as output, \ patch("efe.harbor") as launch, patch("efe.prepull") as pull: self.assertEqual(efe.run(flags), 0) names = output.getvalue().splitlines() self.assertEqual(len(names), expected) - self.assertTrue(all(name.startswith(("minigrid-", "crafter-", "textworld-", "babaisai-", "minihack-")) + self.assertTrue(all(name.startswith(("minigrid-", "crafter-", "textworld-", "babaisai-", "minihack-", "vex3-")) for name in names)) launch.assert_not_called() pull.assert_not_called() diff --git a/scripts/task_conventions.py b/scripts/task_conventions.py index 36b7e5c..6e61c9d 100644 --- a/scripts/task_conventions.py +++ b/scripts/task_conventions.py @@ -73,6 +73,7 @@ # ci_checks/ci_scope.py --check holds its UNITS / FILES_IMAGE to it. A new benchmark adds one row here. BENCHMARK_TABLE = [ ("minihack-", "MiniHack", "minihack"), + ("vex3-", "GameWorld Vex 3", "vex3"), ("babaisai-", "Baba Is AI", "babaisai"), ("crafter-", "Crafter", "crafter"), ("textworld-", "TextWorld", "textworld"), diff --git a/scripts/task_resources.toml b/scripts/task_resources.toml index f5e2106..c1ee29c 100644 --- a/scripts/task_resources.toml +++ b/scripts/task_resources.toml @@ -9,7 +9,7 @@ measured = "CPU-only initial integration; caps chosen conservatively, to be meas # Initial CPU-only game integration caps; measure before increasing concurrency. [[cap]] -match = "^(crafter|textworld|babaisai)-.*-standard$" +match = "^(crafter|textworld|babaisai|vex3)-.*-standard$" main = { cpus = 1, memory_gb = 1, pids = 256, disk_gb = 2 } sim = { cpus = 1, memory_gb = 1, pids = 128 } measured = "Initial integration caps; CPU only, fixed-model evaluation"