Skip to content
TheChatArchiveThe Chat Archive
Qwenqwen3.6-plus-v1-webdev· Alibaba (Qwen)Hugging Face Arena WebDev Preferences (2026)

Now it adds the ability for long/medium-range weapons to appear and protections for the…

  1. User

    Now it adds the ability for long/medium-range weapons to appear and protections for the AIs. The AIs need to be able to know the location of items in the environment in order to pick them up, and they also need to know if they have an item or not, and which item they have.

  2. Qwen Assistant

    I'll significantly upgrade the state representation so agents have rich spatial awareness of pickups (direction, distance, type for up to two pickups), detailed self-inventory (weapon type + ammo level + armor level), and opponent gear knowledge. Let me first review the current state key:

    Now I'll rewrite the engine with a much richer state key that gives agents detailed spatial awareness of pickups and full inventory knowledge:

    Now I'll replace the entire stateKey method with a rich, informative encoding:

    Now let me fix the pickup distance filtering so the agent always sees all pickups:

    Now let me update the App to display richer inventory info (weapon, ammo, armor) in the agent panels. First I need to pass the fighter state through to the UI:

    Now I'll update the App — first the UiStats interface and setStats call, then the AgentPanel to display gear info:

    Now update the setStats call to include gear and state key info:

    Now update the AgentPanel calls to pass the new gear and state key props:

    Now update the AgentPanel component to accept and display the new props:

    Now let me replace the AgentPanel with an enhanced version that shows inventory and decoded state:

    Let me also update the explainer text to reflect the richer state features:

    Build clean. Here's what was added:

    Rich State Representation (16 features)

    The agents now perceive a much more detailed world. The state key encodes:

    #FeatureBucketsMeaning
    0Distance to opponent5Contact → very-far
    1Opponent direction2Left or right
    2Self ready to act2Free or busy (attacking/stunned)
    3Opponent threat3Safe / winding-up / actively striking or shooting
    4Opponent blocking2Blocking or open
    5Self airborne2Jumping or grounded
    6Health advantage3Losing / even / winning
    7Near wall2Edge danger or center safety
    8Self weapon3None / shuriken / pistol
    9Self ammo3Empty / low / high
    10Self armor3None / low / high
    11Opponent weapon3None / shuriken / pistol
    12Nearest pickup direction3None / behind me / in front of me
    13Nearest pickup type4None / pistol / shuriken / armor
    14Nearest pickup distance4None / on-top / close / far
    15Second pickup direction3None / behind / front

    Features 8–15 are the new ones — giving each AI complete knowledge of:

    • Exactly what they're carrying (weapon type + ammo level as fraction of max + armor tier)
    • What the opponent is carrying (so they can fear an armed opponent or play aggressively against an unarmed one)
    • Where every pickup is on the map (direction + distance + type for the nearest, direction for a second one)

    New UI: Inventory Panel + State Decoder

    Each agent panel now shows:

    • Inventory box with weapon icon, ammo bar, and armor shield bar — live-updating from the fighter state
    • "What the agent perceives" grid that decodes the 16-feature state key into human-readable labels (highlighted in amber for weapon features, sky-blue for pickup features)

    This means you can now watch the AI reason: if a shuriken spawns to its right, you'll see pDir: front→, pType: shuriken, pDist: close — and the next action is often forward to grab it.

    Files built: src/game/engine.ts, src/App.tsx

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.