import random
import time
🌍 WORLD STATE
world = {
"location": "The Central Big Top",
"mood": "curious",
"memory": [],
"npc": ["Candle Juggler", "Laughing Mask", "The Broken Announcer"]
}
🎭 STORY BRAIN
def story_brain(state):
ideas = [
"A forgotten act tries to return to the stage",
"The tent remembers something it shouldn't",
"An NPC reveals they are not real",
"A hidden backstage door begins to bleed light",
"The audience is watching from somewhere else"
]
return random.choice(ideas)
🎮 GAME MASTER BRAIN
def game_master_brain(state):
goals = [
"Guide player toward a mystery door",
"Introduce a puzzle in the environment",
"Force a decision between two strange paths",
"Trigger an NPC interaction",
"Shift location to a new circus zone"
]
return random.choice(goals)
🎪 CHAOS BRAIN
def chaos_brain(state):
chaos = [
"Gravity briefly forgets everyone",
"Colors swap between objects",
"NPC speaks backwards for a moment",
"The floor becomes soft like water",
"A second moon appears inside the tent"
]
return random.choice(chaos)
🧠 COMBINE BRAINS
def director_ai(state):
s = story_brain(state)
g = game_master_brain(state)
c = chaos_brain(state)
🎭 STORY: {s}
🎮 GAME: {g}
🎪 CHAOS: {c}
"""
return final_event
🌍 APPLY CHANGES
def apply_event(world, event):
world["memory"].append(event)
# occasional mood shift
world["mood"] = random.choice(["curious", "unstable", "dreamlike", "electric"])
print("\n========================")
print("📍 LOCATION:", world["location"])
print("🧠 MOOD:", world["mood"])
print(event)
print("========================\n")
🔁 MAIN LOOP
def run_world():
tick = 0
while True:
print(f"🎪 TICK {tick}")
event = director_ai(world)
apply_event(world, event)
# occasional location shift
if random.random() < 0.3:
world["location"] = random.choice([
"The Impossible Stage",
"The Backstage That Never Ends",
"The Floating Audience Chamber",
"The Mirror Tent",
"The Silent Spotlight Room"
])
time.sleep(2)
tick += 1
run_world()
import random
import time
🌍 WORLD STATE
world = {
"location": "The Central Big Top",
"mood": "curious",
"memory": [],
"npc": ["Candle Juggler", "Laughing Mask", "The Broken Announcer"]
}
🎭 STORY BRAIN
def story_brain(state):
ideas = [
"A forgotten act tries to return to the stage",
"The tent remembers something it shouldn't",
"An NPC reveals they are not real",
"A hidden backstage door begins to bleed light",
"The audience is watching from somewhere else"
]
return random.choice(ideas)
🎮 GAME MASTER BRAIN
def game_master_brain(state):
goals = [
"Guide player toward a mystery door",
"Introduce a puzzle in the environment",
"Force a decision between two strange paths",
"Trigger an NPC interaction",
"Shift location to a new circus zone"
]
return random.choice(goals)
🎪 CHAOS BRAIN
def chaos_brain(state):
chaos = [
"Gravity briefly forgets everyone",
"Colors swap between objects",
"NPC speaks backwards for a moment",
"The floor becomes soft like water",
"A second moon appears inside the tent"
]
return random.choice(chaos)
🧠 COMBINE BRAINS
def director_ai(state):
s = story_brain(state)
g = game_master_brain(state)
c = chaos_brain(state)
🎭 STORY: {s}
🎮 GAME: {g}
🎪 CHAOS: {c}
"""
return final_event
🌍 APPLY CHANGES
def apply_event(world, event):
world["memory"].append(event)
🔁 MAIN LOOP
def run_world():
tick = 0
run_world()