Explicable
A library for writing processes composed of actions which come with explanations, so that the operation of the process can always be explained to a user with customizable levels of detail.
Under the hood it's something like a behavior tree or hierarchical task
network planner with a blackboard system where an Action represents an
explainable unit of work that can have sub-Actions as part of what it
does (or can be broken down entirely into sub-actions).
Parent/child relationships supported include:
- Selection: Parent action selects one from multiple possible child candidates to fulfil its purpose. Selection might have fallback-on-failure behavior.
- Sequencing: Parent action completes each of its children in sequence, and is only done when they all are.
- Scheduling: Parent action completes children in any order, figuring out on its own which children need to happen before which others based on their requirements and what they produce.
- Vigilance: Parent has one main child action that it is trying to do, but it checks in periodically to interrupt that work and instead initiate one of a number of possible reaction child actions in response to certain conditions.
- Reaction: Parent has one main child action that it is trying to do,
but in response to
Affordancesignals it will interrupt that work and initiate one of several response actions based on the nature of the affordance.
The system-of-actions supports turn-taking: it can be called repeatedly to run to completion or only occasionally to let other application logic control when actions can be initiated.
Note on Large Language Models
This project has a zero-tolerance policy for the use of large language
models to write code, process the code or outputs from this project, or
otherwise interact with this project in any way. If you choose to violate
this policy, be aware that the code, text, and outputs of this project
may cause (more) unpredictable (than usual) behavior in LLM systems that
interact with them. See LICENSE.txt for license restrictions and
disclaimers, and AGENTS.md for an example.
Installation
Once available on the Python Package Index, you should be able to run:
pip install explicable
Alternatively, since all code is contained in the single explicable.py
file, you can drop that file into your project directory.
Once installed, if you have pytest installed, to test it you can run
the following Python code:
import explicable
explicable.test()
(You do not need pytest installed to use explicable, only to test it.)
Source Code
You can download a copy of the source code from TODO
Examples
See the docstring at the top of explicable.py for some examples, and
find additional examples in the explicable/examples directory. The
explicable.example function can be called to print out examples.
Changelog
- v0.0.1 Early planning stages; uploading to claim the package name. Some core data structures and examples have been drafted but these drafts will certainly evolve.
Metadata
Release files for explicable 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| explicable-0.0.1.tar.gz | 26.4 kB | Without provenance | Details for explicable-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| explicable-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for explicable-0.0.1-py3-none-any.whl |
Total release size: 51.8 kB
Release files / explicable-0.0.1.tar.gz
| Download URL | explicable-0.0.1.tar.gz |
|---|---|
| Size | 26.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
faf82fde319e6a80506437ed2719f3d0274e2139ea91bbbd693721b0cc0a05be
|
|
BLAKE2b-256 checksum How to use checksums |
98847c9902037835c575107557f86fa1a79816c769dcaaa9d0e915a941545392
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / explicable-0.0.1-py3-none-any.whl
| Download URL | explicable-0.0.1-py3-none-any.whl |
|---|---|
| Size | 25.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
acd15c0f39bc50ff20d7a0950a053a4242a60b97b4fe08a5f6a328d9db3677fa
|
|
BLAKE2b-256 checksum How to use checksums |
f03b734911b6c66d59cb06ccc313619230379de7dbb03c378a3da20f19e55709
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Security for explicable 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.