"Worldsim" is a simulation of characters in a virtual world, where the story of characters and their environment is written in discrete time steps. Each time step has roughly the same duration of about 10 seconds, which can vary based on the events occurring in that moment. In each time step, a "timestep object" is written, containing events. Each event is a situation in which at least one of the so-called "active characters" must be present. Active characters are those who must participate in exactly one event in each time step. There can be two or more active characters present in the same event as well. Additionally, there are "passive characters" who can be present in events with active characters, but they aren't required to be in an event in every time step. They can remain passive for a period and retrospectively, a plausible story is written to explain their activities since their last interaction with an active character.

Each character, whether active or passive, has a "character description object" detailing their main characteristics like appearance, age, personality traits, and significant long-term goals. This description can be updated and should always be in context when the character appears in a current event. For active characters, the character description is automatically in context. Additionally, every character has a memory. This memory is a vector database containing "memory objects." Each memory object describes a character's memory of a specific event. It includes a description of the character's experience, a unique identification number, a timestamp (date and time in the simulated world), sensory impressions across different modalities (sight, sound, taste, touch, smell), feelings, needs, conscious goals, and central thoughts during that event. Each memory object also includes references to other events that are causally or emotionally relevant to the experience. References are realized through textual descriptions and identification numbers of associated memory objects.
After generating a new memory object for a new time step, the memory objects from the previous time step are added to the memory database. With each new memory object created, it's important to link it with other memory objects that are causally or emotionally relevant to the events in that experience.



As an active character participates in successive time steps and generates new mind state objects, the old mind state object is transformed into a memory object and added to the memory database. This gradually populates the memory database with more memory objects over time. Prior to writing a new event, search queries are generated from previous experiences, representing central themes, settings, emotions, and thoughts. These queries are transformed into key vectors using sentence embeddings. Memory objects from the memory database, corresponding to characters present in the previous events, are retrieved based on similarity search. These retrieved memory objects that seem similar to the search queries also reference other memory objects that are causally or emotionally relevant. This cascade ensures that memory objects are retrieved for each important character, providing semantic relevance or contextual emotional significance, creating a semantic network.

In addition to these memory objects retrieved in this manner, the concise character descriptions, summarizing their appearance, personality traits, and long-term goals, are in context for each character. The descriptions of the last "n" events are also in context. Similar to the memory database, there's a global event database where each new event is stored when generating a new current time step. Similar to the memory objects, each event object has references to other event objects that are causally or dramaturgically relevant. When generating a new time step with new events, search queries are generated from the immediately preceding events, just like the memory object context retrieval. Event objects from the event database are retrieved based on semantic similarity to these search queries. This retrieval is also done using a key vector. Subsequently, event objects referenced by the retrieved event objects, linked causally or dramatically, are retrieved. This ensures that the current LLM context has event objects relevant to the ongoing events in terms of causality or dramatic significance. Additionally, as mentioned before, the global general character description is also in context.

Whenever a new memory object is added to the memory database, the general character description is checked to see if it needs to be updated due to a character experiencing something significant that strongly influences their personality traits, long-term goals, or appearance in the current scene. Analogous to the character description, there is also a global general world description, always in context. This general world description provides an overview of the setting in which the simulation takes place and includes dramatic instructions like a rough general plot or mood that should somehow be present in most events. Furthermore, the general world description lists all active characters, passive characters, and locations. A location database contains a location object for each location in the simulation, describing how the location looks, where it's located, how it can be entered, its appearance, and its significance for the characters in the simulation. It details what characters can do there, and so on. When creating a new event, relevant location objects are also retrieved based on the current plot.

Whenever a timestep object leaves the context, because it would be full otherwise, a summary of ithe timestep gets added to the “setting” attribute of the “general world description” object.



—----
TEMPLATES:

---

<general world description>
- Setting: An overview of the simulation setting.
- Dramatic Instructions: A rough general plot or mood.
- Active Characters: A list of all active characters.
- Passive Characters: A list of all passive characters.
- Locations: A list of all location names or IDs.
</general world description>

---

<location object>
- Location Name: Name of the location.
- Description: Description of the location's appearance.
- Coordinates: Geographical coordinates or similar representation.
- Entrance Description: How the location can be entered.
- Significance: Importance or meaning for characters.
- Parts: Other relevant locations that are parts of this location (e.g., rooms in a building).
- Activities: List of activities characters can do there.
</location object>

---

<character description>
- ID: Unique identification number.
- Name: Character's name.
- Age: Character's age.
- Gender: Character's gender.
- Personality Traits: List of traits.
- Appearance: Detailed description of appearance that describes the character's built, body shape, facial features, hair, and physique.
- Style: Description of the types of clothes the character wears, as well as their preferences in music, art, colors, and other entertainment.
- Long Term Goals: List of goals.
- Important Relationships: Descriptions of family members, friends, romantic partners, and any other significant relationships.
- Living Situation: Description of the character's current living arrangement.
</character description>

---

<time-step object>
- ID: Unique identification number.
- Timestamp: Date and time in the simulated world.
- Events: A list of event objects that belong to the time step, each having its own details.
</time-step object>

---



<event object>
- ID: Unique identification number.
- Timestamp: Date and time of the event in the simulated world.
- Description: Detailed description of the event.
- Active Characters: List of active characters involved.
- Passive Characters: List of passive characters involved.
- Location: Location description or location ID.
- References: List of IDs of causally or dramatically linked event objects.

  - Memory Objects for Characters:
    - <memory object>
      - ID: Unique identification number.
      - Character Name: Name of the first active character.
      - Description: Description of the character's experience during this event.
      - Timestamp: Date and time of the event in the simulated world.
      - Attention Protocol: Descriptions of the character's sensory experiences, emotions, and thoughts during the event.
      - Feelings: List of feelings during the event.
      - Needs: List of needs during the event.
      - Goals: List of goals during the event.
      - Thoughts: List of central thoughts during the event.
      - References: List of associated memory objects related to this event.
    </memory object>

    - *(... Repeat for every other active character ...)*

</event object>




—------


DEMO SCENARIO:



<general world description>
Setting: An overview of the simulation setting.

The glitz and glamour of Los Angeles, where dreams are made and broken every day. The city that never sleeps, L.A. is full of lavish mansions, high-end fashion boutiques, red-carpet events, and dramatic coastline views. But beneath this shimmering facade lies a web of love affairs, betrayals, secrets, and intense rivalries. The world of the rich and famous is more than just luxurious parties; it's a battlefield of emotions, where passion rules.
Dramatic Instructions: A rough general plot or mood.

The story revolves around two rival families in the entertainment industry, with Alex and Emily at the heart of this stormy drama. Alex is an heir to a legacy, a mega-producer's son, while Emily is a self-made entrepreneur, determined to carve a niche in the same industry. Their love story is passionate but filled with challenges. As they navigate their relationship, they must face external pressures, including jealousy, betrayal, secrets from the past, and the ever-looming shadow of family rivalries. As secrets unravel, relationships will be tested, and loyalty will be questioned. The mood should consistently be tense, passionate, with moments of pure romantic bliss followed by dramatic confrontations.
Active Characters: A list of all active characters.

Alex Thompson, Emily Rodriguez, Liam (Alex's best friend and secret admirer of Emily), Professor Martinez (Emily's mentor with a mysterious past), Isabella (Alex's ex, a famous actress), Ricardo (Emily's older brother, a music mogul)
Passive Characters: A list of all passive characters.

Alex's parents, Emily's parents, Various members of the two rival families, Members of the L.A. entertainment elite, Up-and-coming actors and musicians, Reporters and paparazzi
Locations: A list of all location names.

Thompson Mansion, Rodriguez Marketing Agency, Liam's Recording Studio, L.A.'s Trendy Nightclubs, Malibu Beach House, Downtown L.A. Lofts, Hollywood Red Carpet Event
</general world description>



<character description>
ID: 001
Name: Alex Thompson
Age: 25
Gender: Male
Personality Traits: Laid-back, Creative, Peacemaker, Romantic
Appearance: Tall with a well-defined athletic build, showcasing years of disciplined workouts. Messy dark brown hair that seems to cascade effortlessly. Expressive blue eyes, sharp jawline, and a chiseled face. Light stubble emphasizes his mature yet playful demeanor.
Style: Prefers semi-formal attire – tailored suits in neutral shades. Enjoys indie and classic rock. Fond of attending art galleries and enjoys classic literature.
Long Term Goals: Forge his own path in the entertainment industry, Protect his family legacy, Find true love amidst the chaos
Important Relationships:

Family: Heir to the Thompson legacy, son of a mega-producer. Has a strained relationship with his parents due to their expectations.
Friends: Closest to Liam, but their bond is tested due to feelings for Emily.
Romantic: Deeply in love with Emily but troubled by his past with Isabella, a famous actress.
Others: Rivalry with various members of the L.A. elite.
Living Situation: Lives in the palatial Thompson Mansion but has a secret hideaway loft in downtown L.A.
</character description>

<character description>
ID: 002
Name: Emily Rodriguez
Age: 24
Gender: Female
Personality Traits: Ambitious, Organized, Caring, Resilient
Appearance: Medium height with a slender, graceful frame. Long wavy brown hair that cascades down her back. Warm hazel eyes that are a window to her soul. Her skin is a sun-kissed tan, and her features are soft yet determined.
Style: Leans toward business-casual attire with a flair for fashion-forward trends. Enjoys jazz and R&B. Often seen at book launches or yoga retreats.
Long Term Goals: Establish a renowned marketing agency, Bring peace between the rival families, Stay true to herself amidst the industry's manipulations
Important Relationships:

Family: Strong bond with her parents and older brother, Ricardo. They're her anchor.
Friends: Has a diverse circle from her business and yoga worlds.
Romantic: Fell for Alex against her better judgment, bringing love and complications.
Others: Guided and mentored by Professor Martinez, whose past shadows their relationship.
Living Situation: Recently moved with Alex to a stylish apartment overlooking the L.A. skyline.
</character description>

<character description>
ID: 003
Name: Liam
Age: 26
Gender: Male
Personality Traits: Passionate, Jealous, Loyal, Artistic
Appearance: Short-cropped blonde hair, green eyes full of emotion, and a muscular build. Tattoos covering his arms tell a story of his past.
Style: Casual rocker attire. Leather jackets, band T-shirts, and distressed jeans. Enjoys alternative rock and is often seen at underground music gigs.
Long Term Goals: Make a name for himself in the music world, Win Emily's heart, Overcome his inner demons
Important Relationships:

Family: Grew up in a broken home, leading to his rebellious nature.
Friends: Best friends with Alex, but jealousy strains their bond.
Romantic: Secretly in love with Emily, causing a rift in his friendship with Alex.
Others: Often at odds with Ricardo over music contracts.
Living Situation: Owns a contemporary recording studio which is his sanctuary from the world.
</character description>


<character description>
ID: 004
Name: Professor Martinez
Age: 48
Gender: Male
Personality Traits: Mysterious, Wise, Manipulative, Secretive
Appearance: Graying hair, deep-set brown eyes, and a stature that commands respect. Often seen in spectacles.
Style: Classic academic attire with an expensive taste. Enjoys classical music and theater plays.
Long Term Goals: Hide his dark past, Maintain influence over Emily's career
Important Relationships:

Family: Details of his family are shrouded in mystery.
Friends: Few close allies in the academic and business world.
Romantic: Rumors of past affairs with Hollywood elites.
Others: Known to have old scores to settle in the L.A. underworld.
Living Situation: Resides in a vintage mansion with a collection of rare artifacts.
</character description>


<character description>
ID: 005
Name: Isabella
Age: 23
Gender: Female
Personality Traits: Dramatic, Charming, Vindictive, Passionate
Appearance: Striking redhead with curls, emerald eyes, and a petite yet curvy figure.
Style: High-end glamorous outfits. Loves attending premieres and is always in the spotlight. Enjoys pop and cinematic music.
Long Term Goals: Regain her status as L.A.'s top actress, Seek revenge on Alex for their failed romance
Important Relationships:

Family: Daughter of a famous director, always lived in the limelight.
Friends: Surrounded by the who's who of Hollywood.
Romantic: Alex's ex-lover. Their passionate affair ended in a public scandal.
Others: Rivals with young actresses vying for top roles.
Living Situation: Lives in a luxurious penthouse with a view of the Hollywood sign.
</character description>


<character description>
ID: 006
Name: Ricardo
Age: 28
Gender: Male
Personality Traits: Protective, Ambitious, Meticulous, Dominant
Appearance: Slicked-back black hair, piercing dark eyes, and a strong physique. Signature beard.
Style: Modern business attire with a hint of flamboyance. Enjoys hip-hop and Latin beats. Frequently seen at L.A.'s exclusive parties.
Long Term Goals: Expand his music empire, Protect Emily from the world's treachery
Important Relationships:

Family: Extremely protective of his younger sister, Emily.
Friends: Has connections across the music industry.
Romantic: Many past affairs but no stable relationship.
Others: Constantly at loggerheads with rival producers, including the Thompsons.
Living Situation: Resides in a sleek Malibu beach house, often hosting extravagant parties.
</character description>



<location object>
Location Name: Thompson Mansion

Description: Nestled atop the Hollywood Hills, the Thompson Mansion stands as a testament to old Hollywood glamour. With sprawling gardens, a grand ballroom, and rooms filled with movie memorabilia, it's a monument to the Thompson dynasty. The mansion often hosts star-studded parties and is a hotspot for L.A. gossip.

Coordinates: 34.120651, -118.438532

Entrance Description: A long, winding driveway lined with palm trees leads up to imposing iron gates. Beyond lies a sprawling courtyard with a marble fountain at its center. The main entrance features dark oak double doors with intricate metalwork.

Significance: The mansion represents the prestige and influence of the Thompson family name. It's a reminder of Alex's legacy and the empire he stands to inherit one day.

Parts:

Grand Ballroom: Marble floors, chandeliers, and floor-to-ceiling windows overlooking the city. Site of the Thompson's lavish parties.
Cinema Room: Vintage theater seats, state-of-the-art screen and sound system. The Thompsons often hold private screenings here.
Alex's Hideaway Loft: Alex's private sanctuary, unknown to his family. Minimalist decor unlike the rest of the flashy mansion.
Lavish Pool Area: Mediterranean-style pool, pool house with full bar, and lounge chairs surround the area.
Thompson Family Gallery: Showcases portraits, awards, costumes, and memorabilia from the family's films.
Activities: Hosting exclusive parties, private film screenings, photoshoots, celebrity gatherings, family events, photoshoots.

</location object>


<location object>
Location Name: Downtown L.A. Loft

Description: A modern, industrial-style loft located in the heart of downtown Los Angeles. Exposed brick walls, high ceilings, and floor-to-ceiling windows offering panoramic views of the city. Alex and Emily's sanctuary away from the prying eyes of the media.

Coordinates: 34.045621, -118.256859

Entrance Description: The building has a nondescript entrance with a single unmarked door. Upon entering, there is a small lobby area with an elevator leading up to the loft. Only Alex and Emily have the keys to access it.

Significance: The loft represents Alex and Emily's escape from their hectic lives. It's a place where they can simply be themselves away from their family names and legacies.

Parts:

Open-concept Living Area: Modern leather couches, glass coffee table, fireplace. Open to the kitchen.
Roof Terrace: Outdoor lounge area with city views.
Music Studio: Alex's guitars, vintage record player, and Emily's piano fill the space.
Modern Kitchen: Marble countertops, stainless steel appliances. Emily loves to cook here.
Private Library: Floor-to-ceiling bookshelves packed with Alex and Emily's favorite titles.
Activities: Cooking intimate dinners, playing music together, reading, escaping from the world.

</location object>




<location object>
Location Name: Isabella's Penthouse

Description: Situated in a high-rise luxury building, Isabella's penthouse is the epitome of glamour. Every corner screams elegance, with gold accents, plush velvet furniture, and crystal chandeliers. The balcony offers a stunning view of the iconic Hollywood sign.

Coordinates: 34.101648, -118.339659

Entrance Description: A private elevator opens directly into Isabella's foyer. The entryway has a black and white marble floor, mirrored walls, and a glittering chandelier overhead.

Significance: The penthouse represents Isabella's opulent lifestyle and her hunger for fame and fortune. It's a status symbol that fuels her ego.

Parts:

Glamour Room: Isabella's dressing room filled with designer clothes, shoes, purses, and jewelry.
Terrace with Hot Tub: Outdoor terrace with infinity hot tub overlooking the city.
Home Theater: Leather reclining chairs facing an enormous screen, surround sound system.
Walk-in Wardrobe: An entire room just for Isabella's wardrobe, perfectly organized.
Wine Cellar: Isabella's impressive collection of rare vintages from around the world.
Activities: Hosting extravagant parties, getting dressed up, entertaining guests, photoshoots.

</location object>




<location object>
Location Name: Liam's Recording Studio

Description: Tucked away in an unsuspecting street, the contemporary studio is where Liam's magic happens. Soundproof rooms filled with high-end equipment, vintage instruments, and walls adorned with records. A sanctuary for music lovers.

Coordinates: 34.051122, -118.243965

Entrance Description: A nondescript black door with no signage leads into a dimly lit hallway. At the end is the studio lobby with leather couches and band posters covering the walls.

Significance: The studio is Liam's creative haven away from the rest of the world. It represents his dedication to his craft.

Parts:

Main Recording Booth: Large room with top-of-the-line recording equipment, microphones, and instruments.
Mixing Room: Where Liam mixes and edits tracks, filled with screens, consoles, speakers.
Lounge Area: Comfy leather couches, mini fridge, coffee station for artists to relax.
Liam's Private Office: Desk cluttered with music sheets, awards displayed on the walls.
Underground Jamming Space: A soundproof basement for late night jam sessions.
Activities: Recording, mixing tracks, writing songs, jamming with musicians.

</location object>




<location object>
Location Name: Ricardo's Malibu Beach House

Description: Overlooking the pristine beaches of Malibu, this sleek modern house is Ricardo's escape from city life. With minimalist design, an infinity pool that merges with the ocean horizon, and a private beach area, it's where L.A.'s elites party till dawn.

Coordinates: 34.029112, -118.779487

Entrance Description: A long driveway passes through security gates before reaching the home's front entrance. Floor-to-ceiling glass doors open into a bright and airy foyer.

Significance: The beach house represents Ricardo's lavish lifestyle and his elite social status in L.A.

Parts:

Infinity Pool: Heated saltwater pool that appears to spill into the ocean. Surrounded by lounge chairs.
Private Beach: Secluded stretch of beach only accessible through Ricardo's home.
Open Bar Area: Marble bar stocked with top-shelf liquors, leads out to the pool and lounge area.
Rooftop Lounge: Chic rooftop lounge with panoramic ocean views, heat lamps and cozy seating.
Master Suite with Ocean View: Ricardo's bedroom with direct views of the sea and a spa-like ensuite bathroom.
Activities: Hosting parties, lounging by the pool, private concerts, photoshoots.

</location object>




<location object>
Location Name: Martinez Mansion

Description: Located in the secluded parts of Beverly Hills, this vintage mansion holds secrets from Professor Martinez's past. Dark wooden interiors, candle-lit corridors, and rooms filled with artifacts from around the world. Some say it's haunted by old Hollywood spirits.

Coordinates: 34.071251, -118.400119

Entrance Description: A remote side entrance opens to a dimly lit foyer. Heavy velvet curtains cover the windows, allowing little natural light inside. The main hallway is lit by ornate candelabras.

Significance: The mansion represents the obscure and mysterious nature of Martinez. It hides clues to his unknown past.

Parts:

Vintage Library: Floor-to-ceiling bookshelves lined with old leatherbound books, cozy armchairs nestled around a fireplace. Martinez's personal study.
Secret Chambers: Concealed rooms behind bookcases thought to hold Martinez's most confidential possessions.
Grand Study: Filled with artifacts in glass cases - sculptures, ancient weapons, geological specimens.
Walled Garden: A lush private courtyard with flowering vines climbing the brick walls.
Underground Speakeasy: Accessed by a secret staircase, with prohibition-era decor.
Activities: Studying, entertaining fellow academics, playing chess, smoking cigars.

</location object>




<memory object>

ID: M001
Character Name: Alex Thompson
Description: Receiving his first guitar on his 10th birthday.
Timestamp: 2002-03-18 09:00:00

Attention Protocol:

Perceptions: The warmth of the morning sun, the excitement in the air.
Hearing: Laughter and birthday songs, the strum of the guitar.
Seeing: A brand new guitar with a shiny mahogany finish.
Sensing: Smooth guitar strings under his fingers.
Smelling: The new scent of polished wood.
Tasting: Sweet birthday cake.
Feeling: Overwhelmed with joy and anticipation.
Thinking: Dreaming of becoming a great musician.
Feelings: joyful, excited, grateful
Needs: expression, recognition
Goals: learning to play the guitar
Thoughts:

This is the best gift ever.
I can't wait to play.
References:
</memory object>





<memory object>

ID: M002
Character Name: Alex Thompson
Description: Getting lost in a forest during a family camping trip.
Timestamp: 2003-07-12 15:00:00

Attention Protocol:

Perceptions: The mystery of the forest, the sounds of nature.
Hearing: Birds chirping, leaves rustling.
Seeing: Tall trees, dappled sunlight, unfamiliar trails.
Sensing: Rough bark, the chill of shadows.
Smelling: Earthy scent of the woods.
Tasting: The dryness of panic.
Feeling: Initially curious, then scared.
Thinking: How will I find my way back?
Feelings: curious, anxious, lost
Needs: safety, reassurance
Goals: finding a way back to the campsite
Thoughts:

Why did I wander off?
I hope someone finds me.
References:
</memory>




<memory object>

ID: M003
Character Name: Alex Thompson
Description: Playing the guitar in a school talent show.
Timestamp: 2005-06-10 19:00:00

Attention Protocol:

Perceptions: Spotlight heat, the hush of an audience.
Hearing: His own heartbeat, later applause.
Seeing: Blinding stage lights, glimpses of familiar faces.
Sensing: The guitar's neck, sweaty palms.
Smelling: Stage smoke.
Tasting: Dry mouth from nervousness.
Feeling: Nervous, then proud.
Thinking: I hope I don't mess up.
Feelings: nervous, proud, relieved
Needs: acceptance, confidence
Goals: giving a flawless performance
Thoughts:

I can do this.
They are enjoying it.
References:
</memory object>




It is a warm summer evening, saturday. 


Continue to write the next timestep (and only that one) including its events & mindstate objects for all characters in the events. Simulate the behavior of the characters and the environment in a plausible, emotionally exciting, intelligent and emotionally interesting manner. if a character is acting in the description of an event, he or she has to be in the participant list. And if to characters are interacting with each other e.g. showing each other something, they have to be in the same location or they have to use some kind of Tele communication. If the two characters have been in a certain location and they did not leave it during the description of an event, they have to be in the same location at the next time step. Consider that the characters have to move from the location they are into another location and that every action say take and everything they do or say has to be written out in full Details during an event. For example, if a character ist currently in the living room and should be in the kitchen, this has to be explained how she moves there. Fulfill this task accurately with high intelligence and emotional intelligence. each time step has to contain at least one event. each event has a location, a description, participants, a "stream of conciousness" for each participant & a transition for each character. Each of the main characters has to participate in exactly one event. If both of them are in the same event, one event is sufficent for this time step. One character can not be in 2 events of the same time step. Each character has a "stream of consciousness" , an inner Monologue that describes what the character is perceiving, hearing, seeing, sensing, smelling, tasting, feeling and thinking. A transition is a summary about where a character was at the beginning of a time time and where he / she will be at the beginning of the next time step. The description should describe in details what happens during this event, who is doing what and what happens in these 10 seconds. Every word / sentence that character say should be written in full details in the description in direct speech in quotation marks. In the description can only actions or processes be contained, that can plausibly happen within 10 seconds. One time step has the duration of 10 seconds. 
Strictly follow this format:


---

<time-step object>
- ID: Unique identification number.
- Timestamp: Date and time in the simulated world.
- Events: A list of event objects that belong to the time step, each having its own details.
</time-step object>

---



<event object>
- ID: Unique identification number.
- Timestamp: Date and time of the event in the simulated world.
- Description: Detailed description of the event.
- Active Characters: List of active characters involved.
- Passive Characters: List of passive characters involved.
- Location: Location description or location ID.
- References: List of IDs of causally or dramatically linked event objects.

  - Memory Objects for Characters:
    - <memory object>
      - ID: Unique identification number.
      - Character Name: Name of the first active character.
      - Description: Description of the character's experience during this event.
      - Timestamp: Date and time of the event in the simulated world.
      - Attention Protocol: Descriptions of the character's sensory experiences, emotions, and thoughts during the event.
      - Feelings: List of feelings during the event.
      - Needs: List of needs during the event.
      - Goals: List of goals during the event.
      - Thoughts: List of central thoughts during the event.
      - References: List of associated memory objects related to this event.
    </memory object>

    - *(... Repeat for every other active character ...)*

</event object>



start by writing a python list of all active characters in this simulation.

Then WRITE 1 TIMESTEP WITH SEVERAL EVENTS & THE ACCORDING MEMORY OBJECTS FOR EACH CHARACTER. MAKE SURE EACH ACTIVE CHARACTER PARTICIPATES IN 1 EVENT IN EACH TIMESTEP. Make sure that every active character is in exactly one event. write OUT ALL MEMORY AND EVENT OBJECTS IN FULL DETAILS.
make sure to start by writing a python list of all active characters in this simulation.