Glasshouse
A dashboard, privacy controls and Home Assistant bridge for rooted LG webOS TVs.
Personality traits from a weighted catalogue with conflicts, synergies and Big Five axes. C++23, header-only, deterministic.
Developer toolsC++ · PythonGitHub @dasmigOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗Requires C++23 (e.g.,
-std=c++23for GCC/Clang,/std:c++latestfor MSVC).
API Reference · Usage Guide · Data and Method · Releases
Personality traits from a weighted catalogue with conflicts, synergies and Big Five axes.
Coherent Personalities. Traits are drawn one at a time: traits that conflict with one already chosen (brave and cowardly, calm and anxious) are skipped, and synergies (kind and generous, shy and quiet) make related traits likelier.
Big Five Axes. Each person draws openness, conscientiousness, extraversion, agreeableness and neuroticism, and traits that match them are likelier: a conscientious person tends to be organized. The chosen traits then shift the axes, giving a resolved vector a game AI can read.
A Catalogue That Is Data. 52 curated traits with groups, tags, axis loadings and relations, in four TSV tables. A game adds its own traits, axes (for example "risk taking" for a utility AI) and relations as layers, without touching the library.
Requests. Ask for any number of traits, force some in (include) and keep others out (exclude); the rest stay consistent with them.
Deterministic Seeding. Per-call get_personality(request, seed) for reproducible results, and personality::seed() for replaying a previous generation with the same request and data.
Batch Generation. Generate thousands of results from one seed, on several threads with the same output for any thread count, optionally unique by a key, and stream them as JSON Lines or CSV (see the usage guide).
Identical Everywhere. A seed gives the same personality on every compiler, standard library and CPU (GCC, Clang, MSVC, Emscripten; x86-64 and ARM64), checked by known-answer tests.
Extensible Data. Load your own TSV layers on top of the shipped catalogue to add, change or remove traits, axes and relations (extend()), checked before they are applied.
JSON and Replay. to_json() on every result, and a signature() recording the seed and the data it came from.
Compiled-in Data. Define DASMIG_TRAIT_EMBED to build the catalogue into the program, for WebAssembly and other builds without files.
Multi-Instance Support. Construct independent trtg instances with their own catalogue and random engine.
traitgen.hpp is the library released here. Keep core.hpp and the core/ directory (dasmig-core) in the same directory. Add
#include <dasmig/traitgen.hpp>
to the files you want to use it in, and supply the resources folder (or define DASMIG_TRAIT_EMBED).
#include <dasmig/traitgen.hpp>
#include <iostream>
auto& gen = dasmig::trtg::instance(); // loads the catalogue
auto p = gen.get_personality(dasmig::trait_request{}); // three traits
std::cout << p << '\n'; // "Calm, Resilient, Traditional"
p.has("brave"); // false
p.value("neuroticism"); // resolved axis value
p.tags(); // {"rest", "survival", "willpower", ...}
// Five traits, one forced in, one kept out.
const dasmig::trait_request request{.count = 5, .include = {"brave"}, .exclude = {"greedy"}};
auto q = gen.get_personality(request);
// The same seed gives the same personality everywhere.
auto again = gen.get_personality(request, q.seed());
std::cout << again.to_json() << '\n';
See the usage guide for extending the catalogue and the generation model in detail.
Generation always takes a trait_request: get_personality(request) or
get_personality(request, seed). Its defaults are three traits with no inclusions
or exclusions; no generation choices are stored on the generator. Data loading
and catalogue layers remain instance-level.
make # example
make test # tests
make bench # benchmarks, results in build/bench.tsv
make test-embed # tests with the lite tier compiled in
make coverage # code coverage
make lint # clang-tidy
make docs # API docs
make embed # regenerate dasmig/traitgen_data.hpp from resources/lite
Tested with:
-std=c++23)-std=c++23)/std:c++latest)| Dependency | Version | Bundled | Purpose |
|---|---|---|---|
| dasmig-core | 1.4 | Yes (core.hpp, core/) | Platform-independent random engine and distributions, data layers, JSON |
| Catch2 | 3.x | Yes (amalgamated) | Unit testing |
| Library | Description |
|---|---|
| address-generator | Postal addresses with real streets by place |
| biodata-generator | Procedural human physical characteristics |
| birth-generator | Demographically plausible birthdays |
| city-generator | Weighted city selection by population |
| country-generator | Weighted country selection by population |
| device-generator | Devices, browsers, user agents and IP addresses that fit together |
| email-generator | Email addresses in each country's style |
| entity-generator | ECS-based entity generation |
| interest-generator | Religion, hobbies and favourite media by country, age and sex |
| name-generator | Culturally appropriate full names |
| nickname-generator | Gamer-style nicknames |
| occupation-generator |
This library is released under the MIT License.
MIT License
Copyright (c) 2026 Diego Dasso Migotto
| Employment status, education and occupation by country, age and sex |
| persona-generator | Complete characters composed from the other generators |
| phone-generator | Phone numbers valid in each country's numbering plan |
| relationship-generator | Families around a person: parents, siblings, partners and children |
| user-generator | Complete user records: account, username, email, phone and address |