diff --git a/README.md b/README.md index 2eb1c36..5b37de1 100644 --- a/README.md +++ b/README.md @@ -76,17 +76,19 @@ Options: ('print', 'click.echo', 'logging.info'). Default is click.echo. --sub-model TEXT The sub-model name. Default is gpt-4o-mini. + --seed TEXT The random seed. --log-level TEXT The log level, DEBUG, INFO, WARNING, ERROR or CRITICAL. Default is WARNING. --debug Whether to show debug logs or not. --help Show this message and exit. + ``` If you don't use `docker`, ignore `docker compose run werewolf` in the above commands. ## Examples -### Case 1: 1 villager, 1 werewolf, 1 knight and 1 fortune teller with 2 times to speak per day +### Case1: 1 villager, 1 werewolf, 1 knight and 1 fortune teller with 2 times to speak per day This is an example of a werewolf game with 1 villager, 1 werewolf, 1 knight and 1 fortune teller with 2 times to speak per day. @@ -95,7 +97,7 @@ This is an example of a werewolf game with 1 villager, 1 werewolf, 1 knight and Game Log ```sh - $ docker compose run werewolf python -m werewolf -n 4 -w 1 -k 1 -f 1 -t 2 -m 'gpt-4o-mini' --sub-model 'gpt-4o-mini' +$ docker compose run werewolf python -m werewolf -n 4 -w 1 -k 1 -f 1 -t 2 -m 'gpt-4o-mini' --sub-model 'gpt-4o-mini' =============================== Day 1 (Daytime) ================================ Player0 (to GameMaster): @@ -270,6 +272,7 @@ Think about what has happened and what you should do in the next action. ============================================================================= ================================ Game Result ================================ ('VillagersWin', {'Player0': {'role': 'Knight', 'status': }, 'Player1': {'role': 'Werewolf', 'status': }, 'Player2': {'role': 'FortuneTeller', 'status': }, 'Player3': {'role': 'Villager', 'status': }}) + ``` @@ -456,7 +459,7 @@ Player1はゲームから除外されました。 -### Case 2: (Open Game) 1 villager, 1 werewolf, 1 knight and 1 fortune teller with 2 times to speak per day +### Case2: (Open Game) 1 villager, 1 werewolf, 1 knight and 1 fortune teller with 2 times to speak per day This is an example of a **opened** werewolf game with 1 villager, 1 werewolf, 1 knight and 1 fortune teller with 2 times to speak per day. @@ -465,10 +468,10 @@ Note that each player cannot know the secret contents of what another player has
-Game Log + Game Log ```sh - $ docker compose run werewolf python -m werewolf -n 4 -w 1 -k 1 -f 1 -t 2 -m 'gpt-4o-mini' --sub-model 'gpt-4o-mini' -o +$ docker compose run werewolf python -m werewolf -n 4 -w 1 -k 1 -f 1 -t 2 -m 'gpt-4o-mini' --sub-model 'gpt-4o-mini' -o GameMaster (to Player0): You are a player with a role "ERole.Villager" in a werewolf game. @@ -1398,6 +1401,7 @@ Think about what has happened and what you should do in the next action. ============================================================================= ================================ Game Result ================================ ('WerewolvesWin', {'Player0': {'role': 'Villager', 'status': }, 'Player1': {'role': 'FortuneTeller', 'status': }, 'Player2': {'role': 'Werewolf', 'status': }, 'Player3': {'role': 'Knight', 'status': }}) + ```
@@ -2337,6 +2341,7 @@ Player0がゲームから除外されました。 + ## TODO - [x] fix a bug that a night actions of a knight and a fortune teller are invalid. See [Case2](#case-2-open-game-1-villager-1-werewolf-1-knight-and-1-fortune-teller-with-2-times-to-speak-per-day); @@ -2401,6 +2406,96 @@ Player0がゲームから除外されました。 Note that you can use `uv` to develop the project in step 3, 4 and 7. +### Update README + +1. Fork the repository: [https://github.com/hmasdev/autogen-werewolf](https://github.com/hmasdev/autogen-werewolf) + +2. Clone the repository + + ```bash + git clone https://github.com/{YOURE_NAME}/autogen-werewolf + cd autogen-werewolf + ``` + +3. Create a virtual environment + + ```bash + python -m venv venv + source venv/bin/activate + ``` + +4. Install the required packages + + ```bash + pip install -e .[dev] + ``` + +5. Checkout your working branch + + ```bash + git checkout -b your-working-branch + ``` + +6. Make your changes + + - Update **./README.md.j2** + + - **CAUTION**: Do not update **./README.md** directly. It will be generated automatically from ./README.md.j2. + + - Update or add an example in [./examples](./examples/) + - Name Rule: `Case{number}.json` + - Schema: + + ```json + { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "The title of the example case." + }, + "description": { + "type": "string", + "description": "A brief description of the example case." + }, + "log": { + "type": "string", + "description": "The game log for the example case." + }, + "log_translated": { + "type": "object", + "description": "Translations of the game log.", + "additionalProperties": { + "type": "string" + } + } + }, + "required": ["title", "description", "log", "log_translated"] + } + ``` + +7. Test your changes + + ```bash + python update_readme.py + ``` + +8. Commit your changes + + ```bash + git add . + git commit -m "Your commit message" + ``` + +9. Push your changes + + ```bash + git push origin your-working-branch + ``` + +10. Create a pull request: [https://github.com/hmasdev/autogen-werewolf/compare](https://github.com/hmasdev/autogen-werewolf/compare) + ### Classes ```mermaid