babylon.engine.field_registry
Field registry for extensible contradiction fields.
Dialectical Field Topology (Feature 002): The field registry provides a mapping from field names to computation + normalization callables. Core computation logic (gradient, Laplacian, derivatives, principal contradiction) iterates over registered field names without hardcoding any.
Reference: FR-001 (extensible field set, field-name-agnostic core computation) Reference: R-003 (contradiction field storage architecture) Reference: R-007 (domain-specific normalization)
Functions
|
Compute displacement field from population change rate. |
|
Compute exploitation field from wealth deficit relative to subsistence. |
|
Compute immiseration field from wealth decline rate. |
|
Compute imperial rent field from unearned increment. |
Classes
Concrete implementation of FieldRegistryProtocol. |
|
|
Protocol for the open field registry. |
- class babylon.engine.field_registry.FieldRegistryProtocol(*args, **kwargs)[source]
Bases:
ProtocolProtocol for the open field registry.
The registry maps field names to computation + normalization callables. Core computation logic MUST be field-name-agnostic.
- register(name, computation, normalization)[source]
Register a new contradiction field.
- Parameters:
- Raises:
ValueError – If name is already registered.
- Return type:
- normalize(name, raw_value)[source]
Normalize a raw field value using the field’s normalization function.
- __init__(*args, **kwargs)
- babylon.engine.field_registry.compute_exploitation(node_attributes)[source]
Compute exploitation field from wealth deficit relative to subsistence.
When wealth < subsistence, the worker is being exploited: the surplus value they produce exceeds what they receive. The ratio (subsistence - wealth) / subsistence captures this deficit as a fraction.
- babylon.engine.field_registry.compute_immiseration(node_attributes)[source]
Compute immiseration field from wealth decline rate.
Immiseration captures the rate at which material conditions are worsening. Requires _previous_wealth injected from persistent_data.
- babylon.engine.field_registry.compute_imperial_rent(node_attributes)[source]
Compute imperial rent field from unearned increment.
The unearned_increment attribute represents the PPP bonus that forms the material basis of labor aristocracy — wealth received not from own labor but from imperial extraction.
- babylon.engine.field_registry.compute_displacement(node_attributes)[source]
Compute displacement field from population change rate.
Displacement captures forced population movement — evictions, gentrification, carceral removal. Requires _previous_population injected from persistent_data.
- class babylon.engine.field_registry.DefaultFieldRegistry[source]
Bases:
objectConcrete implementation of FieldRegistryProtocol.
Maintains an ordered mapping of field names to (computation, normalization) callables. Registration order is preserved for deterministic iteration.
- register(name, computation, normalization)[source]
Register a new contradiction field.
- Parameters:
- Raises:
ValueError – If name is already registered.
- Return type:
- classmethod with_defaults()[source]
Factory that creates a registry with the four default fields.
- Default fields:
exploitation: Wealth deficit relative to subsistence
immiseration: Wealth decline rate
imperial_rent: Unearned increment (PPP bonus)
displacement: Population change rate
- Return type:
- Returns:
DefaultFieldRegistry with four fields registered.