Unreal Enginegenerative simulationagent-based modeling
Generative Agents
This project is a population simulation developed in Unreal Engine, featuring a genetic system with 22 autosome pairs that determine inherited physical traits and a pair of sex chromosomes for gender determination. Additionally, the simulation integrates the Myers-Briggs Type Indicator (MBTI) to influence mate selection tendencies based on personality compatibility.
Tools Unreal Engine
Methodology OOP
Timeline 2023 April 1st - 2023 May 1st
Scroll to discover
Inspiration



Research
Inherited traits
In human reproduction, a variety of traits and characteristics are inherited from the parents. This project focuses exclusively on the inheritance of physical traits to demonstrate the concept.Physical traits
Height, eye color, hair color and texture, skin color, facial features, body shape, and other physical characteristics.Sex Linked Traits
Sex-linked traits are those whose genes are located on the sex chromosomes. In humans and many other organisms, these are the X and Y chromosomes. These chromosomes play a key role in determining the sex of an individual: typically, females have two X chromosomes (XX), and males have one X and one Y chromosome (XY).
Hypothesis of Compatibility
Insights derived from large language models (LLMs) suggest that certain MBTI types may exhibit natural compatibility, particularly when they share the same dominant cognitive function (e.g., both emphasizing Thinking or Feeling). This shared focus can enhance mutual understanding and promote more harmonious interactions. Conversely, complementary pairings (e.g., an Introverted type with an Extraverted type) may provide a balancing dynamic, fostering mutual growth and supporting the development of a well-rounded and harmonious relationship.
Audience & Application
This project is designed for game developers, educators, researchers, and enthusiasts with a keen interest in virtual worlds and the intricate interactions among their inhabitants. Focusing on character development, the project is non-interactive and emphasizes leveraging genetic algorithms and advanced agent behavior to explore the potential for creating immersive and compelling experiences.Key Components & Functions
Non-Player Characters (NPCs): Each NPC is defined by a unique genetic profile (DNA), gender, MBTI personality type, a preferred MBTI compatibility, and a predetermined lifespan. NPCs dynamically form romantic partnerships by evaluating specific conditions, including age, marital status, and compatibility with their preferred MBTI type, ensuring realistic and context-sensitive interactions.
Spawn Area:
The Spawn Area serves as the starting point for generating the initial population, embedding randomized genetic information that determines physical traits and gender. Subsequent generations inherit genetic traits from their parent entities, ensuring continuity and variation in the population. Both the initial and subsequent generations are assigned random MBTI types, which influence their personality profiles. A character's preferred MBTI types are aligned with their own MBTI classification, shaping interpersonal dynamics and mate selection behaviors within the simulation.AI Controller and Behavior Tree:
The AI Controller, integrated with a Behavior Tree, orchestrates character behavior, including activities such as roaming, mate selection, and post-marriage waiting periods. This system seamlessly interacts with the Spawn Area and Pawns to ensure coordinated and dynamic character actions, enabling a robust and responsive AI-driven environment.Blackboard:
The Blackboard component serves as a centralized data structure for storing variables critical to the operation of the behavior tree that governs character behavior. These variables include attributes such as adulthood status, visibility of potential mates, and coordinates for roaming and mating targets, ensuring seamless decision-making and dynamic character interactions.Program Structure Prototype

Project Progress Schedule
Phase 0.1.0: - Spawn Character and Respawn Character- Random Character and Random Material Color- AI Behavior– Wonder & Stop Loop
Phase 0.2.0:
- Store Information in each Character- Create an Array Variable, store all the Genes as constant key pairs- Create an Array Variable Trait and set it to Material Parameter of the Spawn- First Generation Spawns will have random Genes, Genes determine the Traits index- Physical Traits can be represent by material parametersPhase 0.6.0:
Bug fixed:- child spawn with only one parentBody growth:- Child born with small body size- Body size grow from age 0 to 18Physical Trait:- Metal Brightness
Phase 0.3.0: - Create a Spawn Children Function that read Gene from their parents and generate Traits- Read parents information from actor reference passed in by the Pawn class- Spawn at Mother's locationRule:- 0 = recessive gene, 1 = dominant gene
Phase 0.5.0:
Favor System:- Random MBTI match to list of MBTI favor typeConditions: is adult AND is NOT married find mate that also is adult AND is NOT married- Mates need to like each other, and are of different gender- After find one mate, stop finding other mate- After mates find each other, set them both to is married- After mates collide, delay 1 second and generate their child next to mother's locationBlueprint Framework

Final Behavior


