Go, against Hazel

Hazel activities › Hazel AI opponents · source on GitHub · hazeljs on npm

You play black, Hazel plays white. Put a stone on a point; stones left with no empty point beside them are taken. Two passes in a row end the game, scored by area (Tromp and Taylor's rules): your stones and the empty points only your stones reach, against Hazel's, plus komi for white, who moves second. Every stone on the board counts as alive at the end, so take stones that cannot live before you pass. The board, the moves, the score and Hazel's choice of move are a Hazel program, shown beside the board. Hazel looks one move ahead: a beginner's opponent.

⏳ Loading Hazel (hazeljs from jsDelivr), whose rules play and score.
⚫ You⚪ Hazel

This app needs JavaScript, and a page served over http (python3 -m http.server, then localhost).

The vocabulary the module sees (go/rules/preamble.hz). The listings are text, highlighted, until Edit in Hazel opens each in Hazel's own editor; an edit changes the next move.

loading preamble.hz…
Go the board (a group of stones and its liberties), a move (its captures, never one that leaves its own stones without a liberty, the ko), a pass, the score, and the opponent: every empty point tried, each worth what it takes, saves, threatens and risks, and where it is. The page calls (fresh, play, pass, score, choose).
loading Go.hz…

hazeljs-examples · versions · Apache 2.0 (code), CC BY 4.0 (words, the icon) · by Matthew Hammer · an example for hazeljs