Skip to content

FFA hunter: let an unarmed bot go find loot instead of waiting to see it (dormant, default unchanged) - #78

Open
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1788745752-ffa-hunter-seek-loot
Open

FFA hunter: let an unarmed bot go find loot instead of waiting to see it (dormant, default unchanged)#78
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1788745752-ffa-hunter-seek-loot

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

An unarmed hunter can only take a weapon that is already in its observation: bestFfaGun iterates client.spriteObjectsWithLabel(...), vision is a cone around aim, and the hunter holds a band at 0.85 of the ring (~800px from center in the frame data), so the central loot cluster is usually not visible at all. The result, measured over 1200 clean hosted seat-rows on GV46 in a ladder-representative field: 35% of hunter seat-episodes never pick up a weapon for the entire game, and mean weapon tier while alive is flat at 0.62 from 30s to 105s, while the leaders climb past 1.2 by 90s (meyer never-arms 4%, rshadow 3%, jbr 10%).

This adds the missing behavior — walk to where loot is when you have nothing and can't see any — as an opt-in branch. Defaults are unchanged, so with the flags unset hunterFfaIntent behaves exactly as today; no src/ file and no GameVersion change.

CTF_BOT_FFA_HUNTER_SEEK_LOOT=0                 # off
CTF_BOT_FFA_HUNTER_SEEK_LOOT_MAX_SEC=60        # clamp 1..300
CTF_BOT_FFA_HUNTER_SEEK_LOOT_STOP_RADIUS=200   # clamp 0..2000
CTF_BOT_FFA_HUNTER_SEEK_LOOT_VISION_RADIUS=1200 # clamp 240..8000

Shape, in the unarmed tail of hunterFfaIntent (so precedence stays heal > pursue > visible-gun loot trip > seek):

let gun = bestFfaGun(client, me, center, ringRadius, weaponTier,
  FfaHunterArmSafeMargin,
  (if FfaHunterSeekLoot: FfaHunterSeekLootVisionRadius   # was always the 240px trip cap
   else: FfaHunterArmTripMaxDetourRadius), actors)
if gun.found: ...                                       # unchanged trip
elif FfaHunterSeekLoot and not bot.ffaSeekDone and dist(me, center) > stopRadius:
  phase "SEEK" / objective "seek_loot" / moveTarget = center

Two details worth calling out:

  • The widened radius is half the change. Walking toward center is useless if a gun that enters the cone 400px away is still rejected by the 240px trip cap, so while seeking, the visible-gun search uses the seek radius instead. The safeMargin and the actor-proximity veto on the gun itself are untouched, and the 240px cap still applies when the flag is off.
  • ffaSeekDone latches the abort. Without it the timeout and stop-radius conditions are inert: clearing ffaSeekLoot alone means the next tick starts a fresh seek with a fresh timer, so MAX_SEC bounds nothing and a bot that reaches the stop radius gets pushed back out by the 0.85 band target and re-seeks — dithering between center and band for the rest of its unarmed life. The latch clears when the bot becomes armed and on resetTransient, so a new life re-enables seeking and nothing else does. Two tests cover exactly this non-rearming.

Behavior, homogeneous 12-seat GV46 lobbies, seeds 42-53, 144 seat-episodes per arm (score is meaningless in a homogeneous lobby; behavior is not):

arm never-arm median first weapon mean tier at 30s median death
flag off 0.243 ± 0.036 7.8s 0.70 49.8s
flag on 0.139 ± 0.029 11.3s 1.37 67.8s

Paired never-arm delta -0.104 ± 0.043 (outside 2 SE). Median first-weapon time gets later because the arm now includes seats that previously never armed at all.

Shipped dormant: a hosted gate in a representative field decides whether this is worth activating, and the ladder entrant stays aaln-br-hunter:v2 until it clears.

Link to Devin session: https://app.devin.ai/sessions/274a6b4a46034710a7a81a2a81dc02dc
Open in Devin Desktop: https://app.devin.ai/desktop/session/274a6b4a46034710a7a81a2a81dc02dc?variant=devin
Requested by: @aaln

Aaron Landy and others added 2 commits September 7, 2026 02:05
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant