VegeFin/Evolving-Werewolf1

werewolf-engine

9人局狼人杀多Agent游戏引擎(DeepSeek Harness 插件):自动主持、角色技能、警长竞选、投票、复盘、人类席位、跨局知识库、素材管线

包名
werewolf-engine
版本
1.1.0
许可证
MIT
最近更新
2026年8月16日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:VegeFin/Evolving-Werewolf

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:

ToolPurposeCaller
werewolf_startStart 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_actPlayer action (18 actions)Player
werewolf_statusView public state; host sees full role table and review reportAll
werewolf_ask_ruleQuery rules/role abilitiesAll
werewolf_abortHost aborts the gameHost
werewolf_lookAnalyze image with vision modelHost
werewolf_drawGenerate image with text-to-image modelHost
werewolf_assets_statusCheck asset pipeline statusHost

werewolf_start return value includes hostGuide (host instructions) and panelUrl (human player panel URL).

Player Actions (werewolf_act)

actionDescriptionPhase
speech + textGive a speechday-speech / day-sheriff-speech
vote + targetCast exile vote (0=abstain)day-vote
sheriff_vote + targetVote for sheriffday-sheriff-vote
sheriff_run / sheriff_notRun for sheriff / declineday-sheriff-run
sheriff_stay / sheriff_quitStay in / withdrawday-sheriff-quit
direction + text=left/rightSheriff sets speech directionday-direct
pass_sheriff + targetSheriff passes badge on eliminationsheriff-pass
kill + target + textWolf kills targetnight-wolves
seer + targetSeer verifies targetnight-seer
witch_save / witch_poison+target / witch_noneWitch uses potionnight-witch
hunter + targetHunter shoots (0=don't shoot)night/day-hunter
aliveOnline confirmationany
review + textSubmit post-game reviewreview

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)