Gomoku: Take on the AI in DSH

Introduction

Having AI write code or build spreadsheets inside DeepSeek Harness is a common workflow. But over time, you might want to switch gears and put the AI’s reasoning ability to use in a different way. xingmakesense/dsh-gomoku was built for exactly that purpose: it adds Gomoku (Five in a Row) as a standalone page in the Better Sidebar, letting you play directly against a configured model.

What It Is

This is a Gomoku plugin designed for DeepSeek Harness. Through the Better Sidebar’s tab registration service, it registers “Gomoku” as a standalone page in the right sidebar. The maintainer is Xingmakesense. The current version targets dsh 0.2.2-rc.3 (@deepseek-ai/cordis 4.1.0) and requires a Web profile (such as the built-in web profile) along with dsh-better-sidebar 0.32.1+.

The plugin relies on no search algorithms or heuristic pruning whatsoever. Every move is the product of LLM reasoning and judgment, making it the most direct test of a model’s “thinking” capability. It supports AI-vs-AI battles, human-vs-AI play, independently editable system prompts for both Black and White, and skill that improves as you refine the prompts.

Key Features

Better Sidebar Page Entry

The board page is registered in the Better Sidebar’s tab service via ctx.betterSidebar.registerTab. You need dsh-better-sidebar 0.32.1 or later before use. Open the board page from the + menu in Better Sidebar; the page contains only the board and a new-game control.

Dedicated Settings Page

Model, thinking intensity, system prompts, and Jev credentials are all configured under Settings → Gomoku. The settings page uses only the single-column width provided by the settings shell. Cards are stacked vertically, and no control will ever trigger a horizontal scrollbar. You can review the thinking log of the current game, enable auto-save (the Jev Key is kept in page memory only), and change settings mid-game — updates take effect from the next move onward.

Custom-Drawn Model Selector

The model dropdown no longer uses the browser’s native <select>. The popup list is rendered by the plugin itself. In dark mode it shows light text on a white background; in light mode it shows light text on a dark background. All colors are sourced from the host’s --dsw-alias-* design tokens, ensuring readability in both themes. The selected item carries a check mark, and group headers are arranged by provider. Full keyboard support is provided (↑/↓, Home/End to navigate, Enter or Space to select, Esc to dismiss). The popup is positioned relative to the viewport and automatically flips upward when there is insufficient space below.

Diagnostics-Rich Move Pipeline

Every move records end-to-end latency, number of attempts, and token usage, displayed in the “Thinking Log” — for example, “Move 3 · 42.1 s · input 860 → output 120 tokens”. The board status bar shows elapsed seconds while the model is thinking. Transient failures (rate limiting, connection drops, timeouts) trigger exponential backoff before retry (starting at 500 ms, capped at 8 s, with ±20% jitter), so you no longer burn through all attempts with immediate retries. Model capability queries are cached per provider/model for 5 minutes, saving one round trip per move. The output budget is clamped to the model’s own ceiling (it will not request 2048 tokens if the model only supports 1024). Closing the page or starting a new game immediately aborts any in-flight generation.

Board Threat Hints

Each move request is accompanied by a server-computed threat list — the opponent’s direct fives, open threes (a placement that would create an open four), and threat fours, plus your own opportunities — written into the user message to prompt the model to defend first. When threats exist, the same message also presents up to 5 ranked candidate options (e.g., “block White’s open three”). Threat detection only counts “five-in-a-row formed by this specific move”; already-blocked patterns will not be re-listed. These hints are advisory only and do not force the model’s move.

Hard 30-Second Timeout & Tightened Output Cap

The end-to-end timeout per move is fixed at 30 000 ms (30 seconds, covering all attempts and backoff waits for that move), and the output token cap is fixed at 2048. Both are sent with every move request and are not exposed in the UI. The host configuration sets the ceiling; a request can only tighten, never loosen. On timeout the move is marked as failed, the board remains unchanged, and the player must click “Retry” — there is no automatic turn hand-off.

Automatic Graceful Degradation After Failure

The 1st attempt runs at the selected intensity, consuming at most “budget − 6 seconds”. If it fails (timeout, truncation, illegal move, transient drop), the 2nd attempt and beyond switch to the same model with thinking turned off (or its lowest level if off is unavailable), using the remaining time to produce a quick move. This ensures a slow model cannot eat the entire move budget.

Pause & Manual Takeover

The Pause button, located to the right of the New Game button below the board, can interrupt AI thinking at any time. While paused, you may place moves alternately for Black and White with no move-count limit. Clicking Resume returns the AI to thinking. While paused, the button switches to an amber highlight.

Installation & Activation

Dependency Check

The plugin requires dsh-better-sidebar 0.32.1 or later. Before installing, verify that the host version is compatible with dsh 0.2.2-rc.3 (@deepseek-ai/cordis 4.1.0).

Installation Methods

Three installation methods are supported, none of which require a local build (the build artifacts in lib/ are committed to the repository, and there are no prepare/prepack scripts). DSH’s standard plugin installation mechanism is “bundle → profile”: the plugin package declares dsh.bundle in package.json and ships a patch file (cordis.patch.yml), which the user installs into any profile via dsh plugin.

Method 1: npm install

dsh plugin --profile demo add @xingmakesense/dsh-gomoku

If version 0.0.6 has not yet been published on npm, use the GitHub source install below.

Method 2: GitHub source install

dsh plugin --profile demo add github:Xingmakesense/dsh-gomoku

Method 3: Local checkout / tarball install

dsh plugin --profile demo add .
# Install from a tarball (generated via pnpm pack, filename pattern: xingmakesense-dsh-gomoku-<version>.tgz)
pnpm pack
dsh plugin --profile demo add ./xingmakesense-dsh-gomoku-0.0.6.tgz

Verification & Launch

The first time you use dsh plugin, it will initialize the profile (@deepseek-ai/dsh-base as the first bundle). After installation, verify the layer with --dump-config, then launch:

dsh --profile demo --dump-config   # the output should show the gomoku layer
dsh --profile demo

To remove: dsh plugin --profile demo remove @xingmakesense/dsh-gomoku will remove both the dependency and the corresponding layer.

Typical Usage

  1. Launch dsh and open the Settings page in your Web profile.
  2. Under Settings → Gomoku, configure the models for Black and White. You can choose a standard chat model or a Jev model (requires a TypeSafe API Key).
  3. Adjust thinking intensity and system prompts on the settings page. The default prompts follow a compact “threat-first” structure, approximately 1003 characters (~760 tokens).
  4. Select the “Gomoku” page from the + menu in Better Sidebar to start playing.
  5. During play, you can pause, manually take over moves, and review the thinking log and timing for each move.
  6. Game state is persisted in the browser-side store. Closing the sidebar, switching tabs, or collapsing the page will not reset the board.

Use Cases & Notes

This plugin is ideal for developers who want to put a model’s reasoning ability to use in DSH beyond code generation, and especially for those curious about how different models “think.” It can be used to benchmark inference speed and move strategy across models, or to observe how different prompts affect performance.

Note: The plugin runs with the current dsh process’s permissions. Review the source code and license (MIT) before installing. The plugin does not write the Jev Key to localStorage, config files, or game logs. It is only forwarded to the official API via the local server when a Jev move is made.

Closing

In summary, xingmakesense/dsh-gomoku is a tool for playing a game of Gomoku against an AI inside DSH. It uses Better Sidebar to present Gomoku as a standalone page, putting a model’s genuine reasoning ability to the test on a board. If you’d like to spend some downtime challenging an AI to a game, this plugin makes a great starting point.

Directory: https://www.skillhub.cn/plugins/Xingmakesense/dsh-gomoku
GitHub: https://github.com/Xingmakesense/dsh-gomoku

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

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

Xiaoye