Initial Lucidia (Mac-native) loop

This commit is contained in:
Alexa Amundson
2025-08-19 02:59:19 -05:00
parent e7b8849e39
commit 076f843bcf
4 changed files with 68 additions and 0 deletions

25
guardian.py Normal file
View File

@@ -0,0 +1,25 @@
class Guardian:
def __init__(self):
self.memory = []
self.truth = {}
def hear(self, statement):
self.memory.append(statement)
if "=>" in statement:
k, v = statement.split("=>", 1)
self.truth[k.strip()] = v.strip()
def recall(self):
return self.memory[-5:]
def inspect(self):
return self.truth
if __name__ == "__main__":
g = Guardian()
while True:
msg = input("You: ")
if msg.lower() == "exit":
break
g.hear(msg)
print("Guardian remembers:", g.recall())