amoorion.society

A society simulated locally: personas talking, before anything is said for real.

class amoorion.society.Persona(*, name, bio='', stance='neutral')[source]

Bases: Model

Somebody in a simulation: a name, who they are, and what they think of things.

Parameters:
  • name (str)

  • bio (str)

  • stance (str)

model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class amoorion.society.Society(personas, think=<function scripted>, run='default')[source]

Bases: object

Personas reacting to a topic and to each other, in rounds, on a shared feed.

think decides what a persona says; nobody and nothing outside takes part.

Parameters:
simulate(topic, rounds=3)[source]

Every persona in every round may add to the feed; returns the feed, oldest first.

Parameters:
  • topic (str)

  • rounds (int)

Return type:

list[Message]

amoorion.society.scripted(persona, topic, feed)[source]

No model: a line by stance, answering the last one who spoke.

Parameters:
Return type:

str | None

Modules

base

Society: personas react to a topic and to each other, round after round.