Chess

Chess · The classic strategy board game

Chess

Select Game Mode

← Home
White
It's White's turn
Black
abcd efgh
abcd efgh

How to Play

Chess, a Strategy Game 1,500 Years in the Making

Chess is played on an 8×8 board, each side commanding 16 pieces with one goal: corner the opponent's king. It traces back nearly 1,500 years to "chaturanga," which had taken hold in India by the 6th century, then evolved through Persia and Europe into the game we know today. [Source: Wikipedia] Countless people have studied it along the way. Its possibilities are effectively endless, and nobody finishes learning it in a lifetime, but a handful of core principles make even your very first game far more enjoyable.

The Goal Is Checkmate

There's exactly one way to win: checkmate the opponent's king. Check means the king is under attack and would be captured next move; checkmate means that attack can't be escaped by any move at all. The king is never actually captured. The moment checkmate is confirmed, the game simply ends. Certain positions where neither side can force a win (like stalemate) are ruled draws.

How the Pieces Move

  • Pawn: one square forward (two on its very first move), and it captures only diagonally forward. Reaching the far rank promotes it to another piece.
  • Knight (♞): moves in an L-shape (two squares plus one), and is the only piece that can jump over others.
  • Bishop (♝): any distance diagonally, always staying on the same color square it started on.
  • Rook (♜): any distance horizontally or vertically.
  • Queen (♛): any direction at all, making it the single most powerful piece on the board.
  • King (♚): exactly one square in any direction. Weak in raw power, but the most valuable piece of all.

Special Rules Worth Knowing

  • Castling: the king and a rook move together in one turn to tuck the king safely into a corner. Neither piece may have moved yet, and the squares between them must be empty.
  • En passant: if an opponent's pawn advances two squares and lands beside yours, you may capture it as though it had only moved one square. You can only do this immediately, on your very next move.
  • Promotion: a pawn that reaches the far rank transforms into a queen, rook, bishop, or knight. Almost everyone picks the queen, the strongest option.

Omokboard's chess supports castling and en passant, and a pawn that reaches the far rank automatically becomes a queen. Underpromotion, choosing a rook or knight instead, isn't available yet.

Piece Values: A Rule of Thumb for Fair Trades

Roughly speaking: a pawn is worth 1, a knight or bishop about 3, a rook 5, and a queen 9. The pawn looks like the weakest piece on paper, but it carries the hidden potential to promote into a queen if it survives to the far rank. Knights and bishops share the same rough value, yet their real worth swings a lot depending on where they sit on the board. Getting in the habit of comparing these numbers before every trade goes a long way toward avoiding the kind of exchange where you give up a strong piece and get much less back.

Three Opening Principles

  • Control the center: central pawn moves like e4 or d4 open up far more freedom for the pieces that follow.
  • Develop quickly: bring your knights and bishops out early. Moving the same piece over and over just delays everything else.
  • Keep the king safe: castle early so your king isn't caught in the crossfire while the center opens up.

Popular Openings for White

Most well-known openings are just the three principles above spelled out as concrete moves. Understand the principles and you won't fall far behind early, even without memorizing exact lines.

Italian Game (1.e4 e5 2.Nf3 Nc6 3.Bc4)
One of the oldest, most natural openings there is. The knight supports the center while the bishop develops toward f7, a known weak point near Black's king. It follows all three principles exactly, which makes it both easy to learn and easy to understand.

London System (1.d4 d5 2.Nf3 Nf6 3.Bf4)
A "system" opening: you set up your pieces in almost the same formation no matter how Black responds. Since you don't need a different plan for every reply, it's a reliable way to get through the opening safely without deep theoretical knowledge, which is exactly why beginners like it.

Popular Replies for Black

Sicilian Defense (1.e4 c5)
The single most common reply to 1.e4. Rather than meeting it symmetrically with e5, c5 creates an asymmetric pawn structure. It's an aggressive choice meant to steer the game into sharper, more favorable territory.

French Defense (1.e4 e6)
A solid, defensive setup: play e6, then follow up with d5 to challenge the center indirectly instead of head-on. It gives up a bit of space but builds a structure that's hard to crack.

Basic Tactics: Hitting Two Targets With One Move

Most chess tactics ultimately boil down to the same idea: create two advantages with a single move.

  • Fork: one piece, often a knight, attacks two enemy pieces at the same time. Your opponent can only save one.
  • Pin: a piece can't safely move because a more valuable piece (often the king or queen) sits directly behind it in the line of attack.
  • Skewer: the mirror image of a pin: force a valuable piece to move out of the way first, then capture whatever was hiding behind it.

Common Mistakes

  • Bringing the queen out too early and losing tempo chasing it around the board while it gets attacked.
  • Delaying castling and leaving the king exposed in the center as the position opens up.
  • Grabbing a piece that looks free, only to walk straight into a fork or a pin.
  • Moving the same piece over and over: That time is almost always better spent developing a different piece.
  • Pushing too many pawns: One or two center pawns is usually enough. Shoving edge pawns forward for no reason just burns development time.

How Omokboard's Chess AI Plays

In AI games you play White and move first, and the AI plays Black. Each difficulty level thinks in a noticeably different way.

  • Easy scores every legal move just one move deep, then deliberately throws out the best 40% and picks at random from the rest. It gives away pieces for free fairly often, which makes it a good partner for learning how the pieces move.
  • Normal reads two moves ahead, its move and your reply, judging positions by piece values and square values. It protects pieces that are about to be taken, but it can't see a fork or pin you set up over two moves.
  • Hard always reads three moves ahead, and goes to four when that finishes within a second. Wherever its reading stops, if a trade is still in progress it keeps calculating until there are no captures left. That prevents the classic mistake of stopping mid-trade and handing over a piece for free (the horizon effect).

This calculation isn't done by the chess rules library but by a lightweight calculator built just for the AI. The rules library works out the move notation and whether each move is checkmate every time it generates a move, which makes it slow. The old Hard AI averaged 5 seconds per move and took close to 40 seconds at worst; now it averages 0.6 seconds (the full story is in the dev log). The calculator's move generation was checked against the standard verification counts chess programs use (perft) and against the rules library on more than 40,000 positions from random games, with identical results.

Hard still has weak spots. It judges positions only by piece values and square values, so it doesn't separately consider king safety or pawn structure, like doubled or isolated pawns. It tends to struggle against a slow attack on its king or a long squeeze on a pawn weakness, and it can't see tactics that land more than four moves out.

Strategy by Level

Just starting out? The three opening principles alone get you halfway there. Skip the search for a flashy move and just work through center control, quick development, and king safety in order, every game.

Starting to get a feel for it? Build the habit of comparing piece values before every trade. Avoiding bad exchanges alone noticeably improves your position by the midgame.

Want to go further? Before playing your move, double-check whether it opens up a fork or a pin for your opponent next turn. Testing this habit against higher AI difficulty is the fastest way to sharpen it.

AI Difficulty, Measured

We had Omokboard's AI levels play each other (measured October 18, 2026, alternating who moves first). Each figure is the win rate of the first level against the second, with draws counted as half a win.

MatchupWin rateGames
Hard vs Normal100% (20W)20
Normal vs Easy100% (20W)20
Hard vs Easy100% (20W)20
  • Easy: Random pick from the weaker 60% of moves
  • Normal: Searches 2 moves ahead
  • Hard: Searches 3 moves ahead (4 if done within 1 s), plus up to 8 more moves of captures

Games still going after 200 moves (100 each) were scored on material (pawn 1, knight and bishop 3, rook 5, queen 9), a lead of 3 or more counting as a win. The first 4 moves of every game were random so games did not repeat.

Hard spends 616 ms per move on average, 95% of moves within 1.0 s, and 1.3 s at most. We checked that its move generator never breaks the rules with perft, the standard chess test: 197,281 positions 4 moves deep from the start and 97,862 positions 3 moves deep from Kiwipete, both matching the reference values. How the speed was fixed is in the dev log.

For other games and the full method, see AI Difficulty Benchmarks.

FAQ

  • What is stalemate? A position where you must move but have no legal move available, and your king isn't in check. It's ruled a draw.
  • Does a pawn always become a queen? Official rules also let you choose a rook, bishop, or knight, but on Omokboard it becomes a queen automatically. In real games, picking something other than a queen is rare.
  • Do I win by capturing the king? No. The king is never actually captured. Making it impossible to escape (checkmate) is what wins the game.
  • What should I practice first as a beginner? Rather than memorizing set openings, try consciously following the three opening principles (center, development, safety) in every single game. That habit outlasts memorizing a handful of openings by heart.
  • Who has the advantage, White or Black? White, moving first, has a small edge, but it's small enough that Black can play for equality with accurate moves.
  • What's a good opening to start with? The London System is easy to learn since your setup barely changes based on what the opponent plays.