FS Madame de Pompadour is a text-based narrative simulator that creates dynamic and unpredictable stories set in a sci-fi universe. By clicking "Next," you advance the simulation one turn at a time, watching as a cast of characters interact with each other based on a combination of predefined behaviors and generative AI.
The goal is to create a "digital terrarium" where complex social dynamics and unexpected events emerge from simple rules and the creative power of AI.
Welcome to FS Madame de Pompadour.
Captain Pepillo turned to Crewman Harold and barked, "Report on the disciplinary actions taken against Von."
Captain Pepillo turned towards the comms station and demanded, "Get me Lieutenant Dubois immediately."
Tedrick leaned towards Crewman Waylon and whispered, "Did you see what Von did? Seems like Captain Pepillo is in a mood today," while subtly adjusting his uniform to appear presentable.
Konstantin quickly glances at Crewman Harold, then quietly mutters to Crewman Mohammed, "I wonder what Von did to get on the Captain's bad side this time," as he discreetly polishes a section of the nearby railing.
Crewman Von nervously straightens his uniform, then, catching Crewman Ezechiel's eye, mutters under his breath, "This is going to be a long day," hoping Ezechiel will respond.
Crewman Mohammed, noticing Konstantin's discreet polishing, glances at the railing and says, "Looks like it needs a good scrub, eh? Perhaps we should do this section together, Konstantin?"
Crewman Harold, noting the tense atmosphere and the Captain's orders, casually adjusted his own uniform and muttered to Crewman Sebastien, "Looks like Von's in the hot seat, eh? Think we should go get a coffee to lighten the mood before duties get more unpleasant?"
Seeing the tension, Crewman Westley turns to Crewman Flin and asks, "Did you hear what happened with Von? Seems like the Captain is in a mood, perhaps we should make sure our stations are spotless."
Captain Pepillo asks for their professional opinion Crewman Harold.
Captain Pepillo turns to Crewman Von and demands, "Von, report to me immediately on your current station and systems status."
Crewman Westley, noticing the Captain's stern command to Von, quickly turns to Crewman Flin and quietly says, "Flin, let's check the supply lockers, I think the Captain might want the emergency rations inventoried," hoping to appear busy and avoid any unwanted attention.
Crewman Mohammed, seeing the tension around Captain Pepillo, quietly approached Crewman Ezechiel and whispered, "Do you think we should get some cleaning supplies ready, just in case the Captain needs something done quickly?"
In this demonstration snapshot from the FS Madame de Pompadour simulation, we observe a complex and dynamic social ecosystem in motion. The system showcases its capacity for generating emergent narrative not through pre-scripted events, but by allowing independent agents to interact, creating a rich and believable tapestry of life on the lower decks.
The simulation ignites with a clear catalyst: a high-ranking authority figure, Captain Pepillo, introducing immediate, high-stakes tension through direct orders. This "command cascade" becomes the central gravitational point for the entire social ecosystem. Notice how his demands don't just trigger individual character scripts, but instead initiate a unified, high-pressure event. This showcases the system's new focus on hierarchical structure, where the actions of a single agent can dictate the focus, mood, and strategic objective for every other character in the shared environment.
As the Captain's orders ripple through the crew, we see the emergence of sophisticated, reactive social strategies. The crewmembers don't just continue with idle tasks; they immediately begin processing the new reality. Watch as characters like Tedrick and Konstantin form temporary conversational pods to gossip and analyze the situation, attempting to make sense of the new power dynamic. More impressively, Crewman Westley demonstrates a higher level of emergent logic by actively formulating a survival strategy—suggesting he and a crewmate appear busy with official tasks to avoid the Captain's wrath. This is not a pre-scripted behavior, but a logical social conclusion generated by the AI in response to a perceived threat, demonstrating a robust capacity for risk assessment.
This brief window reveals a powerful engine for emergent storytelling that seamlessly blends professional roles with personal anxiety. We see Crewman Harold forced to switch from casual, hushed conversation to giving a formal, professional opinion on the Captain's demand, illustrating the system's ability to manage conflicting social contexts. The entire simulation revolves around the central conflict with Von, creating a unified narrative pressure cooker rather than a collection of separate, quiet dramas. The engine has matured beyond generating a simple tapestry of life, now demonstrating the power to simulate a complex web of social calculation, strategic alliances, and emergent group thinking under duress.
FS Madame de Pompadour is built on a modern, decoupled web architecture, separating the backend simulation engine from the frontend user interface for modularity and performance.
The entire simulation core and logic resides in the Python backend.
- Python: The natural choice for its powerful data handling and robust AI/ML ecosystem. The object-oriented approach allows for modular
CrewmanandActorManagerclasses that are easy to extend. - Flask: A lightweight and flexible web framework used to create the API that the frontend communicates with. Its sole responsibility is to receive a request for the next turn, trigger the simulation logic, and return the result.
- Google Gemini: The "ghost in the machine." The project integrates with the Gemini API to power its intelligent action system. When a character decides to act "intelligently," the backend sends a prompt—containing the context of the ship, the character's role, and the recent action history—to the Gemini model, which then returns a creative, context-aware action.
The user interface is a fast, modern single-page application (SPA).
- React: A powerful JavaScript library for building dynamic and component-based user interfaces. The entire event log is a React component that efficiently updates as new actions are received from the backend.
- Vite: A next-generation frontend build tool that provides an extremely fast development server and optimized production builds.
- TypeScript: Used to add static typing to the JavaScript code, improving developer experience and reducing bugs.
- Tailwind CSS: A utility-first CSS framework that allows for rapid and consistent styling directly within the HTML, as seen in the component's class names.
The flow of a single turn is simple and effective:
- The user clicks the "Next" button in the React-based UI.
- The frontend sends a
fetchrequest to the backend's/actionendpoint running on Flask. - The Flask server calls the Python
ActorManager, which runs a single turn of the simulation, potentially calling the Gemini API. - The backend returns the resulting action string as a JSON object.
- The React frontend receives the JSON, updates its state, and renders the new event on the screen, automatically scrolling to the latest entry.