personalitygen generates simulated character personalities for games, storytelling, simulations, and tests. It supports
conventional Big Five (OCEAN) profiles and Adaptive Bifurcated Big Five (ABBF) signed-vector profiles.
- Generate full Big Five profiles with sub-trait components and aggregate scores.
- Generate ABBF profiles as signed 5D vectors with dominant poles.
- Bias outputs by life stage using tuned Gaussian distributions (child, young adult, adult).
- Derive a conflict-resolution style from trait weights, plus mapped concern-for-self/others.
- Project Big Five profiles into ABBF vectors for systems that want both model shapes.
- Support deterministic generation by accepting a seeded random source.
- Stay lightweight and dependency-free (pure Python).
- Big Five traits: openness, conscientiousness, extraversion, agreeableness, neuroticism.
- Each trait is composed of three sub-traits and an aggregate score.
- Life stage influences distribution means and standard deviations for sampling.
- Conflict-resolution style is selected from avoiding, obliging, integrating, dominating, or compromising based on trait scores.
- ABBF profiles use five signed axes in chart order: order, chaos, cooperation, conflict, and competition.
- Positive ABBF values select the chart's left pole; negative values select the chart's right pole.
from personalitygen import BigFivePersonality, LifeStage
personality = BigFivePersonality.random(LifeStage.ADULT)
print(personality.trait_configuration)
print(personality.conflict_resolution_configuration)If you want deterministic output, pass a seeded random number generator:
import random
from personalitygen import BigFiveTraitConfiguration, LifeStage
rng = random.Random(42)
traits = BigFiveTraitConfiguration.random(LifeStage.YOUNG_ADULT, rng=rng)
print(traits)ABBF profiles can be generated directly or projected from Big Five traits:
from personalitygen import AdaptiveBifurcatedProfile
profile = AdaptiveBifurcatedProfile.random()
print(profile.vector)
print(profile.dominant_poles(threshold=0.2))
projected = AdaptiveBifurcatedProfile.from_big_five(traits)
print(projected.cosine_similarity(profile))This package targets Python 3.11+.
pdm install --group dev
pdm run test
pdm run lintDeeper architecture, quality, and maintenance guidance lives in docs/.
Simulation recipes live in docs/USAGE.md, and runnable examples live in examples/.
