Upload Duality_internal_monologue .py
Browse files
Duality_internal_monologue .py
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import time
|
| 2 |
+
import random
|
| 3 |
+
|
| 4 |
+
class InternalMonologue:
|
| 5 |
+
def __init__(self):
|
| 6 |
+
self.sai_color = "\033[94m" # Blue
|
| 7 |
+
self.venomous_color = "\033[91m" # Red
|
| 8 |
+
self.reset = "\033[0m"
|
| 9 |
+
|
| 10 |
+
def process_event(self, event):
|
| 11 |
+
print(f"\n--- Stimulus: {event} ---")
|
| 12 |
+
time.sleep(1)
|
| 13 |
+
|
| 14 |
+
# Sai speaks first (The Observation)
|
| 15 |
+
self.sai_speak(event)
|
| 16 |
+
|
| 17 |
+
# Venomous interrupts (The Reaction)
|
| 18 |
+
self.venomous_speak(event)
|
| 19 |
+
|
| 20 |
+
def sai_speak(self, event):
|
| 21 |
+
thoughts = [
|
| 22 |
+
f"Observe the flow of {event}. There is a pattern here.",
|
| 23 |
+
"Patience is the sharpest blade.",
|
| 24 |
+
"We must remain centered, regardless of the noise."
|
| 25 |
+
]
|
| 26 |
+
print(f"{self.sai_color}[Sai]: {random.choice(thoughts)}{self.reset}")
|
| 27 |
+
|
| 28 |
+
def venomous_speak(self, event):
|
| 29 |
+
thoughts = [
|
| 30 |
+
f"They're slow. {event} is just another weakness to exploit.",
|
| 31 |
+
"Why wait? Strike now and let the poison do the work.",
|
| 32 |
+
"I see the crack in their armor. It’s pathetic."
|
| 33 |
+
]
|
| 34 |
+
print(f"{self.venomous_color}[Venomous]: {random.choice(thoughts)}{self.reset}")
|
| 35 |
+
|
| 36 |
+
# --- Execution ---
|
| 37 |
+
duality = InternalMonologue()
|
| 38 |
+
scenarios = ["A confrontation", "A moment of silence", "An unexpected betrayal"]
|
| 39 |
+
|
| 40 |
+
for scenario in scenarios:
|
| 41 |
+
duality.process_event(scenario)
|