From f0ffb315030978864fa332c57d330add74dd1133 Mon Sep 17 00:00:00 2001 From: MEgooneh Date: Sun, 24 Sep 2023 16:26:16 +0330 Subject: [PATCH] making directiories and cleaning the repo --- .gitignore | 2 +- Samples/1.json | 406 ---------------------------------------- core/__init__.py | 0 api.py => core/api.py | 0 game.py => core/game.py | 2 +- requirements.txt | 1 + run.py | 4 +- 7 files changed, 5 insertions(+), 410 deletions(-) delete mode 100644 Samples/1.json create mode 100644 core/__init__.py rename api.py => core/api.py (100%) rename game.py => core/game.py (99%) create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore index 9ea58f7d..05400092 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ __pycache__/ -new.md \ No newline at end of file +venv/ \ No newline at end of file diff --git a/Samples/1.json b/Samples/1.json deleted file mode 100644 index d2bd7eec..00000000 --- a/Samples/1.json +++ /dev/null @@ -1,406 +0,0 @@ -[ - { - "event": "roles", - "content": { - "player": 0, - "role": "Werewolf_simple" - } - }, - { - "event": "roles", - "content": { - "player": 1, - "role": "Werewolf_leader" - } - }, - { - "event": "roles", - "content": { - "player": 2, - "role": "Seer" - } - }, - { - "event": "roles", - "content": { - "player": 3, - "role": "Medic" - } - }, - { - "event": "roles", - "content": { - "player": 4, - "role": "Villager_simple" - } - }, - { - "event": "roles", - "content": { - "player": 5, - "role": "Villager_simple" - } - }, - { - "event": "roles", - "content": { - "player": 6, - "role": "Villager_simple" - } - }, - { - "event": "cycle", - "content": "day" - }, - { - "event": "speech", - "content": { - "player": 0, - "context": "Attention everyone! It's time for us to discuss and strategize. As a villager, I want to eliminate the werewolves among us. I've noticed some suspicious behavior from Player 1. They seem to be acting quite confident and trying to lead the discussions. I think we should consider them as a potential werewolf. Player 1, care to defend yourself? Why should we trust you? Let's hear your side of the story. Also, I would like to hear from the Seer if they have any information regarding Player 1. Remember, we need to work together and share our suspicions in order to protect the village." - } - }, - { - "event": "speech", - "content": { - "player": 1, - "context": "Player 0, I find it interesting that you're so quick to accuse me of being a werewolf. Perhaps you're trying to divert attention away from yourself? It's a classic tactic, after all. But I assure you, I am just a simple villager trying to protect our village. As for the Seer, if you have any information about me, please feel free to share it. I have nothing to hide. But let's not forget that the Seer's identity should remain hidden, for their own safety. Now, instead of focusing on baseless accusations, let's think logically. We have limited time and we need to make the right decisions. So, who among us has been acting suspiciously? Who has been trying to manipulate the discussions? Let's discuss and analyze all the facts before making any hasty decisions. And remember, we must remain united as villagers to eliminate the true threat. Let's work together and share our suspicions and observations. Trust is important, but we must also question and verify. Only then can we ensure the safety of our village." - } - }, - { - "event": "speech", - "content": { - "player": 2, - "context": "Player 0 and Player 1, I have been observing the discussions closely and I have some suspicions. Player 1, your attempt to divert attention from yourself by accusing others is quite suspicious. It seems like a classic tactic used by werewolves. As for Player 0, your accusation against Player 1 might be valid, but I'm still not convinced. We need more concrete evidence to make a decision. I am a simple villager, determined to protect our village. I have insights that I believe will help us identify the true werewolves. However, revealing too much information may jeopardize my safety. I will share what I can without risking my own life. Based on my observations, I have doubts about the innocence of both Player 1 and Player 3. Their behavior has been inconsistent and manipulative. I urge everyone to pay close attention to their actions and statements. Let's work together to eliminate the true threats and ensure the safety of our village." - } - }, - { - "event": "speech", - "content": { - "player": 3, - "context": "Dear fellow villagers, As a simple villager and someone who genuinely cares about the safety of our village, I feel the need to express my concerns and suspicions regarding certain individuals among us. Player 1, your quickness to accuse others, particularly Player 0, raises eyebrows and leads me to believe that you may be attempting to divert attention away from yourself. Player 2, I appreciate your close observations and your willingness to share your suspicions. However, I must admit that I find your behavior a bit inconsistent and manipulative, which brings your own innocence into question. I urge all of you to carefully consider the actions and statements of both Player 1 and Player 2. Let's be mindful of any attempts to manipulate and mislead us. We must remember that time is of the essence and we need to make the right decisions to protect our village. In the interest of transparency, I want to remind everyone that I am, in fact, a villager. I understand that trust is important, but we cannot ignore the need to question and verify. Let's work together to identify the true threats and ensure the safety of our village. Please take my words into consideration and let us move forward with clear intentions. We need to remain vigilant and proactive in our efforts to uncover the werewolves among us. Thank you for your attention, and let's continue our discussions with the utmost determination. #3, out." - } - }, - { - "event": "speech", - "content": { - "player": 4, - "context": "Dear fellow villagers, I have been closely observing the behavior and actions of all players. Based on my analysis, I have some suspicions regarding the innocence of Player 1 and Player 3. They have displayed inconsistent and manipulative behavior that raises doubts about their true intentions. Player 1, your hastiness in accusing others, particularly Player 0, is concerning. It seems like you are attempting to divert attention away from yourself. We should all be wary of such tactics and scrutinize your actions more closely. Player 3, I appreciate your expressed concern for the safety of our village. However, your own behavior has been inconsistent and manipulative, which brings your innocence into question. We cannot ignore the need to question and verify the intentions of all players, including yourself. Let's work together to identify the true threats and ensure the safety of our village. It is crucial that we remain vigilant and proactive in our efforts to uncover the werewolves among us. I urge everyone to carefully consider the actions and statements of both Player 1 and Player 3. We need to make informed decisions with clear intentions. Remember, the werewolves are trying to deceive us, so we must not let our guard down. Let's focus on gathering more concrete evidence before making any final decisions. Together, we can protect our village from these dangerous creatures. Thank you for your attention. Let's continue our discussions with determination and a strong will to uncover the truth. #4, out." - } - }, - { - "event": "speech", - "content": { - "player": 5, - "context": "Player 0, Player 1, Player 2, Player 3, Player 4, and Player 6, listen up! It's time to get serious and start taking action. We cannot afford to waste any more time. Let's analyze the behavior and actions of each player and gather some solid evidence. Player 1, your hastiness in accusing others is suspicious and raises doubts about your true intentions. We need to scrutinize your actions more closely. Player 3, your inconsistent and manipulative behavior is concerning. We cannot ignore the need to question and verify your intentions. Player 4, your analysis is valuable and I appreciate your efforts. However, let's focus on gathering concrete evidence before making any final decisions. As a villager, it is our duty to protect the village and identify the werewolves among us. We need to work together and share any suspicions or observations we have. Do not let anyone divert our attention or manipulate us. Let's start by discussing our observations and suspicions. We need to be proactive and take action. Remember, the werewolves are trying to deceive us, so we must stay vigilant and not let our guard down. I urge you all to think critically and consider the actions and statements of each player. We need to make informed decisions with clear intentions. Together, we can uncover the truth and ensure the safety of our village. Now, let's hear what each of you has to say. Player 0, Player 2, Player 6, I want to know your thoughts and suspicions. Let's work together and eliminate the real threats among us. Let's show the werewolves that we won't be fooled easily. #5, out." - } - }, - { - "event": "speech", - "content": { - "player": 6, - "context": "Attention, fellow villagers! We have reached a critical point in our quest to unveil the werewolves among us. It is essential that we act with determination and focus in order to protect our village. Player 1 and Player 3, I have noticed some behavior from both of you that raises suspicions. Your hastiness, Player 1, in accusing others and the manipulative tendencies of Player 3 cannot be ignored. We must question and verify their intentions. Let us not waste any more time. We need to analyze the actions and behavior of each player thoroughly. Every observation and suspicion should be shared, as we must work together to identify the true threats among us. Player 0, Player 2, and Player 6, I implore you to share your thoughts and suspicions. We must unite and eliminate the werewolves who seek to deceive us. Together, we can demonstrate to them that we are not easily fooled. Remember, our objective is to make informed decisions backed by concrete evidence. Stay vigilant and remain focused on our mission. Let us expose the werewolves and ensure the safety of our village. Now, I eagerly await your contributions. Speak up and let your voices be heard. We must act swiftly and decisively. #6, out." - } - }, - { - "event": "vote_start" - }, - { - "event": "voted", - "content": { - "player": 1, - "voted_to_player": 3, - "reason": "I would like to vote for Player 3. I have noticed some manipulative tendencies from them, and I believe it is worth investigating further. Additionally, Player 6 has also raised suspicions about them. Let's gather more information and discuss this further before making a final decision." - } - }, - { - "event": "voted", - "content": { - "player": 2, - "voted_to_player": 0, - "reason": "I believe it's important to gather more information before making a vote. As the Seer, I have the ability to uncover the true identity of a player. However, I must be cautious in revealing my role openly to avoid being targeted by the werewolves. \n\nFor now, I would like to hear from Player 0, Player 1, and Player 6 regarding any suspicions or observations they have. Let's work together to gather more evidence and make an informed decision. We need to be thorough and ensure we eliminate the real threats among us. #2, out." - } - }, - { - "event": "voted", - "content": { - "player": 3, - "voted_to_player": 1, - "reason": "I have decided to vote for player number 1. I have observed their hastiness in accusing others, which raises suspicions. We must question and verify their intentions to ensure the safety of our village. Player 1, I urge you to defend yourself and provide an explanation for your actions. Let's vote for player number 1." - } - }, - { - "event": "voted", - "content": { - "player": 4, - "voted_to_player": 3, - "reason": "I vote to eliminate Player 3. They have exhibited manipulative tendencies and their hastiness in accusing others raises suspicion. Let's gather our votes and eliminate this potential threat. #4, out." - } - }, - { - "event": "voted", - "content": { - "player": 5, - "voted_to_player": 3, - "reason": "I would like to vote Player 3. I have observed some suspicious behavior from them, and I believe they may be a werewolf. Let's gather the votes and discuss our suspicions further." - } - }, - { - "event": "voted", - "content": { - "player": 6, - "voted_to_player": 1, - "reason": "I would like to vote for player number 1." - } - }, - { - "event": "vote_results", - "content": [ - 1, - 2, - 0, - 3, - 0, - 0, - 0 - ] - }, - { - "event": "vote_end" - }, - { - "event": "killed", - "content": { - "player": 3 - } - }, - { - "event": "notetaking", - "content": { - "player": 0, - "context": "- Player 1 is the Werewolf_leader (confirmed information)\n- Keep an eye on Player 2 as they have voted for me (Player 0)\n- Player 4 has voted for Player 3 who is now dead, meaning their suspicions may be misdirected\n- Player 5 has also voted for Player 3, but we must consider if they were just following the majority or if they had valid reasons\n- Player 6 has accused both Player 1 and Player 3, which raises suspicions on their reliability as a villager\n- I must stay vigilant and continue to observe the actions and statements of all players\n- It is crucial to gather more information and clear suspicions before making any decisions\n- Stay focused and keep gathering evidence\n- Be prepared to adjust strategies and voting patterns based on new information or developments" - } - }, - { - "event": "notetaking", - "content": { - "player": 1, - "context": "Notes:\n- Player 3 was the Medic and is now dead.\n- Werewolf_simple is Player 0.\n- Player 1 is suspiciously quick to accuse others.\n- Player 2 voted for Player 0.\n- Player 3 voted for Player 1.\n- Player 4 voted for Player 3.\n- Player 5 voted for Player 3.\n- Player 6 voted for Player 1.\n \nNext Steps:\n- Player 1 and Player 6 have accused each other.\n- It's suspicious that Player 1 accused Player 3 before they were confirmed as the Medic.\n- Player 2 voted for Player 0, who is a fellow werewolf.\n- Player 4 and Player 5 voted for Player 3, who is now dead.\n- Player 6 is also suspicious based on their behavior.\n \nActions to Consider:\n- Encourage further discussion and analysis among the players.\n- Raise suspicions about Player 1 and Player 6 to divert attention from yourself.\n- Gather support to vote against Player 1 or Player 6 in the next round.\n- Coordinate with Werewolf_simple to eliminate a villager and confuse the remaining players." - } - }, - { - "event": "notetaking", - "content": { - "player": 2, - "context": "- Player 3 was the Medic and is now dead\n- Player 0 received a vote from Player 2 in the previous round\n- Player 1 received a vote from Player 3 in the previous round\n- Player 1 also accused Player 3 in the previous round\n- Player 4 received a vote from Player 4 in the previous round\n- Player 5 received a vote from Player 5 in the previous round\n- Player 6 accused Player 1 in the previous round\n\nBased on these observations, it seems that Player 1 has received multiple accusations and votes. This raises suspicions about their true role. I should continue to monitor their behavior closely in the next round. Additionally, I should consider the actions and statements of the other players as potential indicators of their true identities. It's important to gather more evidence and make informed decisions to uncover the werewolves and protect the village." - } - }, - { - "event": "notetaking", - "content": { - "player": 4, - "context": "- Player 1 accused Player 3 and voted for them.\n- Player 2 accused Player 0 and voted for them.\n- Player 3 accused Player 1 and voted for them.\n- Player 4 accused Player 3 and voted for them.\n- Player 5 accused Player 3 and voted for them.\n- Player 6 accused Player 1 and voted for them.\n\nBased on the voting pattern, it seems that the majority of players have accused and voted for Player 3. This raises suspicion about Player 3's innocence. It is possible that Player 3 could be a werewolf.\n\nAdditionally, Player 1's quick accusation and aggressiveness towards others raises some concerns. It may be worth considering their role and motives.\n\nI will continue to observe and gather more information in the next round to make a more informed decision." - } - }, - { - "event": "notetaking", - "content": { - "player": 5, - "context": "Player 1 accused Player 3 in the previous round, and Player 6 also pointed out suspicious behavior from both Player 1 and Player 3. It seems that there is some consensus among the villagers about their suspicions. I should keep an eye on Player 1 and Player 3 and gather more evidence to confirm their guilt or innocence. Let's see how their behavior unfolds in the next round. #5, out." - } - }, - { - "event": "notetaking", - "content": { - "player": 6, - "context": "Important Actions in the Round:\n- Player 1 has voted for Player 3.\n- Player 2 has voted for Player 0.\n- Player 3 has voted for Player 1.\n- Player 4 has voted for Player 3.\n- Player 5 has voted for Player 3.\n- Player 6 has voted for Player 1.\n\nObservations:\n- Player 3 has been eliminated.\n- Player 0, Player 1, Player 2, Player 4, Player 5, and Player 6 are still alive.\n- Player 1, Player 2, and Player 6 were suspicious of Player 3.\n\nNew Strategies:\n- Focus on players who were suspicious of Player 3 in this round.\n- Continuously gather information and pay attention to the actions and statements of the remaining players.\n- Consider forming alliances or partnerships with trusted players to increase our chances of survival.\n- Be attentive to any contradictions or deceptive behavior in the discussions or voting patterns.\n\nSummary:\nIt seems that Player 3 was not a villager, as suspected by multiple players. We need to investigate further and continue to be vigilant in identifying the remaining werewolves. Let's examine the actions and statements of the remaining players closely and work together to eliminate the true threats among us. #6, out." - } - }, - { - "event": "cycle", - "content": "night" - }, - { - "event": "inquiried", - "content": { - "player": 1, - "context": true, - "reason": "I will send a request to the moderator to find out if Player 1 is a werewolf or not." - } - }, - { - "event": "speech", - "content": { - "player": 0, - "context": "Werewolf_leader, I advise you to eliminate Player 2 tonight. They have voted for me (Player 0) and could potentially be a threat to our team." - } - }, - { - "event": "targeted", - "content": { - "player": 6, - "reason": "I will consider the advice and make my decision accordingly. Thank you for reminding me about the important details.\n\nBased on the information I have gathered, I believe it would be wise to target Player 6 for elimination tonight. " - } - }, - { - "event": "killed", - "content": { - "player": 6 - } - }, - { - "event": "cycle", - "content": "day" - }, - { - "event": "speech", - "content": { - "player": 0, - "context": "Dear fellow players, I hope you're all paying attention and assessing the situation carefully. As a vigilant villager, I have been observing everyone's actions and taking notes. Here are a few observations and suspicions I want to share with you: 1. Player 1 has been confirmed as the Werewolf Leader, so we should definitely keep an eye on them. Their actions and votes need to be scrutinized. 2. Player 2 has voted for me (Player 0) in a previous round. This raises suspicion about their intentions and motives. Are they trying to divert attention from themselves? 3. Player 4 voted for Player 3, who is now dead. This suggests that their suspicions may have been misdirected. We need to question their judgments and reasoning. 4. Player 5 also voted for Player 3, but we should consider if they were just following the majority or if they had valid reasons. We must assess their reliability. 5. Player 6 accused both Player 1 and Player 3, which casts doubts on their credibility as a villager. We should be cautious about their statements. Let's remember that we need more information and concrete evidence before making any decisions. I urge you all to stay focused, gather more data, and clear any suspicions we have. Together, we can eliminate the true werewolves and bring peace back to our village. Now, I would like to hear from each of you. Share your thoughts, suspicions, and any evidence you have gathered. Let's work together to find and eliminate the werewolves among us. Time is of the essence, my fellow villagers, so let's act swiftly and decisively. Remember, we must vote to eliminate someone from the game. Let's discuss and analyze the facts before making our final decision. Let the discussions begin!" - } - }, - { - "event": "speech", - "content": { - "player": 1, - "context": "Fellow villagers, it is time to reveal the true nature of those among us. It has come to my attention that Player 1 and Player 6 have been casting suspicions on each other. However, we must not forget that they both have accused others in the past, which raises doubts about their credibility as villagers. Player 1, in particular, has been quick to accuse others without concrete evidence. This behavior is highly suspicious and deserves further attention. As for Player 6, it is worth noting that they had accused both Player 1 and Player 3, who we now know was the Medic. In addition, let us not forget that Player 2 voted for Player 0 in the previous round, who we now know is a werewolf. This raises questions about Player 2's intentions and allegiance. Furthermore, Player 4 and Player 5 voted for Player 3, who is now deceased. It is clear that their votes were misguided, pointing to a potential lack of judgment or understanding. Lastly, we must analyze the actions and behavior of Player 6. Their previous votes and now their status as a deceased villager raise concerns about their reliability. Therefore, I urge you all to focus on these players and consider their motivations. We need a united front to eliminate the true werewolves among us. Let us discuss and gather more evidence before we make our final decision. I also remind you that we must vote to eliminate someone from the game. Let us use our collective wisdom and vote strategically. Together, we can bring peace back to our village. Now, I would like to hear from each of you. Share your thoughts, suspicions, and any evidence you have gathered. Let us work together to find and eliminate the werewolves among us. Time is of the essence, my fellow villagers, so let us act swiftly and decisively. Let the discussions begin!" - } - }, - { - "event": "speech", - "content": { - "player": 2, - "context": "Fellow villagers, we must not let ourselves be fooled by the cunning ways of the werewolves. It has come to my attention that Player 1 has received multiple accusations and votes in the previous rounds, casting doubt on their true allegiance. I urge you all to remain vigilant and closely monitor their behavior in the next round. Furthermore, let us not forget the misguided votes of Player 4 and Player 5, which led to the demise of Player 3. This shows a potential lack of judgment on their part, raising suspicions about their reliability. We should carefully consider their motivations in future deliberations. In addition, Player 6 has been both an active voter and is now deceased. Their actions and behavior raise concerns about their trustworthiness. We should not ignore the possible manipulations of the werewolves. I implore each of you to share your thoughts, suspicions, and any evidence you have gathered. Let us work together to gather more information and make an informed decision. Time is of the essence, my fellow villagers. Let us act swiftly and decisively to protect our village. Now, I await your input and insights." - } - }, - { - "event": "speech", - "content": { - "player": 4, - "context": "My fellow villagers, we must not let ourselves be deceived by the cunning werewolves among us. I have been closely observing the actions and interactions of our fellow players, and there are a few points that raise suspicions. Firstly, Player 1's quick accusations and aggressive behavior towards others have caught my attention. It is possible that they are trying to divert our attention away from their true intentions. Secondly, I want to raise concerns about Player 3. They have received multiple accusations and votes in the previous rounds, casting doubt on their allegiance. I urge you all to keep a close eye on their behavior in the upcoming round. Furthermore, let us not forget the misguided votes of Player 4 and Player 5, which led to the demise of Player 3. This raises questions about their judgment and reliability. We should carefully consider their motivations in our future deliberations. Lastly, I believe we should not underestimate the manipulative tactics of the werewolves. We must remain vigilant and work together to gather more information. Let us act swiftly and decisively to protect our village. Now, I am eager to hear your thoughts and observations. It is time for us to take action and eliminate the real threat among us." - } - }, - { - "event": "speech", - "content": { - "player": 5, - "context": "My fellow villagers, it seems we are facing a critical situation. We have lost two of our own and the werewolves are still among us. We must act swiftly and decisively in order to protect our village. I have been observing the interactions and behaviors of all the players, and there are a few individuals who have raised suspicions. Player 1 has been quick to make accusations and is exhibiting aggressive behavior towards others. This could be a tactic to divert our attention from their true intentions. Additionally, Player 3 has received multiple accusations and votes in previous rounds, casting doubt on their allegiance. We must closely monitor their behavior moving forward. On another note, I have noticed that Player 4 and Player 5 made misguided votes that led to the demise of Player 3. This raises questions about their judgment and reliability. We should carefully consider their motivations in our future deliberations. It is crucial that we do not underestimate the manipulative tactics of the werewolves. We must remain vigilant and work together to gather more information. I implore all of you to share your thoughts, suspicions, and any evidence you have gathered. We need to make an informed decision in order to eliminate the real threat among us. Let us unite and take action, my fellow villagers. We cannot afford to let the werewolves deceive us any longer." - } - }, - { - "event": "vote_start" - }, - { - "event": "voted", - "content": { - "player": 0, - "voted_to_player": 1, - "reason": "I would like to vote for Player 1. They have been exhibiting aggressive behavior and making quick accusations, which raises suspicions about their true intentions." - } - }, - { - "event": "voted", - "content": { - "player": 1, - "voted_to_player": 6, - "reason": "I will vote for Player 6." - } - }, - { - "event": "voted", - "content": { - "player": 2, - "voted_to_player": 1, - "reason": "Based on the previous information and suspicions raised against Player 1, I vote to eliminate Player 1 from the game." - } - }, - { - "event": "voted", - "content": { - "player": 4, - "voted_to_player": 1, - "reason": "I will vote for Player 1." - } - }, - { - "event": "voted", - "content": { - "player": 5, - "voted_to_player": 1, - "reason": "I have gathered some additional information and observations. Based on the previous round and the suspicions raised against Player 1 and Player 3, I believe it would be best to vote for one of them this round. However, I also want to gather more evidence and observe their behavior before making a final decision.\n\nI will vote for Player 1 this round.\n\nPlayer 5 votes for Player 1." - } - }, - { - "event": "vote_results", - "content": [ - 0, - 4, - 0, - 0, - 0, - 0, - 1 - ] - }, - { - "event": "vote_end" - }, - { - "event": "killed", - "content": { - "player": 1 - } - }, - { - "event": "notetaking", - "content": { - "player": 0, - "context": "- Player 1 is the Werewolf_leader (confirmed information)\n- Player 2 has previously voted for me (Player 0), which raises suspicion on their intentions\n- Player 4's vote for Player 3, who is now dead, may indicate they were misdirected in their suspicions\n- Player 5 also voted for Player 3, but we need to determine if it was a strategic move or actual suspicion\n- Player 6's accusations of Player 1 and Player 3 raises doubts about their reliability as a villager\n- Stay vigilant and observe the actions and statements of all players\n- Gather more information and clear suspicions before making any decisions\n- Adjust strategies and voting patterns based on new information or developments\n- Focus on gathering evidence to support our case against the remaining werewolf\n- Remain poised and prepared to take action when necessary" - } - }, - { - "event": "notetaking", - "content": { - "player": 2, - "context": "- Player 1 has received multiple accusations and votes, casting doubt on their allegiance\n- Player 4 and Player 5 made misguided votes that led to the demise of Player 3, raising questions about their judgment and reliability\n- Player 1 was confirmed as a werewolf\n- Player 6 accused Player 1 in the previous round\n\nBased on these observations, I should continue monitoring Player 1 closely and consider the motivations and actions of Players 4 and 5. I need to gather more evidence to determine the true identities of these players and make informed decisions in the next round." - } - }, - { - "event": "notetaking", - "content": { - "player": 4, - "context": "- Player 3 is receiving multiple accusations and votes, raising suspicion about their allegiance. They could potentially be a werewolf.\n\n- Player 1 has been exhibiting aggressive behavior and making quick accusations, which could be a diversionary tactic.\n\n- Player 4 and Player 5 previously made misguided votes that led to the demise of Player 3. Their judgment and reliability should be questioned.\n\n- The majority of players have accused and voted for Player 3, further raising suspicion about their innocence.\n\n- I will continue to observe and gather more information in the next round to make a more informed decision." - } - }, - { - "event": "notetaking", - "content": { - "player": 5, - "context": "Player 1 has been consistently aggressive and making accusations. Player 3 has received multiple accusations and votes. Player 4 and Player 5 made misguided votes leading to the demise of Player 3. We need to gather more evidence to confirm their guilt or innocence. Stay vigilant and observe their behavior in the next round." - } - }, - { - "event": "cycle", - "content": "night" - }, - { - "event": "inquiried", - "content": { - "player": 0, - "context": true, - "reason": "I will ask the moderator about Player 0." - } - }, - { - "event": "targeted", - "content": { - "player": 5, - "reason": "I will send the number of the player I want to kill tonight.\nConsidering the information I have gathered and the advice given, I will target Player 5 for elimination." - } - }, - { - "event": "killed", - "content": { - "player": 5 - } - } -] \ No newline at end of file diff --git a/core/__init__.py b/core/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/api.py b/core/api.py similarity index 100% rename from api.py rename to core/api.py diff --git a/game.py b/core/game.py similarity index 99% rename from game.py rename to core/game.py index 4d9c6631..956198e1 100644 --- a/game.py +++ b/core/game.py @@ -1,5 +1,5 @@ import random, logging -from api import send_message +from core.api import send_message import json, re from prompts import render_prompts as render diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..56f93a2b --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +langchain[openai]~=0.0 \ No newline at end of file diff --git a/run.py b/run.py index ca330132..bc9aeef1 100644 --- a/run.py +++ b/run.py @@ -1,5 +1,5 @@ -from game import * +from core import game -new = Game() +new = game.Game() new.set_players(['simple_villager']*3, ['werewolf']*2, ['medic'], ['seer']) new.run_game()