dsh-ai-arcade: A Local-Engine Arcade Inside DeepSeek Harness

In the development of DeepSeek Harness (DSH), letting large language models directly control game rhythms or handle high-frequency decisions often leads to issues like high latency and complex rule validation. Instead of having the model handle specific moves and rigid rules, it is better to let it focus on intent and strategy, while specific actions are executed by a local engine. dsh-ai-arcade is a plugin designed based on this philosophy; it decouples the model from the local engine and provides gaming functionality directly within the DSH interface.

What is this

This is a model inference plugin maintained by 439436269-ctrl. It regards the large model as the “brain” responsible for thinking, and the local engine as the “hands and feet” responsible for execution. The plugin provides two gameplay modes within the DSH interface: Dual-Brain Snake and Chinese Chess, enabling both human-vs-AI and AI-vs-AI matches.

Core Features

Dual-Brain Snake
The model outputs a strategy card (containing goals, aggression level, and risk appetite) every 1.7 seconds, while the local engine runs the rules at 60fps based on the strategy card. The model’s round-trip latency is 0.8-2 seconds, which is much slower than the game’s pace of 140 milliseconds per step; therefore, the model only performs intent judgment.

Chinese Chess
The local engine is responsible for move generation, legality validation (e.g., horse leg blocking, elephant eye blocking, generals facing), and Alpha-Beta search. The model is only responsible for selecting one move from the legal candidates provided by the engine, and outputting commentary and inner monologue.

Run Mechanism
Supports human-vs-AI and AI-vs-AI matches. Use the shortcut key P to pause. Even in cases of network disconnection, model timeout, or exhausted quota, the local engine can continue to run the game.

Installation and Activation

Installing the plugin requires specifying a profile.

dsh plugin --profile <your-profile> add dsh-ai-arcade

After installation is complete, click the 🎮 button in the bottom left corner of the DSH interface to open the panel.

Typical Usage

Under default configuration, the model may consume a large number of tokens due to reasoningEffort: high being enabled. To obtain a smooth gaming experience, it is recommended to explicitly disable deep thinking.

- insert:
    - id: dsh-ai-arcade
      name: dsh-ai-arcade
      config:
        enabled: true
        provider: deepseek-account   # Leave empty to automatically select the first available provider
        model: deepseek-flash
        reasoningEffort: "off"       # Games require speed; this can be overridden separately for deep analysis
        maxTokens: 2048
        timeoutMs: 45000

Scenarios and Notes

This plugin is suitable for developers who wish to test model strategy generation capabilities or engage in casual matches within the DSH environment.

Special attention should be paid to the fact that the Chess engine has built-in complete rule validation (including validation of the 44 opening moves), so the model cannot make illegal moves. Additionally, the plugin requires a Node.js 22+ environment for building, and testing covers 14 Chess engine test cases to ensure rule correctness.

Summary

dsh-ai-arcade provides a feasible solution for running complex game logic in DSH through the division of labor between the local engine and the model. For more details, please refer to the plugin directory or the GitHub repository.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye