Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ For work on the world package or the corpus (the disembodied simulation), read `
6. `docs/specs/WORDFORM_PIPELINE.md` — the word-form pipeline: a Python program in `python/semantic_world/wordforms/` that makes spoken word forms, synthesizes them, and builds sound embeddings.
7. `docs/specs/CORPUS_GENERATOR.md` — the corpus generator: a Python program in `python/semantic_world/corpus/` that writes documents about the taxonomy's world in an artificial language, with a parse tree and a logical form for every sentence. Its numbered decisions, and the proposals they point to, are part of the specification.
8. `docs/specs/CONNECTED_SPEECH.md` — the plan for spoken sentences: whole utterances, alignment, pauses, speakers, and register. Planned, not built.
9. `docs/specs/WORLD_AND_LANGUAGE.md` — the world-and-language refactor: one world model of state and change for both simulation modes (fluents, event types with preconditions and effects, time steps), a new package `python/semantic_world/world/`, and the corpus rebuilt on that model. Built in phases and stages. Its decisions were reviewed by Jon on October 7, 2026, and are logged as WM.1 to WM.33 in `docs/DECISIONS.md`. Phase (a) is built (stages a1 to a8: the world package, the cut-over of the taxonomy and the corpus, the labels, states, changes, causal statements, descriptions, the documentation, and the regenerated datasets); the engineering choices of each stage are in `docs/proposals/` and logged as WM.E rows. Phase (b) is built: stage b1 (conditional effects), stage b2 (the world's comparisons and numeric fluents), stage b3a (the corpus's comparisons of scalars: relative gradable adjectives as comparisons, comparatives, and the comparison classes read from the world), and stage b3b (the numeric fluents in the corpus, `RAISES` and `LOWERS`, conditional causal statements, and the tense affix on the auxiliaries), each with a proposal file in `docs/proposals/`. Phase (c) is specified in `docs/specs/WORLD_PHASE_C.md` (item 10) and has begun: stage c1 (places, the static side) is built, after Jon's ruling WM.60 that every real the world draws is rounded to 4 decimals when drawn.
10. `docs/specs/WORLD_PHASE_C.md` — phase (c) of the world-and-language refactor: pair fluents (two-place fluents with profiles, `PAIRFL.<n>`), places from a second run of the taxonomy generator, location as a pair fluent toward places, place event types (moves and acts at a place), emergent habitats, and the corpus's statements about them. Decided with Jon on October 15 and 16, 2026 (WM.36 to WM.59). Built in seven stages, c1 to c5b; stage c1 (places: the taxonomy's `labels.kind`, the second taxonomy run, place event types with requirements only, their capacities and statistics, and `view --places`) is built, and c2a is next; read `WORLD_AND_LANGUAGE.md` first.
9. `docs/specs/WORLD_AND_LANGUAGE.md` — the world-and-language refactor: one world model of state and change for both simulation modes (fluents, event types with preconditions and effects, time steps), a new package `python/semantic_world/world/`, and the corpus rebuilt on that model. Built in phases and stages. Its decisions were reviewed by Jon on October 7, 2026, and are logged as WM.1 to WM.33 in `docs/DECISIONS.md`. Phase (a) is built (stages a1 to a8: the world package, the cut-over of the taxonomy and the corpus, the labels, states, changes, causal statements, descriptions, the documentation, and the regenerated datasets); the engineering choices of each stage are in `docs/proposals/` and logged as WM.E rows. Phase (b) is built: stage b1 (conditional effects), stage b2 (the world's comparisons and numeric fluents), stage b3a (the corpus's comparisons of scalars: relative gradable adjectives as comparisons, comparatives, and the comparison classes read from the world), and stage b3b (the numeric fluents in the corpus, `RAISES` and `LOWERS`, conditional causal statements, and the tense affix on the auxiliaries), each with a proposal file in `docs/proposals/`. Phase (c) is specified in `docs/specs/WORLD_PHASE_C.md` (item 10) and has begun: stage c1 (places, the static side) is built, after Jon's ruling WM.60 that every real the world draws is rounded to 4 decimals when drawn, and stage c2a (pair fluents from an event file: the definition, the runtime, and the fixtures) is built, after Jon's ruling WM.61 that the taxonomy's similarity range is written at 6 decimals.
10. `docs/specs/WORLD_PHASE_C.md` — phase (c) of the world-and-language refactor: pair fluents (two-place fluents with profiles, `PAIRFL.<n>`), places from a second run of the taxonomy generator, location as a pair fluent toward places, place event types (moves and acts at a place), emergent habitats, and the corpus's statements about them. Decided with Jon on October 15 and 16, 2026 (WM.36 to WM.59). Built in seven stages, c1 to c5b; stage c1 (places: the taxonomy's `labels.kind`, the second taxonomy run, place event types with requirements only, their capacities and statistics, and `view --places`) and stage c2a (pair fluents between entities as an event file defines them: their symbols, literals, initial pairs, compiled literals, the runtime's state and invariant, non-interference over pairs, the `spatial` block, pair changes in histories, and the fixtures) are built, and c2b (the generation of pair fluents) is next; read `WORLD_AND_LANGUAGE.md` first.
11. `docs/DECISIONS.md` — the log of every design decision of the taxonomy, word-form, and corpus programs, and of the world model. Append new decisions to it.
12. `docs/guides/` — user guides for the world package (`WORLD.md`: what a world is, the commands, the outputs, the configuration, the default world's figures, the two-place share and its levers), the taxonomy generator (`TAXONOMY.md`), the word-form pipeline (`WORDFORMS.md`), and the corpus generator (`CORPUS.md`). `README.md` there has the full chain.
13. `docs/ENVIRONMENT_SURVEY.md` — background only: why the stack was chosen.
Expand Down Expand Up @@ -106,6 +106,7 @@ python -m semantic_world.corpus render runs/corpus/tiny_seed1 --wordforms runs/w
python -m semantic_world.wordforms all data/wordforms/corpus_default.yaml # the word forms of the default corpus (after generate data/corpus/default.yaml); "forms" in place of "all" makes the word forms without audio
pytest tests/corpus # the corpus generator's tests alone
python -m semantic_world.world define data/world/default.yaml [--seed N] [--out DIR] # generate a world: the embedded taxonomy run, definition.json, entities.csv, derived values, statistics
python -m semantic_world.world define data/world/tiny_pairs.yaml # the tiny world with the pair fluents of events/pair_example.yaml (stage c2a): initial_pairs.csv beside entities.csv
python -m semantic_world.world view runs/world/tiny_seed1 --preset classic [--include PROPERTY,PART] [--out FILE] # a table for a model: base, static, or classic
python -m semantic_world.world view runs/world/tiny_seed1 --places [--preset static] # a table of the places (stage c1): base, static (with the determined place features and CANBE capacities), or classic
python -m semantic_world.world simulate runs/world/tiny_seed1 --episodes 100 [--seed N] [--legal] [--out FILE] [--config data/corpus/default.yaml] # run episodes of a world run and write episodes.jsonl; --config reads a corpus file's scene block
Expand Down
49 changes: 49 additions & 0 deletions data/world/events/pair_example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# A worked example of an event file with pair fluents (docs/specs/WORLD_PHASE_C.md, "Explicit
# event files"; stage c2a). Over abstract labels, it defines four pair fluents between entities,
# one of each symmetry and two of them functional, and five event types that read and write them:
# EVENTTYPE2.1.1 ("approach") makes the agent near the patient, a symmetric add that writes both
# directions; EVENTTYPE2.1.2 ("follow") needs nearness and makes the patient the agent's one
# followed partner, a functional add whose compiled literal NOT SOME.PAIRFL.3(agent) keeps the
# profile, and marks the patient as not awake when the patient has something above it;
# EVENTTYPE2.2.1 ("mount") needs the two to follow the same partner and the agent awake, and puts
# the agent above the patient in the asymmetric functional PAIRFL.4, whose compiled literals are
# NOT PAIRFL.4(patient, agent) and NOT SOME.PAIRFL.4(agent); EVENTTYPE2.2.2 ("leave") needs
# nearness and something below the agent in PAIRFL.2, deletes the nearness (both directions),
# and sets a fluent of the patient when the patient is above the agent; EVENTTYPE1.1 ("rest")
# needs the agent to follow someone. The requirements are explicit and always hold, so every
# ordered pair is able and legality is the preconditions' alone. Event types not listed are
# sampled, and so are their requirements. Use it with the tiny world: data/world/tiny_pairs.yaml
# names it as event_types.event_file, relative to the configuration file's folder.

pair_fluents:
PAIRFL.1: {symmetry: symmetric, functional: false, initial_rate: 0.2} # say, near
PAIRFL.2: {symmetry: asymmetric, functional: false, initial_rate: 0.1} # say, above (initial pairs only)
PAIRFL.3: {symmetry: general, functional: true, initial_rate: 0.2} # say, follows
PAIRFL.4: {symmetry: asymmetric, functional: true, initial_rate: 0.0} # say, carries (no initial pairs)
fluents:
BOOLFL.1: {initial_rate: 0.8} # say, awake
event_types:
EVENTTYPE2.1.1: # approach
requirement: "TRUE"
precondition: "NOT PAIRFL.1(agent, patient)"
effects: ["PAIRFL.1(agent, patient) := 1"]
EVENTTYPE2.1.2: # follow
requirement: "TRUE"
precondition: "PAIRFL.1(agent, patient)"
effects:
- "PAIRFL.3(agent, patient) := 1"
- "when SOME.PAIRFL.2(patient) then patient.BOOLFL.1 := 0"
EVENTTYPE2.2.1: # mount
requirement: "TRUE"
precondition: "SAME.PAIRFL.3(agent, patient) AND agent.BOOLFL.1"
effects: ["PAIRFL.4(agent, patient) := 1"]
EVENTTYPE2.2.2: # leave
requirement: "TRUE"
precondition: "PAIRFL.1(agent, patient) AND SOMEOF.PAIRFL.2(agent)"
effects:
- "PAIRFL.1(agent, patient) := 0"
- "when PAIRFL.2(patient, agent) then patient.BOOLFL.2 := 1"
EVENTTYPE1.1: # rest
requirement: "TRUE"
precondition: "SOME.PAIRFL.3(agent)"
effects: ["agent.BOOLFL.3 := 1"]
17 changes: 17 additions & 0 deletions data/world/tiny_pairs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# The tiny world with the pair example's pair fluents and explicit event types (stage c2a).

name: tiny_pairs
seed: 1
taxonomy: {config: data/taxonomy/tiny_relations.yaml}
places: {taxonomy: {config: data/taxonomy/places_tiny.yaml}}
place_event_types: {count: 2}

fluents:
count: 4

event_types:
unary: {count: 4}
binary:
features: {count: 4, expected_true: 2}
taxonomy: {superordinates: 2, depth: 2, branching: 2}
event_file: events/pair_example.yaml
Loading
Loading