Vixen
caa30e12
csharp
public sealed class GoapPlanQueue

Resolves, queued and run a budget at a time.

Read the guide page for this →

Remarks

⚠ A GOAP resolve does not run on the frame that asked for it — doc 37 § D16, and exactly NavPathQueue's arrangement for exactly its reason. A behaviour-tree step is cheap and a utility score is bounded; a search over an action graph is neither, and an agent that changed its mind must not be able to spend the frame.

The world is read at Submit, on the thread that owns the agent. What reaches the search is a GoapSnapshot — a few arrays of numbers — so a resolve may run on a worker thread without touching a World or a Blackboard from it.

⚠ The per-frame cost is the two numbers together: how many resolves an Update runs, and what each of them may expand. Neither alone bounds anything, and a project that raises one should know it is raising the product.

A request whose plan is never taken holds its slot until the queue runs out and starts refusing new ones. Cancel is how an agent that changed its mind again gives the slot back.

Fields and properties (6)

  • public GoapDomain Domain

    The domain being searched.

  • public GoapSettings Settings

    What bounds a search.

  • public JobScheduler? Scheduler

    Where to run the searches, or null to run them on the caller's thread.

  • public int PendingCount

    How many requests are waiting or have not been taken.

  • public int LastResolves

    How many searches the last Update ran.

  • public int LastExpanded

    How many nodes the last Update expanded, across every search.

Methods (6)

Used by (3)

  • AiSystemVixen.Ai
  • GoapThroughputTestsVixen.Ai.Tests
  • SearchJobVixen.Ai