Games
KwataG KMake your stallG MCounterG CGamesG GOKADAG OLedgerG LSupportG H
SupportPrivacyTerms

Go

KwataG KMake your stallG MCounterG CGamesG GOKADAG OLedgerG LSupportG H

Help

SupportPrivacyTerms
♛ Ocheckers

How the engine thinks

The machine has five ideas. You can borrow all of them.

This is not a general essay on game AI. Every number on this page was measured from this engine, with the same move generator and the same evaluation the app plays with. And every section ends the same way: the human version — because four of the engine's five ideas are things a person can do at the board, and doing them is most of what separates a strong player from a fast one.

The whole thing

Six lines, then the details

Everything after this is an elaboration of these six lines.

  1. List the legal movesThe rules do most of the work. Capture is compulsory and must be maximal, so the list is short — an average of 5.4 moves, and 30% of the time it is a forced capture.
  2. For each one, imagine the replyAnd the reply to the reply, as deep as time allows. This is the search.
  3. At the bottom, count the positionMaterial plus a few positional terms. This is the evaluation, and it is deliberately crude.
  4. Assume both sides play their bestTake the worst outcome your opponent can force on you, and pick the move whose worst outcome is best. This is negamax.
  5. Stop looking at a move as soon as you know it is badNot how bad — just that it is worse than something you already have. This is alpha-beta, and it removes 93% of the work.
  6. Go one ply deeper and repeat until the clock runs outKeeping the previous answer as your first guess. This is iterative deepening.
The thing to notice

Only step 3 is arithmetic a person cannot do. Steps 1, 2, 4, 5 and 6 are procedures — habits of looking — and a human who adopts them plays enormously better than one who does not, without calculating any faster.

Idea one

The evaluation: what a position is worth

A single number, from White's side. Positive is good for White.

The engine's whole judgement of a position is five terms added up. That is all. It has no plans, no openings book, no memory of past games.

TermWorth
A man100
A king320
Each row a man has advanced+4
A man still on its own back row+6
A piece in the middle files / middle rows+3 / +2
A piece on an edge file−2

Here is what that actually looks like, computed square by square by putting a single white piece on an empty board and asking the engine what it sees. Darker is worth more.

Two things jump out of that picture, and both are real advice.

● The human version

You cannot add five terms per position at speed. You do not need to. Run the same five terms as a ranking, not a sum:

material → kings → advancement → centre → back rank. Compare two candidate moves on the first term where they differ, and stop. That reproduces most of the engine's judgement, and it takes a second.

And here is what the evaluation cannot see

It has no idea whether a piece is about to be taken. It counts what is on the board right now. Everything that makes this game sharp — the sacrifice, the shot, the forced sequence — is invisible to it. That is what the search is for, and it is why the next four ideas exist.

Idea two

Negamax: assume they play well

One rule, applied all the way down.

The engine never asks "what do I hope happens?" It asks: after my move, what is the worst my opponent can do to me? And to answer that it asks the same question from their side. All the way down.

The trick that makes the code short is that a position's value to me is exactly the negative of its value to you. So there is only one function, and it flips sign each ply:

// the value of this position to whoever is about to move
score = max( over every legal move m ) of  -value_after(m)

That minus sign is the whole idea. It is why the engine cannot fool itself: it never gets to assume you will blunder.

● The human version

The commonest way club players lose is playing a move because of what it threatens, without checking what it allows. That is hoping, not negamax.

The fix is a habit, not a talent: after you pick a move, before you touch it, ask one question — "and then what do they play?" — and answer it out loud. In this game the answer is often not a choice at all, which is what makes it cheap.

Idea three — the big one

Alpha-beta: stop reading once you know the answer is no

This removes over ninety per cent of the work, and it is the idea most worth stealing.

Suppose you have already found a move that guarantees you at least +1. Now you start looking at a second move, and the very first reply your opponent has takes a man. You can stop. You do not need to know whether their best reply takes one man or three. You already know this move is worse than the one you have. Every remaining reply is wasted breath.

That is the entire algorithm. Two numbers — the best you have already guaranteed (alpha), and the best your opponent has already guaranteed (beta) — and one rule: when they cross, stop reading this branch.

Press the button to walk the search.

Here is what that saves in this engine. Both columns search the same tree with the same evaluation; only the cutoff differs.

Read the last row. At depth seven, plain search looks at positions. With alpha-beta it looks at . Same answer, same move, fewer positions examined.

● The human version — and this one is worth more than the rest put together

Refutation-first. When you look at a candidate move, do not try to work out how good it is. Try to find one reason it fails. The moment you find one, drop the move and go to the next — you do not need to measure the damage.

Most players calculate the opposite way round: they pick the move they like and look for a line where it works. That is the expensive direction. Looking for the refutation is cheap, because you only need one, and the mandatory-capture rule usually hands it to you.

The same habit is why you can hold a long forced sequence in your head: you are not evaluating it, you are checking one thing at each step.

Idea four

Move ordering: alpha-beta only works if you look at the good move first

Where writing this guide turned up a real bug in the engine.

Alpha-beta's saving depends entirely on the order you try moves in. If your first move is the best one, every other move gets refuted quickly against a high bar. If your first move is the worst one, the bar starts on the floor and nothing gets cut.

So this engine sorted its moves before searching — by how many men each capture lifted, biggest first. That is the standard heuristic in chess-like games, and here it is completely inert. The reason is a rule of this game:

Why the sort could never have worked

Capture is compulsory and must be maximal. So if a capture exists at all, every legal move in that position captures exactly the same number of men. Measured across a full game: in 100% of positions with more than one legal move, every move had an identical capture count.

The sort key was a constant. The sort did nothing but preserve the order the generator happened to produce.

Replacing it with a key that actually varies — score each move by a single static evaluation of the position it reaches, one ply deep — gives this:

Fewer positions is only interesting if it means more depth in the same time. It does. Same machine, same time budget, before and after the change:

A whole extra ply at every budget. And depth is not a vanity metric — playing the engine against itself at fixed depths, the deeper side won of games.

● The human version

Look at moves in the right order and you will calculate two or three times less. The order is: forced moves, then captures, then crownings, then advances, then the rest.

Most players scan the board left to right. Scan by forcing-ness instead. It costs nothing and it is the difference between seeing a combination and not.

Idea five

Quiescence: never count the board mid-exchange

The single most dangerous thing a search can do is stop at the wrong moment.

Suppose the engine's time runs out exactly after it has captured a man. The evaluation looks at the board, counts a man up, and reports a fine position — not noticing that the opponent recaptures two next move. Stopping in the middle of an exchange does not give you an approximate answer. It gives you a wrong one.

So when the search reaches its depth limit, it does not evaluate immediately. It checks whether a capture is pending, and if one is, it keeps going — captures only — until the board is quiet. Only then does it count.

Here is the size of the error being avoided, from real positions in a real game. "Static" is what the evaluation says mid-exchange; "settled" is what the position is actually worth once the captures are played out:

● The human version

Count to quiet, not to even. Never stop a calculation on a capture. Follow the exchange to the point where neither side has a capture available, and only then count material.

This is the most common blunder in the game and it is not a failure of vision — it is stopping one ply early. The recapture that beats you is usually the one you did not bother to look at because the count was already even.

Idea six

Iterative deepening: shallow first, then deeper, keeping your guess

Why the engine searches depth 1, then 2, then 3 — instead of going straight to 8.

It looks wasteful. It is not, for two reasons.

What the clock actually buys, on this machine:

Note the shape of it: four times the thinking time buys roughly one extra ply. That is what an exponential tree feels like from the outside, and it is why "think longer" has sharply diminishing returns compared to "think in the right order".

● The human version

Do not calculate the first line you see to its end. Look at all your candidate moves one ply deep, pick the best-looking one, then look at all of them two plies deep starting with that one. You will find the refutation of a bad idea in the shallow pass, before you have spent three minutes on it.

It also means you always have a move ready. If your clock is short, you play the best thing from the last complete pass — never a half-finished thought.

Two small ones

Extensions, and preferring the short road

Forced sequences are free, so follow them

When the only legal moves are captures, the engine does not spend a ply of its depth budget — it extends the search instead. The reasoning: a forced sequence has no branching, so following it costs almost nothing and leaves you looking at a real position rather than a half-resolved one.

The human version: when a sequence is forced, keep going. It is the cheapest calculation on the board — there are no choices to weigh, only squares to track. Players who stop at "it gets complicated here" are usually stopping exactly where it stops being complicated.

A win in three beats a win in nine

Winning positions are not scored as a flat "win". They are scored as mate − ply, so a forced win that arrives sooner scores higher. Without that, an engine that has seen a win will happily shuffle forever, because every move looks equally winning.

The human version: when you are winning, take the shortest road, not the most elegant one. Trade pieces, simplify, crown. Complexity only helps the player who is losing.

The point of all this

Playing like the engine

The five habits, as one procedure you can run at the board.

You cannot out-calculate the machine. You do not have to. Almost all of its advantage over a club player comes from doing five cheap things reliably, and every one of them is available to you.

  1. Scan by forcing-ness, not by geography Captures first, then crownings, then advances, then quiet moves. For both sides. If a capture exists anywhere, that is the position — everything else is speculation. (Move ordering.)
  2. For each candidate, ask "and then what?" — once Not a plan, not a hope. One question: what is their best reply? In this game it is often forced, so the answer is free. (Negamax.)
  3. Hunt for the refutation, and stop the moment you find one You are not measuring how good a move is. You are looking for one reason it fails. One is enough; drop it and move on. This is where the time saving lives. (Alpha-beta.)
  4. Never stop counting on a capture Follow every exchange to quiet — the point where neither side can take — and count only then. (Quiescence.)
  5. Go shallow across everything before you go deep on anything One ply on all candidates, then two plies starting with the survivor. You will throw out bad moves in seconds instead of minutes. (Iterative deepening.)
If you only take one thing

Take number three. Looking for the reason a move fails, instead of the reason it works, is the cheapest change you can make to how you think, and it is worth more than ninety per cent of the engine's search — measured, on this page.

Three drills, using the app

Drill one — refutation-first

Play at Club with commentary on. Before every move, name the opponent's best reply out loud. Then check the coach's "what to watch" line, which names it. You are training step two, and the feedback is immediate.

Drill two — count to quiet

Every time a capture is available, say the whole sequence before touching a piece: "I take, they must take with that one, then I take two." If you cannot say it, do not play it. Watch your Mistake count fall.

Drill three — watch the search happen

Open Watch, set Sharp against Casual, and read the commentary. The engine's "The engine wanted X" line is a refutation you missed, handed to you. That is the single highest-value feedback in the app — it turns "I was wrong" into "here is the move I did not look at".

The engine is not clever. It is disciplined — it does five plain things without ever getting bored or hopeful. That is the part you can copy, and it is the part that wins games.