This is an updated version of the terminal text-based game The Resistance: Coup. It builds upon the original project by dirkbrnd and introduces a new level of challenge with AI opponents powered by a Large Language Model (LLM) using LangGraph.
In a nutshell:
- You have some character cards representing government officials you have influence over.
- You can perform actions to sabotage other players and reduce their influence (i.e., remove their cards).
- The last person with any cards left is the winner!
This version now features enhanced AI players driven by an LLM, providing a more dynamic and engaging gaming experience.
- Python 3.12
- Poetry (for dependency management)
-
Clone the repository:
git clone https://github.com/cl0ver012/resistance_coup.git
-
Install dependencies using Poetry:
cd resistance_coup poetry install
-
Launch the game:
python coup.py
-
Enter your name when prompted.
-
You will see AI players automatically playing game.
-
Enjoy the game!
This project leverages the power of LangGraph to create intelligent AI opponents that can understand and respond to the game's dynamics. The LLM is used to:
- Analyze the game state: The AI assesses the current situation, including the cards in play, the actions taken by other players, and the overall game progress.
- Make strategic decisions: Based on its analysis, the AI decides which actions to take, aiming to maximize its chances of winning.
- Adapt to different players: The AI can learn from previous games and adjust its strategies based on the behavior of its opponents.
This integration of LLM and LangGraph brings a new dimension to the gameplay, making the AI opponents more challenging and unpredictable.