Generate simulated character personalities for games, stories, and simulations.
Project description
personalitygen
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.
Intent and scope
- 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).
Model overview
- 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.
Usage
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))
Development
This package targets Python 3.11+.
pdm install --group dev
pdm run test
pdm run lint
Deeper architecture, quality, and maintenance guidance lives in docs/.
Simulation recipes live in docs/USAGE.md, and runnable examples live in examples/.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file personalitygen-0.2.0.tar.gz.
File metadata
- Download URL: personalitygen-0.2.0.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce63401b63d335fccde07eecee237bbb5eb0edca0127309640f6075ce1cc7834
|
|
| MD5 |
50eb392eded3e47e8931660e3f288025
|
|
| BLAKE2b-256 |
fdb44ba05113957806c98ee8a1f4418599e7adeaa5a4dc7a3639c06d486e3443
|
Provenance
The following attestation bundles were made for personalitygen-0.2.0.tar.gz:
Publisher:
python-publish.yml on btfranklin/personalitygen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
personalitygen-0.2.0.tar.gz -
Subject digest:
ce63401b63d335fccde07eecee237bbb5eb0edca0127309640f6075ce1cc7834 - Sigstore transparency entry: 1649520757
- Sigstore integration time:
-
Permalink:
btfranklin/personalitygen@d710f56934cb60aa42d6ab6832c8f337ecaaef4f -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/btfranklin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@d710f56934cb60aa42d6ab6832c8f337ecaaef4f -
Trigger Event:
release
-
Statement type:
File details
Details for the file personalitygen-0.2.0-py3-none-any.whl.
File metadata
- Download URL: personalitygen-0.2.0-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dec64ec23aadc7ffe397a8bb7e3e4af75eebe2ad7b0ce2aa51158daa850901dc
|
|
| MD5 |
e2c67769d738f0d612c836fd739422c9
|
|
| BLAKE2b-256 |
ceae6a17f482bf161808ba131735634a0fbf751fe63a8ac175e92d03ad0f8357
|
Provenance
The following attestation bundles were made for personalitygen-0.2.0-py3-none-any.whl:
Publisher:
python-publish.yml on btfranklin/personalitygen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
personalitygen-0.2.0-py3-none-any.whl -
Subject digest:
dec64ec23aadc7ffe397a8bb7e3e4af75eebe2ad7b0ce2aa51158daa850901dc - Sigstore transparency entry: 1649520863
- Sigstore integration time:
-
Permalink:
btfranklin/personalitygen@d710f56934cb60aa42d6ab6832c8f337ecaaef4f -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/btfranklin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@d710f56934cb60aa42d6ab6832c8f337ecaaef4f -
Trigger Event:
release
-
Statement type: