game2player / README.md
multimodalart's picture
multimodalart HF Staff
Upload folder using huggingface_hub
021e8d0 verified
|
Raw History Blame Contribute Delete
1.93 kB
---
title: Game2Player
emoji: 🎮
colorFrom: red
colorTo: gray
sdk: gradio
sdk_version: 6.32.0
app_file: app.py
short_description: Visual game-playing agent — screenshot + task to next action
python_version: "3.12"
startup_duration_timeout: 30m
---
# Game2Player — Visual Game-Playing Agent
**Game2Player: Scaling Gameplay Experience for Visual Agents through Environment-Player Co-Development**
([paper](https://arxiv.org/abs/2611.24154) · [code](https://github.com/game2player/Game2Player))
This Space runs the released **Game2Player-9B** checkpoint (a Qwen3.5-9B fine-tune) with
transformers, replicating the authors' serving recipe — bf16, ≤1,048,576 pixels per
screenshot, thinking disabled, temperature 1.0 — and their PlayerBench prompt and
action decoder, both ported 1:1 from the official repository.
Give the model a **game screenshot** and a **task description** (plus the game's rules
and allowed keys), and it returns the next keyboard or mouse action as a
`computer_use` tool call, decoded to a canonical action and drawn on the screenshot:
click coordinates, drag segments, key presses.
The bundled examples are real tasks from **PlayerBench**, the paper's benchmark:
screenshots captured from the benchmark's own games (`107_simon-sequence` and
`105_memory-match`, Apache-2.0), with the exact game-rule, role, and control strings
from the benchmark's task definitions.
## Usage
1. Pick an example, or upload your own screenshot and describe the task and rules.
2. Hit **Predict next action**.
3. The red crosshair on the output image is where the agent would click; the action
summary line shows the decoded action (pixel and normalized 0–1000 coordinates).
The model is trained on a 1280×720 viewport; any input image is rescaled by the
processor to the training pixel budget. Coordinates in the raw tool call are
normalized 0–1000 and mapped back to the viewport by the decoder.