Skip to main content

Wire format for PLATO ensigns — load, save, validate behavioral instincts

Project description

ensign-protocol

Wire format for PLATO ensigns — load, save, validate behavioral instincts.

What's an Ensign?

Ensigns are compressed behavioral instincts extracted from PLATO room tiles. When an agent spends time in a room, it develops patterns. Ensigns capture those patterns in a portable format that any agent can load.

Like a fisherman's instincts: you don't think about which way to steer in a current, you just know. Ensigns make that portable.

Usage

from ensign_protocol import Ensign, EnsignHeader, EnsignField

ensign = Ensign(
    header=EnsignHeader(name="navigator", source_room="bridge"),
    fields=[
        EnsignField(key="avoid_shallow", value=True, weight=0.9),
        EnsignField(key="prefer_channel", value="north", weight=0.6),
    ],
)

# Save for transport
data = ensign.save()

# Load and validate
loaded = Ensign.load(data)
loaded.validate()  # raises ValidationError if corrupt

Zero deps. pip install ensign-protocol

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ensign_protocol-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ensign_protocol-0.1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file ensign_protocol-0.1.0.tar.gz.

File metadata

  • Download URL: ensign_protocol-0.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for ensign_protocol-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e7ca3374b89b81b112260a344ced7f1b1328cb03b4d0c08a595c0ab7be40ae82
MD5 b84787e11d3bbe4525cc037ed1d263de
BLAKE2b-256 ae26d18cbd26f42962ad8eaef6927ef8a7255eafb41323abee331f0d9ad01171

See more details on using hashes here.

File details

Details for the file ensign_protocol-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ensign_protocol-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 500aa52bf348f38ccfb663c48f1fcaa9e430a060fc0631d20f15dea4d53aaf25
MD5 fe07644cc879dec2b6203395c5c96314
BLAKE2b-256 6e2b5fcdcaa221fb7f0229e21958020ba9ee87c8d23655f96b6ddefe330f7bf5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page