Skip to main content

Payloads first

Define each option through payload parameters, such as tutorial steps, skipping and pacing. Read them with compiled defaults, for example d.GetInt("steps", 5). GetDecision always returns a result. A getter returns your default when there is no payload, the key is missing or the value has the wrong type. The same code serves every player: holdout, offline, timed out or tracking disabled. Use GetInt, GetFloat, GetBool and GetString for scalars; GetIntArray, GetFloatArray, GetBoolArray and GetStringArray for arrays; GetJson(key, default) for nested data.

Payload fields

The model reads each option’s payload as well as which option it is. What it learns about a value then carries to every option that has that value, including options you add later.
  • Number and yes/no fields: PIO always learns from them.
  • Choice, text, list and JSON fields: PIO learns from values that two or more options of the decision share. A value only one option has adds nothing beyond that option itself.
  • Lists of numbers reach the game but PIO does not learn from them yet.
Give a number field both a minimum and a maximum when it has a natural range, such as 0 to 100 for a discount. With both set, PIO scales values to that range. With one or neither, it reads them on a log scale. The dashboard checks each bound you set, which catches typos such as 6000 for 60. A decision can have at most 32 number and yes/no fields. Field changes reach the game at once and reach each model at its next training. Until then, existing options score exactly as before.

Decisions and options

A decision offers a fixed set of options: Tutorial might offer Short, Medium and Long, each with different parameter values. See the quickstart for the SDK naming. The model’s job is choosing among those options per player, using their payload fields. Action is a label for logs and debugging. Don’t use it to pick behaviour. Start small. A decision with three to five meaningfully different options learns faster than one with twenty near-duplicates. Add options as you learn which parameter values suit players. Choose the decision’s default option in the dashboard. Code generation records its key in PioActions.All as the decision’s FallbackAction. Register that fallback when initialising the SDK.

Add options without an app release

With a payload-first integration, adding an option in the dashboard needs no app release when it uses parameters and behaviour the game already supports. For models that have finished their first training, a new option goes live within a few minutes. A model waiting for its first training offers the option once that training completes. New behaviour that the game cannot express through existing parameters still needs an app release. See the quickstart for the integration flow and Decisions for payload reads and fallback handling.