The worlds a particle method runs in, and the options every driver
checks. :world-policy :fresh (the default) runs pure inference on
savepoints in fresh worlds; :fork runs it in canonical forks of the
caller's world (in-canonical-worlds), from one frozen fork of the caller
when a method runs several times (foerster.runtime.canonical).
Errors and option keys keep foerster.core's keywords: they are what the
public entry points raise and take.
The worlds a particle method runs in, and the options every driver checks. `:world-policy :fresh` (the default) runs pure inference on savepoints in fresh worlds; `:fork` runs it in canonical forks of the caller's world (`in-canonical-worlds`), from one frozen fork of the caller when a method runs several times (`foerster.runtime.canonical`). Errors and option keys keep `foerster.core`'s keywords: they are what the public entry points raise and take.
(canonical-options opts root scope)A savepoint driver's options in the canonical worlds root of scope:
particles (and enumeration's branches) are copies of worlds on the JVM, so
a world holding a system that may not be copied is refused and each copy
takes an even share of its world's budget; forks in ClojureScript.
A savepoint driver's options in the canonical worlds `root` of `scope`: particles (and enumeration's branches) are copies of worlds on the JVM, so a world holding a system that may not be copied is refused and each copy takes an even share of its world's budget; forks in ClojureScript.
(check-options! opts allowed)Refuse options allowed does not name, and canonical-world options under
:world-policy :fresh: an option that would be ignored is a mistake.
Refuse options `allowed` does not name, and canonical-world options under `:world-policy :fresh`: an option that would be ignored is a mistake.
(enumeration model-task opts)Exact enumeration (foerster.inference.enumerate) of model-task in the worlds
opts' :world-policy names: under :fork the branches start from a
canonical fork of the caller's world, as SMC's particles do, see each
their own copy of its registered state, and are discarded before the
measure is delivered; its outcomes carry their worlds' descriptors.
Exact enumeration (`foerster.inference.enumerate`) of `model-task` in the worlds `opts`' `:world-policy` names: under `:fork` the branches start from a canonical fork of the caller's world, as SMC's particles do, see each their own copy of its registered state, and are discarded before the measure is delivered; its outcomes carry their worlds' descriptors.
What applies to canonical worlds only (:world-policy :fork).
What applies to canonical worlds only (`:world-policy :fork`).
(in-canonical-worlds model-task opts run)A savepoint driver's run of model-task in canonical worlds of the
caller's (see above): (run model root scope) is a CPS operation resolving
the measure of model run in root by a session joining scope —
savepoint SMC (smc/smc) or enumeration (enumerate/enumerate).
:world-opts are the forks' options (:systems, :rights,
:snapshots); :executor the worlds' executor; :authority a
world.scope/PResourceAuthority and :grant what the inference may spend
of the caller's wallet. Inside with-frozen-caller the root is forked
from the inference's frozen fork instead of the caller's world, and takes
::core/grant of its wallet, or all that is left of it.
A savepoint driver's run of `model-task` in canonical worlds of the caller's (see above): `(run model root scope)` is a CPS operation resolving the measure of `model` run in `root` by a session joining `scope` — savepoint SMC (`smc/smc`) or enumeration (`enumerate/enumerate`). `:world-opts` are the forks' options (`:systems`, `:rights`, `:snapshots`); `:executor` the worlds' executor; `:authority` a `world.scope/PResourceAuthority` and `:grant` what the inference may spend of the caller's wallet. Inside `with-frozen-caller` the root is forked from the inference's frozen fork instead of the caller's world, and takes `::core/grant` of its wallet, or all that is left of it.
(on-savepoints operation)A spin resolving the savepoint CPS operation, a failure reported as
::core/inference-failed with the model's error as its cause.
A spin resolving the savepoint CPS `operation`, a failure reported as `::core/inference-failed` with the model's error as its cause.
(on-savepoints? opts)Whether a particle method whose canonical worlds are not on savepoints yet runs on savepoint SMC: pure inference in fresh worlds does.
Whether a particle method whose canonical worlds are not on savepoints yet runs on savepoint SMC: pure inference in fresh worlds does.
What every particle method takes.
What every particle method takes.
(particles model-task n opts)Savepoint SMC of model-task with n particles in the worlds opts'
:world-policy names.
Savepoint SMC of `model-task` with `n` particles in the worlds `opts`' `:world-policy` names.
(refuse-authority! opts what)Methods whose runs fork worlds per move (chains, tempered particles)
take no :authority or :grant yet.
Methods whose runs fork worlds per move (chains, tempered particles) take no `:authority` or `:grant` yet.
Resample-move and SMCP3 (foerster.inference.smc): SMC and PIMH in fresh worlds
only.
Resample-move and SMCP3 (`foerster.inference.smc`): SMC and PIMH in fresh worlds only.
What SMC and PIMH take beyond every particle method's options.
What SMC and PIMH take beyond every particle method's options.
(with-world-descriptors measure descriptors)measure whose particles carry their worlds' settled descriptors.
`measure` whose particles carry their worlds' settled descriptors.
(world-policy opts)The :world-policy of opts, :fresh by default; refuses any other.
The `:world-policy` of `opts`, :fresh by default; refuses any other.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |