Nexus
Complete a full line to win, but every stone you capture becomes a debt you must settle in stones when you do. Fight too hard and you go bankrupt.
- Players
- 2 players
- Modes
- Two players on one device; One player against a simple computer opponent
How to play
Nexus is a game for two on a square grid. You place stones as in Go and try to fill a whole line, as in tic-tac-toe. The catch is money: every stone you capture puts you in debt, and the debt comes due when you complete your line.
- Black moves first. On your turn, place one stone on any empty intersection. There is no passing.
- Fill the last liberty of an enemy group to capture it, as in Go. Each stone you capture adds 2 to your debt.
- Complete a full row, column or long diagonal and the game is audited. If your debt is no higher than your opponent's, you win.
- If it is higher, remove as many of your own stones as the difference. Still holding a line? You win. Otherwise both debts reset to zero and play goes on. Too few stones to pay? You are bankrupt and lose.
- If you ever have no legal placement, remove the fewest enemy stones that give you one, at 4 debt per stone, then place.
The tutorial on the Play page walks through each of these with a small example, and the full rules below cover every case.
How Nexus differs from games you know
- Go. The board, the stones, groups, liberties, captures and the ban on suicide all work as in Go, and repeating a position is forbidden much as under Go's superko rules. But Go is won by surrounding territory, and captures are worth points. In Nexus you win with a single straight line, and captures are a liability: they win the local fight and cost you at the audit. There is no territory, no scoring, and no passing.
- Hex. Hex is won by a connected chain of any shape between two sides, nothing is ever captured, and the board fills up until someone wins. A Nexus line must be perfectly straight and run the full width of the board, stones come and go all game, and you can lose by completing your own line while in debt.
- Tic-tac-toe and its relatives. Completing a line is the goal, but it is not an automatic win. It triggers an audit, which may make you dismantle the very line you just built. Lines also run the whole board (five in a row on 5 × 5, nine on 9 × 9), and only the two long diagonals count. And because stones can be captured, the board never simply fills up.
Playing on this site
- Two players can share one device, taking turns, or one player can take on a simple computer opponent ported from the original Nexus bot. It looks one move ahead and ignores debt, so it will happily complete a line into bankruptcy.
- Tap or click an intersection to place a stone. Small dots mark the legal points. With a keyboard, the board is one tab stop: arrow keys move, Enter or Space places.
- When a turn needs a choice (which enemy stones to remove to unblock, or which of yours pay the audit), the board marks the candidates and the panel under it lists them. Nothing happens to the board until the whole turn is chosen.
- Use New game to choose the board size (3 × 3 to 9 × 9) and both debt rates; the standard game is 5 × 5 with capture debt 2 and unblocking debt 4. Your game is saved in this browser after every turn, so you can close the page and carry on later.
- Games can end in a draw. Two players at one device can agree one with Offer a draw. And a game is drawn automatically after 2·n² turns in a row with no capture (50 on the standard board); the panel counts them.
Full rules
1. Board and players
Nexus is played on the intersections of an n × n grid. The standard board is 5 × 5; this site offers 3 × 3 to 9 × 9. Points are named by column letter and row number, A1 being the top-left. Black and White alternate, Black first. On every turn a player places exactly one stone; there is no passing.
2. Groups, liberties and captures
A group is a set of same-coloured stones joined orthogonally (up, down, left, right). Its liberties are the empty points orthogonally next to any of its stones.
- Place your stone on an empty point.
- Every enemy group next to it that now has no liberties is captured: all its stones are removed.
- If your new stone's group had no liberties before those captures, the placement is legal only if it captured something. Otherwise it is suicide and not allowed.
3. Debt
Each player has a debt, starting at 0. It goes up in two ways:
- Captures: p1 per enemy stone you capture (standard p1 = 2).
- Forced unblocking (section 6): p2 per enemy stone you remove (standard p2 = 4).
Debts never go down on their own. The only way they change otherwise is the reset in section 5.
4. Lines
A line is a whole row, a whole column, the main diagonal (A1 to the bottom-right corner) or the anti-diagonal (top-right to bottom-left corner): 2n + 2 lines in all. You own a line when every one of its n points holds your stone.
5. The audit
If, after your placement and its captures, you own at least one line, there is an audit. Let the net debt be your debt minus your opponent's, counting any capture debt from this placement.
- Net debt 0 or less: you win.
- Net debt above 0, and you have fewer stones on the board than that: you are bankrupt and lose.
- Otherwise you remove exactly that many of your own stones, chosen by you. The stone you just placed may be among them. Then, if you still own any line (not necessarily the one you just made), you win. If not, both debts are reset to 0 and it is your opponent's turn.
6. Forced unblocking
If at the start of your turn no empty point is a legal placement for you (because of suicide or the repetition rule), you must first remove enemy stones: the smallest number of them that leaves you at least one legal placement. If several sets of that size work, you choose which. You take p2 debt per stone removed, then place a stone as usual, on any point that is now legal. If no set of enemy stones would help, even all of them, you lose.
7. No repeated positions
A position is the board together with the debt difference (Black's debt minus White's). Whose turn it is does not count. The position at the end of every turn is recorded; after an audit that resets the debts, it is recorded with both debts at 0. A placement is illegal if the position right after it and its captures (before any audit) has been recorded before.
Because each capture charges its taker, a Go-style ko recapture restores the debt difference along with the board, so it is a repetition and illegal, as in Go.
8. End of the game
The game ends in one of these ways:
- a player wins at an audit (section 5);
- a player is bankrupt at their own audit, and the opponent wins;
- a player has no legal placement and no unblocking would give them one, and the opponent wins;
- a draw by agreement: on their turn, a player may offer a draw, and the game is drawn if the opponent accepts;
- a draw by quiet play: the game is drawn as soon as 2·n² turns in a row (counting both players) have passed without a capture: 50 turns on a 5×5 board, 162 on 9×9. A capture resets the count to zero. A turn that wins the game is a win even if it is also the turn that reaches the limit.
There are no scores.
9. Parameters
- Board size n: standard 5; the original rules recommend 3, 5, 7 or 9.
- Capture debt p1: standard 2 per stone.
- Unblocking debt p2: standard 4 per stone.
Notes on these rules
These rules follow the original Nexus engine, which is what has been played, and this site's engine is checked against it by replaying recorded games position by position. The engine and the written rules agree on every point of play; the written rules are silent on a few details, settled here by the engine:
- The player chooses among equally small unblocking removals, and which stones pay an audit.
- The stone just placed may be used to pay.
- After paying, any full line wins, not only the one just completed.
- Repetition is checked right after the placement and its captures, and the stones removed to pay an audit are not themselves checked against it.
- Some older descriptions of Nexus say lines are rows, columns and "the main diagonal"; both long diagonals count, as the written rules say.
Open questions, recorded rather than decided:
- Unblocking and repetition. The smallest removals are found using the debts before the unblocking debt is added, but the placement after them is checked with it added. In principle a removal could then leave no legal placement. This site does not offer such a removal, and if every removal were like that, it would say the rules do not cover the position. No such position has turned up in testing.
One safeguard here is not a rule: before a placement that would bankrupt you, the site asks you to confirm it.
Credits and licensing
- Nexus by Peace Cat Games.
- Browser implementation by Peace Cat Games, ported from the original Nexus engine and bot.
- License: All rights reserved
This browser version is a TypeScript port of the original Nexus rules engine, written in Python. Its rules, its parameters (board size, p1 and p2) and their defaults are carried over unchanged. To check the port, the original engine played 172 recorded games, and this one replays every turn of them, matching the board, debts, legal points and result at each step. The original engine's own unit tests are ported too.
A few faults in the original code are fixed without changing the rules: a turn that turned out to be illegal part-way no longer leaves stones removed or debt charged, and the same stone can no longer be counted twice in a payment.
The computer opponent is a port of the original Nexus bot, written to play on the earlier Nexus website. It makes the same choices, with one repair: the original could not move at all after a forced unblocking. It is a simple one-move-ahead heuristic. It completes a line whenever it can, blocks your nearly complete lines, and otherwise builds towards the centre. It does not consider debt or captures, so it will complete a line into bankruptcy and pay audits carelessly. It is a practice partner, not a strong player.
Earlier versions of Nexus also had online play against other people. That needed a server, so it is not part of this site.