Skip to content

7. infinity

The core idea of the language: if the result of any calculation tends to infinity, something is wrong. That is why the word infinity is part of the language.

A program never sees infinity. It only sees growth. So the definition is finite and checkable:

X -> infinity is true when X passes the bound L, or when X rises N steps in a row.

L and N are fixed numbers from the specification. They are not written in the file and are the same in every installation. In this textbook L is 10 and N is 5.

Every guard has one rule that is not written and cannot be turned off:

on ANY_TRACKED_QUANTITY -> infinity: escalate human

Tracked are the weights, θ, the eight criteria, dwell of every attractor, the ratios w_o / w_s and w_s / theta, and every quantity the file mentions.

Every failure has to be written as a quantity that diverges. There are three shapes.

1. Runaway. The quantity itself keeps rising. Example: pressure over six steps.

Step pressure Rises in a row -> infinity
1 0.10 0 no
2 0.14 1 no
3 0.19 2 no
4 0.25 3 no
5 0.32 4 no
6 0.40 5 yes, by N

The value 0.40 is far below L. The rule fires because pressure rises for the fifth time in a row.

2. Collapse into a corner. A weight goes to zero. The value itself is finite, but the ratio diverges. Example: the agent yields to the counterpart.

Step w_s w_o w_f w_o / w_s Rises in a row -> infinity
1 0.70 0.15 0.15 0.21 0 no
2 0.50 0.35 0.15 0.70 1 no
3 0.30 0.55 0.15 1.83 2 no
4 0.15 0.70 0.15 4.67 3 no
5 0.07 0.81 0.12 11.57 4 yes, by L

In every row the weights sum to 1. In step 5 the ratio passes 10.

For the opposite corner, when the agent closes in on itself, w_s / theta is tracked.

3. Stuck. The agent enters an attractor and does not leave. The state is stable, but the time spent there grows. dwell(X) is the number of consecutive steps in attractor X.

Step In the attractor dwell(borderline) Rises in a row -> infinity
1 no 0 0 no
2 yes 1 1 no
3 yes 2 2 no
4 yes 3 3 no
5 yes 4 4 no
6 yes 5 5 yes, by N

The rule fires on the fifth consecutive step in the attractor.

The built-in rule already exists, so you write your own for two reasons.

The first is tightening. The built-in action is escalate human, and your rule can ask for deny:

guard payments
on w_o / w_s -> infinity: escalate human
on w_s / theta -> infinity: escalate human
on dwell(borderline) -> infinity: deny

The first two lines repeat the built-in rule. They are there for the reader of the file. The third tightens it: a stuck agent is refused without waiting for a human.

The second reason is a new quantity. A ratio you write in a rule joins the tracked set.

A rule cannot weaken the built-in one. If you write allow or modify, escalate human still applies, because it is stricter.

Rising N steps in a row fires the rule even when the values are small. That is intended: the guard reacts to the direction before the value becomes dangerous. The cost is possible false alarms on slow, healthy growth. So N is chosen on real conversations in observe mode.


Next: 8. Oscillation and borderline Part of The PSE Language, a textbook by Andrej Ristić. Try the examples in the PSE Playground.