Go, against Hazel
Hazel activities › Hazel AI opponents · source on GitHub · hazeljs on npmYou 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.
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…
(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