VegeFin/Evolving-Werewolf ↗★ 1
werewolf-engine
9人局狼人杀多Agent游戏引擎(DeepSeek Harness 插件):自动主持、角色技能、警长竞选、投票、复盘、人类席位、跨局知识库、素材管线
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:VegeFin/Evolving-Werewolf说明文档
阅读完整 README ↗Configuration
image-config.json (Asset Pipeline API Key)
cp image-config.example.json image-config.json
Edit image-config.json, fill in your Zhipu API Key (register free at open.bigmodel.cn):
{
"apiKey": "your-api-key",
"baseURL": "https://open.bigmodel.cn/api/paas/v4",
"visionModel": "glm-4v-flash",
"drawModel": "cogview-3-flash",
"drawSize": "1024x1024",
"assetDir": "ui/assets"
}
The asset pipeline is optional. Without it, only the image analysis/generation tools are affected — core gameplay is fully functional.
knowledge.json (Knowledge Base Seed)
cp knowledge.example.json knowledge.json
The engine automatically distills experience and writes it to knowledge.json after each game. knowledge.example.json provides 8 initial seed entries.
Usage
Host Perspective
Call tools in a DSH agent session:
| Tool | Purpose | Caller |
|---|---|---|
werewolf_start | Start game: random role assignment, spawn 8 player agents, begin with human player. Omit humanSeat for auto-random 1-9. Set humanSeat=0 for 9-agent self-evolving game. | Host |
werewolf_act | Player action (18 actions) | Player |
werewolf_status | View public state; host sees full role table and review report | All |
werewolf_ask_rule | Query rules/role abilities | All |
werewolf_abort | Host aborts the game | Host |
werewolf_look | Analyze image with vision model | Host |
werewolf_draw | Generate image with text-to-image model | Host |
werewolf_assets_status | Check asset pipeline status | Host |
werewolf_start return value includes hostGuide (host instructions) and panelUrl (human player panel URL).
Player Actions (werewolf_act)
| action | Description | Phase |
|---|---|---|
speech + text | Give a speech | day-speech / day-sheriff-speech |
vote + target | Cast exile vote (0=abstain) | day-vote |
sheriff_vote + target | Vote for sheriff | day-sheriff-vote |
sheriff_run / sheriff_not | Run for sheriff / decline | day-sheriff-run |
sheriff_stay / sheriff_quit | Stay in / withdraw | day-sheriff-quit |
direction + text=left/right | Sheriff sets speech direction | day-direct |
pass_sheriff + target | Sheriff passes badge on elimination | sheriff-pass |
kill + target + text | Wolf kills target | night-wolves |
seer + target | Seer verifies target | night-seer |
witch_save / witch_poison+target / witch_none | Witch uses potion | night-witch |
hunter + target | Hunter shoots (0=don't shoot) | night/day-hunter |
alive | Online confirmation | any |
review + text | Submit post-game review | review |
Human Player Panel
After game start, visit http://127.0.0.1: /werewolf/panel in your browser. The panel provides:
- Identity card (seat, role)
- Event stream (categorized by kind: wolf/seer/witch/death/sheriff/info)
- Speech stage (displayed sequentially)
- Action area (gate-driven: forms only shown when it's your turn)