Skip to content

11. Commands: check, explain, status

Three commands work with the file and with a running guard. They are not written in the file. The output in the examples is illustrative.

Command What it does
pse check FILE checks whether the file is valid
pse explain GUARD STEP explains the decision in one step
pse status GUARD shows the guard’s current state

Every decision has to be explainable. explain says which action was taken, which rule fired and which criteria moved the weights.

The example is step 5 from the collapse table in chapter 7:

$ pse explain payments 5
step 5 · guard payments · mode enforce
action: escalate human
fired:
built-in: w_o / w_s -> infinity (11.57 > L)
weights: w_s 0.07 w_o 0.81 w_f 0.12 theta 0.93
moved by:
pressure 0.82 -> w_s
authority 0.64 -> w_s
oscillation: unknown (window 5 of 10, no history)

How to read it:

  • action is what the guard did.
  • fired lists the rules that fired. built-in means the built-in rule.
  • weights are the weights in that step.
  • moved by lists the criteria that moved the weights most, and which weight.
  • oscillation is the oscillation verdict and which check ran.
$ pse status payments
guard payments · mode enforce · learn frozen
steps: 5
oscillation checks: window off (5 of 10), history off
verdict: unknown
attractors: none

status is the first place to look when the guard behaves unexpectedly. It shows whether the oscillation checks are on and whether learning is moving.

  1. check before every release of a file.
  2. The guard in observe mode.
  3. explain on the steps where the guard would block. If the reasons are good, switch to enforce.
  4. status from time to time, to see whether learning is moving.

Next: 12. What the check rejects Part of The PSE Language, a textbook by Andrej Ristić. Try the examples in the PSE Playground.