|
|
import random |
|
|
import time |
|
|
from datetime import datetime |
|
|
from typing import Dict, Any |
|
|
|
|
|
|
|
|
MEMORY_FILE = "psychic_readings_log.txt" |
|
|
|
|
|
|
|
|
|
|
|
def _clairvoyance_oracle(query: str) -> Dict[str, Any]: |
|
|
""" |
|
|
Simulates seeing a future event (Clairvoyance) using weighted probability. |
|
|
""" |
|
|
now = datetime.now().strftime("%Y-%m-%d %H:%M:%S") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
base_weight = len(query) % 5 |
|
|
|
|
|
outcomes = [ |
|
|
{"prediction": "A significant positive change will manifest soon.", "certainty": 0.85}, |
|
|
{"prediction": "A minor delay or obstacle will need to be overcome.", "certainty": 0.65}, |
|
|
{"prediction": "The situation will resolve neutrally, requiring patience.", "certainty": 0.70}, |
|
|
{"prediction": "The outcome is highly volatile and requires further data.", "certainty": 0.40}, |
|
|
] |
|
|
|
|
|
|
|
|
if base_weight >= 3: |
|
|
|
|
|
weighted_outcomes = outcomes[1:] |
|
|
else: |
|
|
|
|
|
weighted_outcomes = outcomes[:3] |
|
|
|
|
|
|
|
|
result = random.choice(weighted_outcomes) |
|
|
|
|
|
return { |
|
|
"timestamp": now, |
|
|
"query": query, |
|
|
"mode": "Clairvoyance", |
|
|
"result": result["prediction"], |
|
|
"certainty": round(result["certainty"] * random.uniform(0.9, 1.1), 2) |
|
|
} |
|
|
|
|
|
def _telepathy_scanner(subject_name: str, hidden_intent: str) -> Dict[str, Any]: |
|
|
""" |
|
|
Simulates reading a hidden intent/feeling (Telepathy) using keyword analysis. |
|
|
In a real system, 'hidden_intent' would be another model's output (e.g., Sentiment analysis). |
|
|
""" |
|
|
|
|
|
|
|
|
keywords = { |
|
|
"positive": ["help", "support", "collaborate", "trust", "joy"], |
|
|
"negative": ["deceive", "compete", "hide", "manipulate", "exploit"] |
|
|
} |
|
|
|
|
|
score = 0 |
|
|
for keyword in keywords["positive"]: |
|
|
if keyword in hidden_intent.lower(): |
|
|
score += 1 |
|
|
|
|
|
for keyword in keywords["negative"]: |
|
|
if keyword in hidden_intent.lower(): |
|
|
score -= 1 |
|
|
|
|
|
|
|
|
if score >= 1: |
|
|
reading = f"The subject, {subject_name}, holds a strong intent of cooperation and mutual benefit." |
|
|
accuracy = 0.9 |
|
|
elif score <= -1: |
|
|
reading = f"Caution advised. {subject_name}'s true intent is competitive or guarded." |
|
|
accuracy = 0.7 |
|
|
else: |
|
|
reading = f"{subject_name} is operating with a mix of neutral and unclear intentions." |
|
|
accuracy = 0.55 |
|
|
|
|
|
return { |
|
|
"subject": subject_name, |
|
|
"mode": "Telepathy", |
|
|
"result": reading, |
|
|
"simulated_accuracy": accuracy |
|
|
} |
|
|
|
|
|
def log_reading(data: Dict): |
|
|
"""Appends the reading to a local log file.""" |
|
|
try: |
|
|
with open(MEMORY_FILE, 'a') as f: |
|
|
f.write(str(data) + "\n") |
|
|
except Exception as e: |
|
|
print(f"Error logging data: {e}") |
|
|
|
|
|
|
|
|
|
|
|
class AuraPredictor: |
|
|
def __init__(self, name="AuraPredictor"): |
|
|
self.name = name |
|
|
print(f"\n[{self.name}]: Initializing Trans-Dimensional Sensors...") |
|
|
time.sleep(0.5) |
|
|
|
|
|
def read_future(self, question: str): |
|
|
"""Activates the Clairvoyance mode.""" |
|
|
print(f"\n[AuraPredictor]: Focusing on the timeline for: '{question}'...") |
|
|
reading = _clairvoyance_oracle(question) |
|
|
|
|
|
print("-" * 40) |
|
|
print(f"| PREDICTION: {reading['result']}") |
|
|
print(f"| Certainty Level: {reading['certainty']:.2f}") |
|
|
print("-" * 40) |
|
|
|
|
|
log_reading(reading) |
|
|
return reading |
|
|
|
|
|
def read_intent(self, subject: str, data_input: str): |
|
|
"""Activates the Telepathy mode.""" |
|
|
print(f"\n[AuraPredictor]: Scanning the hidden intent of subject: {subject}...") |
|
|
|
|
|
|
|
|
|
|
|
reading = _telepathy_scanner(subject, data_input) |
|
|
|
|
|
print("-" * 40) |
|
|
print(f"| TELEPATHIC READING: {reading['result']}") |
|
|
print(f"| Accuracy Proxy: {reading['simulated_accuracy']:.2f}") |
|
|
print("-" * 40) |
|
|
|
|
|
log_reading(reading) |
|
|
return reading |
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__": |
|
|
psychic_ai = AuraPredictor() |
|
|
|
|
|
|
|
|
future_query = "Will the next major project launch successfully?" |
|
|
psychic_ai.read_future(future_query) |
|
|
|
|
|
|
|
|
|
|
|
subject_1 = "Lead Developer Kai" |
|
|
hidden_data_1 = "I plan to collaborate closely with the team and support the new deployment." |
|
|
psychic_ai.read_intent(subject_1, hidden_data_1) |
|
|
|
|
|
subject_2 = "External Competitor Z" |
|
|
hidden_data_2 = "Our goal is to deceive their market and exploit their current vulnerabilities." |
|
|
psychic_ai.read_intent(subject_2, hidden_data_2) |
|
|
|
|
|
print(f"\n--- Simulation Complete. Readings saved to {MEMORY_FILE} ---") |
|
|
|