Skip to content

PTU action economy: ActionBudget models Full and conversions as independent buckets #359

Open

Description

@Teffa14

Rulebook conformance audit found a production legal-action gap in Java.

src/main/java/io/autoptu/core/rules/ActionBudget.java currently mirrors Python by treating every ActionType as an independent consumed bucket. ActionType.FULL is therefore independent from STANDARD and SHIFT, and the budget does not express Standard→Swift or Standard→Shift conversion.

AutobattlerActionSpace consumes this budget directly when generating legal Shift and Move choices, so this can affect authoritative AI/controller legality rather than only tests.

PTU 1.05/Kairos action economy requires:

  • one Standard, one Shift and one Swift Action per turn;
  • Full Action consumes Standard + Shift, not a separate independent resource;
  • Standard may be surrendered for an additional Swift;
  • Standard may be surrendered for an additional Shift;
  • the Standard→Shift conversion cannot be used for Movement if the regular Shift Action was already used for Movement, though it may still pay for non-movement Shift effects;
  • Free Actions remain uncapped numerically, while Trigger restrictions are handled separately;
  • Priority/Interrupt consumption needs its own lifecycle semantics rather than a free independent bucket.

Classification: RULE_LOGIC / likely PYTHON_RULEBOOK_DIVERGENCE pending exact Python resource audit.

Required implementation contract:

  1. Represent base Standard/Shift/Swift resources explicitly.
  2. Represent whether the regular Shift was used for Movement.
  3. Make Full availability/consumption atomic over Standard+Shift.
  4. Make Standard→Swift and Standard→Shift legal conversions explicit.
  5. Preserve extra actions as named rule grants rather than treating them as substitutes for every base resource by default.
  6. Update AutobattlerActionSpace to request rule-aware capacity, including whether a Shift choice is Movement.
  7. Freeze rulebook-derived tests independent of Python before differential parity.

This is high leverage because it affects action economy, legal-action generation, AI policy, Trainer/Pokémon action resolution, and later manual combat.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions