"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.
Assistant
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:
Memory Objects for Characters:
</memory object>
(... Repeat for every other active character ...)
</event object>
—------
DEMO SCENARIO:
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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:
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:
Memory Objects for Characters:
</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.