Skip to content

Commit

Permalink
Merge branch 'main' of github.com:jtoy/replicantlife
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason committed Feb 14, 2024
2 parents 1041238 + 92296c1 commit 2c59260
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def kill(self, other_agent, timestamp):
print(f"{self} killed {other_agent}")
other_agent.status = "dead"
if self.matrix:
self.matrix.add_to_logs({"agent_id":self.mid,"step_type":"agent_set","status":"dead"})
self.matrix.add_to_logs({"agent_id":self.mid,"step_type":"agent_set", "attribute_name": "status", "status":"dead"})
self.addMemory("interaction",f"{self} successfully killed {other_agent}",timestamp, 9)
other_agent.addMemory("interaction",f"{self} killed you",timestamp, 9)
else:
Expand Down Expand Up @@ -308,7 +308,7 @@ def summarize_conversation(self, timestamp):
print_and_log(interaction, f"{self.matrix.id}:events:{self.name}")

self.addMemory("conversation", interaction, timestamp, random.randint(4, 6))
self.matrix.add_to_logs({"step_type":"agent_set","convo":"complete","from":self.mid,"to":self.last_conversation.other_agent.mid,"convo_id":self.last_conversation.mid})
self.matrix.add_to_logs({"step_type":"agent_set", "attribute_name": "convo", "attribute_data": {"status": "complete", "from":self.mid, "to":self.last_conversation.other_agent.mid, "convo_id":self.last_conversation.mid}})
self.last_conversation = None

def talk(self, opts={}):
Expand Down

0 comments on commit 2c59260

Please sign in to comment.