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 changes sampling means. Standard deviation is fixed per trait.
  • 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/.

Metadata

Release files for personalitygen 0.4.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for personalitygen 0.4.3
File Size Uploaded Provenance
personalitygen-0.4.3.tar.gz 12.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for personalitygen 0.4.3
File Interpreter ABI Platform
personalitygen-0.4.3-py3-none-any.whl Python 3 none any Details

Total release size: 26.3 kB

Release files / personalitygen-0.4.3.tar.gz

Download URL personalitygen-0.4.3.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
09e2d67f370401327fbe736c9d5d00f444b2035006e8767bcc07eae3253e29df
BLAKE2b-256 checksum
How to use checksums
f1cea0adc18b0f34543c9051b0d8541332832e241d979bc71c666f27cf88bf90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / personalitygen-0.4.3-py3-none-any.whl

Download URL personalitygen-0.4.3-py3-none-any.whl
Size 13.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
13199c6a9fedd175bf3c0c1d72895f99afe07644dc3bc8f4c1d6290ff13a08e0
BLAKE2b-256 checksum
How to use checksums
24c9dff2938e0792bccd966fdee92d326ff224a59826a5d3d4fd8cc61808a5f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Security for personalitygen 0.4.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for personalitygen-0.4.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page