# V2 AI Director Psyche Hints

`V2AdaptiveAI` consumes `@psyche/behavior-prediction` through the
`@v2/psyche-ai-director-hints` service adapter.

## Consumption Modes

| Mode                                  | Psyche behavior                                               | V2 Adaptive AI behavior                                            |
| ------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------ |
| Non-rollback CPU modes                | Live per-player tendency hints stream during the match.       | `V2AdaptiveAI` applies hints as off-rollback AI Director input.    |
| Rollback-with-CPU defense-in-depth    | Hints are sampled once at match load.                         | `tendency-vector + seed` is serialized into match-start input.     |
| Mid-match update during rollback mode | The live Psyche RPC is rejected inside the rollback envelope. | Update is queued and applied at the next deterministic match load. |

## Determinism Boundary

V2 1v1 PvP rollback does not normally run CPU opponents, so live Psyche hint
consumption is a non-rollback path. If a future rollback-with-CPU mode ships,
`V2AdaptiveAI` uses only the match-load snapshot from
`@psyche/behavior-prediction`. `V2Netcode` treats the serialized tendency vector
as ordinary deterministic match-start input. No Psyche or AI Director gRPC is
allowed from a rollback frame. `V2/ue/Tools/check-rollback-determinism.py`
enforces that `V2Netcode` rollback code cannot reach `V2AdaptiveAI` or live
Psyche RPC reads.

The Unreal contract is carried by the `V2AdaptiveAI` plugin:

- `FV2AdaptiveAIBehaviorHintContract` declares the source package and rollback
  policy.
- `FV2AdaptiveAITendencyHint` holds live or sampled per-player hints.
- `FV2AdaptiveAIMatchStartInputVector` carries the deterministic
  `tendency-vector + seed` snapshot for rollback-with-CPU modes.
