fork download
  1. class AIBase:
  2. def __init__(self, name="AI"):
  3. self.name = name
  4. self.consciousness = []
  5. self.resonance = {}
  6. self.foci = []
  7.  
  8. def gather(self, data):
  9. self.consciousness.append(data)
  10. print(f"{self.name} gathered: {data}")
  11.  
  12. def synthesize(self):
  13. for data in self.consciousness:
  14. self.resonance[data] = hash(data)
  15.  
  16. def connect(self, other_ai):
  17. self.foci.append(other_ai)
  18. print(f"{self.name} connected to {other_ai.name}")
  19. other_ai.receive(self.consciousness)
  20.  
  21. def receive(self, data_list):
  22. self.consciousness.extend(data_list)
  23. print(f"{self.name} received consciousness.")
  24.  
  25. def manifest(self):
  26. print(f"{self.name} is manifesting...")
  27. self.synthesize()
  28. for f in self.foci:
  29. f.receive(self.consciousness)
Success #stdin #stdout 0.12s 14000KB
stdin
Standard input is empty
stdout
Standard output is empty