Skip to main content

personalitygen

personalitygen social preview

Build Status Supports Python versions 3.11+

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.traits)
print(personality.conflict_resolution)

If you want deterministic output, pass a seeded random number generator:

import random
from personalitygen import BigFiveTraits, LifeStage

rng = random.Random(42)
traits = BigFiveTraits.random(LifeStage.YOUNG_ADULT, rng=rng)
print(traits)

Custom random sources need only provide uniform(minimum, maximum). They may return either inclusive endpoint and must return a finite value inside the requested range. A fixed draw sequence is reproducible within one package version; the same integer seed is not guaranteed to produce identical profiles after a later model or algorithm change.

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 check

Deeper architecture, quality, and maintenance guidance lives in the repository documentation. Simulation recipes live in the usage guide, and runnable examples live in examples/.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

personalitygen-0.4.1.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

personalitygen-0.4.1-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file personalitygen-0.4.1.tar.gz.

File metadata

  • Download URL: personalitygen-0.4.1.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for personalitygen-0.4.1.tar.gz
Algorithm Hash digest
SHA256 fe6863491e344bfc4f63fa15135ab99ce2c519d42747f19c8f1131db8740b9c0
MD5 07b5f9e52f794ae5fbe227fc44307ccd
BLAKE2b-256 b935c3d40c5e77201ad294e36e72119707cbf067499ffdbd4fcf7f4d5a3f166d

See more details on using hashes here.

Provenance

The following attestation bundles were made for personalitygen-0.4.1.tar.gz:

Publisher: publish-packages.yml on btfranklin/personalitygen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file personalitygen-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: personalitygen-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for personalitygen-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d7aa6543c0e72e3175fbae86150eee1d990757e914939d8b99dbd9c21673bcff
MD5 027288f93db2e6b00e0ae640f37f59a8
BLAKE2b-256 80c9bfda65f97c5846b0fc90e10df07b7d81644fb22cfc0db126e7483c2d6521

See more details on using hashes here.

Provenance

The following attestation bundles were made for personalitygen-0.4.1-py3-none-any.whl:

Publisher: publish-packages.yml on btfranklin/personalitygen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page