Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register and process stuck causal chains #52

Closed
josephbirkner opened this issue Jan 29, 2019 · 1 comment
Closed

Register and process stuck causal chains #52

josephbirkner opened this issue Jan 29, 2019 · 1 comment
Labels
core ⚙️ Issues that concern the core ravestate lib/API raveboard 🏄‍♂️

Comments

@josephbirkner
Copy link
Collaborator

josephbirkner commented Jan 29, 2019

Currently, it is up to an activation (and the completed constraint's default max_age) to figure out, that a completed constraint's spike does not cause the activation of the desired follow-up spike.

This should be registered by CausalGroup: if an activation fails to produce the spikes it promised, and there are no other activations in the CausalGroup that could produce the same spike for the same cause, Activations which depend on the forgone spikes will be notified via Activation.effect_not_caused(effect, causal_group) where effect is a Signal.

Successively, the activation searches it's conjuncts for signals of type effect. If a match was found, the activation will reject all spikes from causal_group for the affected conjunct.

This also plays into the behavior of a pressured activation:

  • It only has to use it's death_clock to reject fully-fulfilled causal signal subsets.
  • If it is only holding on to completion signals, then it can rely on effect_not_caused to trigger it's auto-elimination.

Therefore, it is concluded:

  • §1) Auto-elimination can be partially determined by effect_not_caused. Activations will release spikes naturally, if their cause-effect assumptions are not being fulfilled.
  • §2) The activation's pressure 💥🕙 death_clock mechanism is only needed to end acquisitions of Fully-fulfilled Conjunct Causal Signal Subsets (FFCCSS). If the activation is pressured because it is waiting for completions, Pressure becomes an observation rather than a cause for action. Activations must reject FFCCSS for pressured causal groups after a given amount of time. Therefore, the death_clock mechanism requires the following new/amended APIs:
    • Constraint.fullfilled_causal_groups(): Retrieve the causal groups, for which there are FFCCSS. If the return value intersects with the activation's pressuring_causal_groups, the activation's death_clock will be started. This is checked both in Activation.pressure() and in Activation.acquire().
    • Constraint.dereference(spike, causal_groups): This API will be changed, such that it will only reject spikes from causal_groups if they are part of a FFCCSS. Note: It should be ok to leave pressuring_causal_groups unchanged, even if the causal group may not be referenced anymore after dereference.
  • §3) The maximum age of a completion signal may safely bet set to ∞
  • §4) Context.lowest_upper_bound_eta() may be removed.
  • §5) It should be considered, whether adding a wait=<t> parameter to Signal constraints may be worth the effort. This parameter would replace a hard-coded death clock value for CCSS.
  • §6) [known] The acquisition of a spike by an activation always resets the death_clock
  • §7) [known] FFCCSS must not be rejected, if they are part of a fully-fulfilled conjunction.
@josephbirkner josephbirkner added raveboard 🏄‍♂️ core ⚙️ Issues that concern the core ravestate lib/API labels Jan 29, 2019
@josephbirkner josephbirkner mentioned this issue Jan 29, 2019
6 tasks
@josephbirkner josephbirkner mentioned this issue Apr 23, 2019
15 tasks
@josephbirkner
Copy link
Collaborator Author

Fixed with #77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core ⚙️ Issues that concern the core ravestate lib/API raveboard 🏄‍♂️
Projects
None yet
Development

No branches or pull requests

1 participant