babylon.engine.dialectics.class_struggle

ClassDialectic — In-Itself ↔ For-Itself (Lukacs, Marx).

A class exists in-itself as an objective economic position (material grievance, exploitation, immiseration). It becomes for-itself when it achieves collective self-consciousness and organization sufficient to act as a historical agent.

When the for-itself weight crosses the sublation threshold AND organization is sufficiently high, the class sublates into a PartyDialectic — the vanguard organizational form that governs the class’s subsequent motion.

After sublation, the class continues to evolve (Aufhebung: preserved + negated + raised). But its step() now reads the party’s observe() output via world.find_successor(), meaning the party governs the class’s motion — not raw material conditions.

Classes

ClassDialectic(**data)

In-Itself ↔ For-Itself class consciousness contradiction.

ForItself(**data)

Class-for-itself: collective self-consciousness and organization.

InItself(**data)

Class-in-itself: objective material position.

class babylon.engine.dialectics.class_struggle.ClassDialectic(**data)[source]

Bases: Dialectic[InItself, ForItself]

In-Itself ↔ For-Itself class consciousness contradiction.

Weight semantics:

weight < 0 → in-itself dominant (fragmented, passive). weight > 0 → for-itself dominant (organized, active).

Motion law:

Material grievances push weight positive. Organization level amplifies the shift. When a successor (PartyDialectic) exists, motion is governed by the party’s directive.

Sublation:

Uses SublationRule — when weight >= 0.7, sublates to PartyDialectic.

Parameters:
type_tag: str
step(inputs, world)[source]

Motion law T for class dialectic.

If a successor (PartyDialectic) exists in the world view, the class’s evolution is governed by the party’s directive. Otherwise, evolution follows raw material conditions.

Parameters:
Return type:

ClassDialectic

Returns:

New ClassDialectic with updated weight and tick.

sublate()[source]

Sublate to PartyDialectic when weight >= threshold.

Delegates to the SublationRule abstraction. The class produces the party. From that point on, the party governs the class.

Return type:

Dialectic[Any, Any] | None

Returns:

PartyDialectic if threshold crossed, else None.

observe()[source]

Project class state for downstream consumption.

Return type:

dict[str, Any]

Returns:

Base observation extended with class-specific metrics.

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
class babylon.engine.dialectics.class_struggle.ForItself(**data)[source]

Bases: BaseModel

Class-for-itself: collective self-consciousness and organization.

Parameters:

organization_level (Annotated[float, Ge(ge=0.0), Le(le=1.0)])

organization_level

Degree of class organization ∈ [0, 1].

model_config: ClassVar[ConfigDict] = {'frozen': True}

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

organization_level: float
class babylon.engine.dialectics.class_struggle.InItself(**data)[source]

Bases: BaseModel

Class-in-itself: objective material position.

Parameters:

material_grievance (Annotated[float, Ge(ge=0.0), Le(le=1.0)])

material_grievance

Intensity of material deprivation ∈ [0, 1].

model_config: ClassVar[ConfigDict] = {'frozen': True}

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

material_grievance: float