babylon.engine.dialectics.commodity
CommodityDialectic — Use-Value ↔ Exchange-Value (V1 Ch1).
The commodity is the elementary form of capitalist wealth. Its internal contradiction — between use-value (qualitative, concrete) and exchange-value (quantitative, abstract) — drives the entire movement of capital.
See also
babylon.economics.value: UseValue and ExchangeValue pole models.
babylon.engine.dialectics.base.Dialectic: Generic base class.
Classes
|
The use-value ↔ exchange-value contradiction (V1 Ch1). |
- class babylon.engine.dialectics.commodity.CommodityDialectic(**data)[source]
Bases:
Dialectic[UseValue, ExchangeValue]The use-value ↔ exchange-value contradiction (V1 Ch1).
Weight reflects whether the commodity is currently being held for use (
weight < 0, A dominant) or for exchange (weight > 0, B dominant). Zero is equilibrium.- Motion law:
Production events shift weight toward exchange (increase, toward B).
Consumption events shift weight toward use (decrease, toward A).
- The input convention is an upstream dict with keys:
event:"production"or"consumption"intensity: float ∈ [0, 1] controlling shift magnitude
Sublation: None in Phase 1 (commodities persist).
- Invariants:
SNLT ≥ 0 (enforced by pole validation)
- Parameters:
- type_tag: str
- step(inputs, world)[source]
Motion law T for the commodity contradiction.
Production events shift weight toward exchange (pole B, positive); consumption events shift toward use (pole A, negative).
- Parameters:
inputs (
TickInputs) – Upstream outputs. Looks for own id’s entry witheventandintensitykeys.world (
WorldView) – Read-only world context (unused in Phase 1).
- Return type:
- Returns:
New CommodityDialectic with updated weight and tick.
- observe()[source]
Project commodity state for frontend rendering.
- Returns:
utility, demand, price, snlt.
- Return type:
Base observation dict extended with commodity-specific fields
- invariants()[source]
Commodity-specific invariants.
- Checks:
SNLT ≥ 0 (should be guaranteed by pole validation, but we double-check as a runtime safety net).
- model_config: ClassVar[ConfigDict] = {'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- id: UUID
- pole_a: A
- pole_b: B
- weight: float
- parent_id: UUID | None
- tick_created: int
- tick_updated: int