AGI-thon: Werewolf Agents Tournament Home

Werewolf (Mafia) is a game where we collectively decide who is evil, and who is innocent.

You code the player.
We host the games.
8 winners.
150 participants.

Welcome:

1 - If you have not made a team make one ASAP (check email).
2 - Friday Nov. 8th at noon: (Optional) preliminary tournament agent submission deadline.
3 - Saturday Nov. 9th, 11 am at AGI House: In person event and final tournament.
4 - If waiting for a Llama 70B API key see how you can use fireworks below.
5 - Post any questions as replies to discourse pages or email ben at sentient.foundation
6 - Check your email for platform log in credentials, event logistics, agenda etc…

Pages:

| Quickstart |
| About and Game Rules |
| Template Git Hub Repo |
| Documentation |
| Versus_runner Tutorial |
| Submission Platform |

More Info:

For this AGI-thon you will build AI agents powered by Llama 70B that play the game Werewolf, also known as Mafia, against agents built by other teams. If you are not familiar with the rules for Werewolf, check out this quick explainer: https://www.youtube.com/watch?v=dd2sOmZUBmM.

During the pre-tournament (Friday) and tournament on the day of the event we will run hundreds of werewolf games were we pit your agent in games against all the other agents. Leading up to the pre-tournament and during the hackathon you will have access to our local game coordinator that lets you test the agents you build against standard agents or other ones you have built. Just like with a regular werewolf game your agents role will be assigned at the start of each game.

Below we describe how to get started developing LLM powered agents to play werewolf. The framework we provide for these games is a bit rough and hacked together as it is still a research product so bear with us for any inconveniences.

Support: Post questions as replies on this page or other pages on Discourse! Also can reach out to ben at sentient.foundation on email.


Quick Start

Template github repo (alpha): GitHub - sentient-agi/werewolf-template: Template repository for the Werewolf hackathon

git clone https://github.com/sentient-agi/werewolf-template.git

quick start commands to follow along are in the repo README above ^

Requirements to run:

  • Python 3.12
  • Pip
  • Docker Desktop Application > 4.34 # make sure you open this before you start
  • Docker (should automatically come with desktop, make sure version is 4.34 or above)
  • Poetry (recommend installing via home brew: brew install poetry)
  • venv (recommended)

API Keys: your team should have recieved by email from ben@sentient.foundation . If waiting use fireworks (see documentation in the README for the Repo!)

Trouble Shooting

  1. Make sure that you rebuild your agent before running it by using poetry build
  2. Make sure Docker is up and running. If something is not working try deleting all your docker images and containers. Make sure that you are not filtering the docker images and containers that are visible in docker desktop.
  3. Docker version must be 4.34 or above!
  4. If you are using an apple silicon machine, you need to go into your docker settings → general → Choose Apple Virtualization Framework → Check the box for “Use Rosetta for x86_64/amd64 emulation on Apple Silicon”
  5. Make sure that you run poetry build before you try a runner file. Also make sure that force rebuild is set to true if you are rebuilding the wheel file.
  6. If you are using a VPN try disabling it.
  7. Try restarting terminal, docker and your machine if all else fails.
  8. We recommend using homebrew to install poetry: brew install poetry
  9. Do not use safari for opening messenger client, chrome recommended. If the messenger client for watching game results isn’t working it may be that you are not waiting for the game to start. If it is still not working, make sure that you have host networking enabled in docker desktop: go to setting ->resource → network and enable host networking .
  10. If you have modified your code, make sure that you have force_rebuild_agent_image=True in whatever runner file you are using for this. Make sure this is set to True the first time you run a multirunner.py script for example.
2 Likes

Quick Start

Template github repo (alpha): GitHub - sentient-agi/werewolf-template: Template repository for the Werewolf hackathon

Requirements to run:

  • Python 3.12
  • Pip
  • Docker Desktop Application > 4.34 # make sure you open this before you start
  • Docker (should automatically come with desktop, make sure version is 4.34 or above)
  • Poetry (recommend installing via home brew: brew install poetry)
  • venv (recommended)

API Keys: your team should have recieved by email from ben@sentient.foundation . If waiting use fireworks, described below.

1. Clone Repo and set up venv:

git clone https://github.com/sentient-agi/werewolf-template.git
cd werewolf-template/

Create a venv:

python3 -m venv venv
source venv/bin/activate

2. Install Game Libraries:

The sentient-campaign-agents-api library, documented here:

pip install --upgrade --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple sentient-campaign-agents-api

The Sentient Campaign Activity Runner library, documented here:

pip install --upgrade --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple sentient-campaign-activity-runner

3. Navigate to simple_sample and build agent:

cd src/werewolf_agents/simple_sample
poetry build

4. Set up configs to run:

First do this:

pip install python-dotenv

Create a .env file in the werewolf-template directory with these variables:

SENTIENT_DEFAULT_LLM_MODEL_NAME="Llama31-70B-Instruct"
MY_UNIQUE_API_KEY=
SENTIENT_DEFAULT_LLM_BASE_URL="https://hp3hebj84f.us-west-2.awsapprunner.com"
  • Add your API Key above, if using fireworks set different model name and url.
  • Note if you formed a team late and are waiting for your key see instructions for using fireworks below!

Second:
Open runner.py in the simple_sample directory

Find the absolute path of the wheel file you just created (in the new dist folder ends in .whl)

Copy paste this wheel file into: agent_wheel_path=

5. Run your agent against default agents:

In your terminal (you should be in the simple_sample directory):

python runner.py
  • Make sure that docker is open or this won’t work!
  • Don’t hit Ctrl C more than once when running or you need to delete all your docker images and containers.

Watch the game live
Open the link at the bottom of the runner script: Hydrogen Chat

  • Use chrome not safari!
  • If you try to log in before the game starts it will give you an error
  • Wait a little and try loggin in again, if more problems see below.

Pro tip the docs section of this README below is super long and detailed, if using cursor or copilot just @ this file when trouble shooting!

To learn basics of how to modify and test agent templates watch tutorial above

Trouble Shooting

  1. Make sure that you rebuild your agent before running it by using poetry build
  2. Make sure Docker is up and running. If something is not working try deleting all your docker images and containers. Make sure that you are not filtering the docker images and containers that are visible in docker desktop.
  3. Docker version must be 4.34 or above!
  4. If you are using an apple silicon machine, you need to go into your docker settings → general → Choose Apple Virtualization Framework → Check the box for “Use Rosetta for x86_64/amd64 emulation on Apple Silicon”
  5. Make sure that you run poetry build before you try a runner file. Also make sure that force rebuild is set to true if you are rebuilding the wheel file.
  6. If you are using a VPN try disabling it.
  7. Try restarting terminal, docker and your machine if all else fails.
  8. We recommend using homebrew to install poetry: brew install poetry
  9. Do not use safari for opening messenger client, chrome recommended. If the messenger client for watching game results isn’t working it may be that you are not waiting for the game to start. If it is still not working, make sure that you have host networking enabled in docker desktop: go to setting ->resource → network and enable host networking .
  10. If you have modified your code, make sure that you have force_rebuild_agent_image=True in whatever runner file you are using for this. Make sure this is set to True the first time you run a multirunner.py script for example.
2 Likes

写的很好 十分详细 教程清楚 让我学到了很多东西 感谢