Skip to content
YiBoard
Play

2026-08-22

We Opened Up Our Gomoku AI’s Brain: How It Picks Every Move

YiBoard’s AI is a transparent local engine — no black box. We show you the search depth, the nodes it explored, and the heuristics it weighs on every single move.

Most online Gomoku sites treat their AI as a black box: you click, it plays, you never know why. On YiBoard we went the other way. The engine runs locally in your browser, and we show you how it thinks — the search depth, the number of nodes evaluated, and the shapes it weighs. Here is how it works.

A classic minimax search with alpha-beta pruning

The engine is a minimax search with alpha-beta pruning, running entirely in your browser. It evaluates the board position, searches a few moves ahead, and prunes branches that cannot beat the current best. The deeper the difficulty tier, the deeper the search — and the more nodes it evaluates before deciding.

What it actually looks at

  • Open threes and broken threes: the seeds of every attack.
  • Fours and open fours: immediate wins and forced moves.
  • Defensive value: shapes that stop the opponent’s threats.
  • Position: center stones weigh more than edge stones in the opening.

These heuristics are the taste of the engine — two engines with the same search depth can play very differently depending on how they value an open three versus a four.

Why we surface the thinking, not hide it

Watching a strong player think is the fastest way to improve. Our thinking view shows a move-by-move breakdown — depth reached, nodes explored, milliseconds spent — so you can see when the engine found a forced win, and when it merely chose the least bad defense. It turns the AI into a free coach.

Three difficulty tiers, three budgets

  • Gentle: shallow search, quick moves, makes the occasional obvious mistake — good for learning.
  • Steady: a balanced budget that plays solid, consistent Gomoku.
  • Sharp: deep search, aggressive pursuit of open threes and fours — the engine plays like it is trying to win, because it is.

FAQ

Is the AI a large language model?

No. The engine is a deterministic minimax search with alpha-beta pruning. That means it is fast, runs offline in the browser, and every move is reproducible from the same board state.

Can the AI beat me at max difficulty?

At Sharp difficulty the engine plays very strong Gomoku and will punish opening mistakes hard. Beating it consistently requires real opening knowledge and defense discipline.

Does the AI cheat by peeking at my strategy?

No. It only sees the public board position — the same information you have. It wins through search depth and evaluation, not by reading your mind.

Watch the AI think on the board

Related

YiBoard (yiboardgame.com) — 中华棋类,浏览器即玩,免费无注册。 去下一局 · 更多博客 · 玩法指南