babylon.models.entities.contradiction
Contradiction models for dialectical simulation.
Contradictions are structural tensions between opposing forces. They are the engine of historical change in the simulation.
This module consolidates: - ContradictionState (was in systems/contradiction_analysis.py) - ResolutionOutcome (was a dataclass in systems/contradiction_analysis.py) - Contradiction (was a dataclass in data/models/contradiction.py)
All models now use Sprint 1 types for consistency.
Classes
|
Full contradiction model with entities and resolution methods. |
|
The current state of a dialectical contradiction. |
|
The result of a contradiction reaching resolution. |
- class babylon.models.entities.contradiction.ContradictionState(**data)[source]
Bases:
BaseModelThe current state of a dialectical contradiction.
A contradiction is a structural tension between two forces that cannot both be satisfied within the current system. This is the primary model for tracking contradictions.
- Parameters:
- id
Unique identifier (flexible format for runtime use)
- name
Human-readable name
- description
Detailed explanation
- thesis
The dominant position
- antithesis
The opposing position
- tension
Current tension level [0, 1]
- momentum
Rate of change [-1, 1]
- is_principal
Is this the principal contradiction?
- resolved
Has this been resolved?
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- property intensity_level: IntensityLevel
Convert continuous tension to discrete IntensityLevel.
- class babylon.models.entities.contradiction.ResolutionOutcome(**data)[source]
Bases:
BaseModelThe result of a contradiction reaching resolution.
When a contradiction resolves (tension reaches 0 or 1), this model captures what happened and the consequences.
- Parameters:
- contradiction_id
ID of the resolved contradiction
- resolution_type
How it resolved (synthesis, rupture, suppression)
- new_contradictions
IDs of contradictions spawned by resolution
- system_changes
Metric deltas caused by resolution
-
resolution_type:
ResolutionType
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class babylon.models.entities.contradiction.Contradiction(**data)[source]
Bases:
BaseModelFull contradiction model with entities and resolution methods.
This is a more detailed model for contradictions that includes references to entities and resolution mechanics. Used for game content definition.
- Parameters:
id (Annotated[str, _PydanticGeneralMetadata(pattern='^CON[0-9]{3}$')])
name (str)
description (str)
principal_aspect_id (str | None)
secondary_aspect_id (str | None)
principal_contradiction_id (str | None)
universality (Annotated[str, _PydanticGeneralMetadata(pattern='^(Universal|Particular)$')])
particularity (str)
antagonism (Annotated[str, _PydanticGeneralMetadata(pattern='^(Primary|Secondary)$')])
intensity (IntensityLevel)
state (Annotated[str, _PydanticGeneralMetadata(pattern='^(Active|Resolved|Latent)$')])
potential_for_transformation (IntensityLevel)
intensity_history (list[Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Contradiction intensity from dormant (0) to rupture (1)', metadata=[Ge(ge=0.0), Le(le=1.0)])]])
- id
Unique identifier
- name
Human-readable name
- description
Detailed explanation
- entity_ids
IDs of entities involved in this contradiction
- universality
Universal or Particular
- particularity
Domain (Economic, Political, etc.)
- principal_contradiction_id
ID of the principal contradiction (if this is secondary)
- principal_aspect_id
ID of the entity representing the principal aspect
- secondary_aspect_id
ID of the entity representing the secondary aspect
- antagonism
Primary or Secondary antagonism
- intensity
Current intensity level
- state
Active, Resolved, or Latent
- potential_for_transformation
How likely to transform
- conditions_for_transformation
What conditions must be met
- resolution_methods
Mapping of method names to Effects
-
intensity:
IntensityLevel
-
potential_for_transformation:
IntensityLevel
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].