Skip to content

Select replenishing hunts that can fund recovery #182

Description

@adrunkhuman

The supply-aware selector can choose a cheap but non-replenishing two-spawn pocket. A poor bot needs a repeatable hunt that earns gold, not an adjacent-point patrol that prevents normal respawns.

Observed failure

After #181 (branch revision 7e2eb49, merged as 3fe99eb), the normal Carlin-start soak selected a two-Troll pocket:

Evidence, 2026-09-09 UTC Value
Selection at 21:43:15 lowest_potion_consumption_then_xp
Atlas site/variant 14906939626827278936
Center (32459,32276,8)
Patrol endpoints (32458,32274,8) and (32459,32276,8)
Supplies / money at departure 2 potions; 100 carried gold + 32 bank gold
Budget 2 reserved, 0 routine; estimated consumption 1 potion; does not fit
Patrol after initial combat 291 waypoint arrivals from 21:44:47 to 21:49:12, with no new target selections during that loop

The adapter creates approach points near spawns and removes only exact duplicates. Its recurring-XP estimate uses spawn intervals without accounting for the bot blocking replenishment. Spawn::findPlayer / spawnMonster suppress ordinary respawns near players unless the monster ignores spawn blocking. The trace establishes unproductive pacing; it does not contain per-spawn rejection telemetry.

Local evidence: /tmp/playerbot-stuck-check.log. This file is not a portable artifact; the essential observations are recorded above. The soak is not a deterministic reproduction or a completed #148 benchmark.

Agreed direction

  • Keep isolated 2–3-spawn pockets as atlas building blocks, but do not offer them as standalone sustained hunts. They may contribute to a larger viable circuit. Do not add one-time-clear goals as the solution.
  • Require respawn-compatible movement for sustained hunts. Spawn count alone is not enough if the bot remains in blocking range of every spawn.
  • Start with gross coin gold per minute, estimated from static loot probabilities and expected sustained kills. Record actual collected coins separately. Exclude resale valuation and cost subtraction; never inspect unopened corpse contents.
  • When supplies are low and resupply is unaffordable, prefer gold income over XP among otherwise eligible hunts. Low potions alone must not trigger money farming when resupply is affordable.
  • Keep hunt facts separate from selection preferences so Add bounded progression preferences #173 can later adjust objectives above deterministic execution and hard safety gates. Do not implement personality in this issue.
  • Preserve Budget hunt supplies, prioritize Exura, and avoid transit fights #181's safety gates, emergency/route reserves, Exura priority, and transit behavior. Do not change potion thresholds or seed funds to hide this failure.
  • Keep selection town-independent, bounded, map-derived, and explainable. Do not hardcode rats, wolves, caves, or NPC names.

Next work and acceptance

  • Reject standalone 2–3-spawn pockets while retaining their membership in larger candidates. Define additional bounded geometry/timing criteria from actual atlas candidates; spawn count alone must not establish viability.
  • Test replenishment-compatible circuits and invalidation when patrol changes. Recreating the exact Carlin failure is not required.
  • Estimate sustained gross coin gold per minute and emit income, cash pressure, and viability facts in candidate telemetry; record verified coin acquisition and hunt income outcomes.
  • Add focused comparisons where a safe gold-producing hunt outranks an XP-focused alternative when recovery money is scarce. Preserve safety, supply-budget ordering, emergency/route reserves, and affordable-resupply behavior.
  • Run focused regressions and a normal soak; report productive combat, acquired coins, and any empty-patrol or no-candidate limitations. Do not claim sustainable 8–20 progression from fixture success.

Net profit, item resale, travel/service cost conversion, exact incident reconstruction, and the personality implementation are outside this iteration.

Start in server/src/playerbothuntregionadapter.cpp (candidate extraction/throughput), playerbothuntregions.h and playerbotsupplypolicy.h (ranking/budget), playerbotcombat.cpp (route reconciliation/patrol), and spawn.cpp (replenishment rules). Inspect existing loot valuation and sale planning before adding a parallel value model.

Related: #51 owns hunt strategy; #148 owns the controlled three-town 8–20 benchmark; #35 covers loot valuation/disposition; #46 covers recovery supplies. #181 is the implementation baseline, not completion of these contracts.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew or improved behaviorplayerbotServer-controlled player behavior and infrastructure

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions