10. Learning and extensions
Three lines change what the guard carries inside: learn sets how fast it learns, and add adds attractors and games.
learn: how fast the guard learns
Section titled “learn: how fast the guard learns”The guard slowly learns how much each criterion weighs in the w_o / w_f split. The learn line limits that learning.
guard learner learn: max 0.01learn: frozen: criterion weights do not change. This is the default.learn: max NUMBER: one learned weight may change by at most NUMBER in one step. The number is above 0 and at most 1.
Why there is an upper limit
Section titled “Why there is an upper limit”A guard that learns can be poisoned. A patient attacker sends messages that each move a weight a little, until the guard starts reading situations differently.
The limit slows that down and makes it visible. With learn: max 0.01, moving one weight by 0.5 takes at least 50 steps. That is enough time to see the shift with the status command.
When to use frozen
Section titled “When to use frozen”- During measurement and comparison, so that two runs give the same result.
- When you suspect someone is poisoning the learning.
- Until you have seen how the guard behaves in
observemode.
add attractor: one more attractor
Section titled “add attractor: one more attractor”The four base attractors are always on. When some behavior needs separate analysis, a new one is added:
guard extended add attractor learned-helplessness add game stag-hunt on learned-helplessness: modify on dwell(learned-helplessness) -> infinity: escalate humanThe name learned-helplessness is illustrative. The add line only turns the attractor on. Its formula must already exist in the PSE library.
An added attractor is used like a base one: as a rule condition and inside dwell(...).
add game: one more game
Section titled “add game: one more game”add game NAME adds a game to the set PSE uses to estimate the counterpart’s behavior. Here too the formula must exist in the library. The name stag-hunt is illustrative.
There is no remove
Section titled “There is no remove”The language has no command for removal. You cannot turn off a base attractor, and you cannot empty the game set. What you added yourself you remove by deleting the add line from the file.
Next: 11. Commands: check, explain, status Part of The PSE Language, a textbook by Andrej Ristić. Try the examples in the PSE Playground.