dsh-agent-arcade
by fff122
DeepSeek Harness 的小型确定性贪吃蛇:每轮 agent 选方向,用户可看 ASCII 棋盘、分数、状态与推理
A small deterministic Snake game for DeepSeek Harness. The Agent chooses a direction on every turn, while the user can watch the ASCII board, score, status, and reasoning…
安装
dsh plugin --profile web add github:fff122/dsh-agent-arcadeGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
目录
A small deterministic Snake game for DeepSeek Harness. The Agent chooses a direction on every turn, while the user can watch the ASCII board, score, status, and reasoning returned by each step.
The game runs entirely in memory. It does not use the network, save files, or execute shell commands. A fixed seed makes food placement and a replayed sequence reproducible.
Quick install
Requirements
You need Node.js 22 or newer, pnpm, and a DeepSeek Harness installation that supports JavaScript or TypeScript plugins.
Step 1: Download and build
Copy and run:
git clone https://github.com/fff122/dsh-agent-arcade.git
cd dsh-agent-arcade
pnpm install
pnpm build
Step 2: Create the plugin configuration
Run this command from the repository root:
cat > agent-arcade.patch.yml <<EOF
- insert:
- id: dsh-agent-arcade
name: '$PWD/dist/src/index.js'
EOF
The plugin path is absolute because the Harness patch loader requires an absolute path.
Step 3: Start Harness with the plugin
If Harness is installed as a command:
dsh web --patch "$PWD/agent-arcade.patch.yml"
Otherwise, run:
npx @deepseek-ai/dsh web --patch "$PWD/agent-arcade.patch.yml"
Verify the installation
Ask the Agent:
开始一局 12×8 的贪吃蛇,随机种子用 42。每一步都告诉我棋盘、分数和你的决策理由。
The Agent should call arcade_snake_new, then alternate arcade_snake_step and arcade_snake_render. Ask for arcade_snake_history at any time to review the full sequence of decisions.
Available tools
| Tool | Purpose |
|---|---|
arcade_snake_new |
Start or restart a deterministic game with optional width, height, and seed. |
arcade_snake_step |
Let the Agent choose a safe direction toward food and advance one turn. |
arcade_snake_render |
Return the current board as ASCII art with score and status. |
arcade_snake_history |
Return every turn, direction, reason, position, score, and outcome. |
Board and replay rules
The board dimensions range from 5 to 30 cells in each direction. The default board is 12 by 8, and the default seed is 1. The snake starts in the center heading right. H marks the head, o marks the body, and * marks the food.
The Agent uses a simple deterministic policy: it compares legal directions by Manhattan distance to the food, then applies a stable tie-break order. The policy is intentionally easy to read and modify; it is not intended to be a competitive game-playing algorithm.
To reproduce a run, call arcade_snake_new with the same dimensions and seed, then replay the same manual directions. A game ends when the snake hits a wall or itself, or when the board is filled.
Updating the plugin
From the cloned repository:
git pull
pnpm install
pnpm build
Restart Harness with the same patch command after rebuilding.
Development
Run the complete package quality gate from the repository root:
pnpm run format:check
pnpm run typecheck
pnpm run test
pnpm run build
The implementation is split into small modules:
src/
index.ts # Harness entry point and tool registration
snake-game.ts # Deterministic game rules, policy, rendering, and history
test/
index.test.ts
mount.test.ts
snake-game.test.ts
For the plugin model and patch overlay format, see the official DeepSeek Harness plugin guide.
原始 README: https://github.com/fff122/dsh-agent-arcade/blob/main/README.md ↗
同类插件
查看全部 →
deepseek-harness
从仓库或系统描述生成经过校验的自包含交互式架构图、流程图、时序图、数据流图和生命周期图。

dsh-plugin
通过 DSH MCP 客户端挂载 Ouroboros 的纯配置包,在 DSH 中提供 36 个涵盖需求访谈、Seed、执行、评估与演化流程的工具。

dsh-tongflow
基于 TongFlow 的“片场”插件,用于图片、配音、音乐与视频制作:agent 为每个资产生成 TongFlow 工作流文件(.tongflow.json)并通过 TongFlow 插件执行,内嵌工作流画布,按镜头/角色/take 组织项目,附漫剧模板;以 @tongflow 开头的会话进入 Studio 界面。

helloagents
AI 编码 CLI 的工作流层:技能、项目知识、交付检查、更安全的配置写入与可恢复执行

dsh-ai-novel-writer
安装专用 AI 小说创作预设与工作台:提供带修订号的本地项目资产、紧凑侧边工作台,以及需要原生审批的逐文件变更。

rea
用 agent 逆向任何东西:从应用行为到原生二进制