Gomoku Party← Game database

OPEN SPECIFICATION · VERSION 2 · 1 OCTOBER 2026

Gomoku Party SGF profile

This profile, gomoku-party-sgf-2, describes our public game archives. It builds on the existing Smart Game Format FF[4]. SGF already assigns GM[4] to Gomoku and Renju. This is a documented publishing profile, not a claim to have invented SGF or the first Gomoku file format.

Scope and month boundaries

Version 2 includes all completed game records between human players with at least five stone placements, regardless of game mode, rating status or ruleset. Freestyle, Renju, Swap2, Pente, Ninuki Renju and Caro share one monthly file. Ranked, casual, friendly/private, challenge, rematch and tournament games are included. Ruleset, mode and rated/unrated status are explicit in each record. Puzzle attempts and Puzzle Battles are separate puzzle-session records, not complete games in the games table.

A game's UTC finish timestamp selects its month: the first day at 00:00:00 is inclusive and the following month's first day is exclusive. A game started in July and finished in August belongs to August. Only closed months are published, starting with August 2026. Each archive is independent, not cumulative.

Rapfi bot games are excluded by bot identity on either side, independently of mode or rating status. Aborted games, records with fewer than five moves, incomplete or invalid records are excluded. Before publication, every move is replayed to validate sequence, recorded colours, board bounds, occupied intersections and recorded captures. Historical results are preserved from the authoritative record; current win rules do not re-adjudicate old games. The manifest identifies human-only archives with humanOnly: true and scope.players: HUMAN_ONLY. Earlier profile-2 archives without that guarantee are withdrawn from public downloads and rebuilt automatically. Safe historical ranked-only profile-1 downloads remain available. Counts and exclusion reasons appear in the manifest. An archive describes the available backend records at publication time; older games missing from the backend cannot be reconstructed.

Container and encoding

Files use .sgf.gz: gzip-compressed UTF-8, with no byte-order mark. Decompression yields an SGF collection. Each game tree occupies one LF-terminated line. There are no variations, comments, setup stones or pass moves. Recorded captures use the XCP move extension. Capture games can contain more than 225 placements because removed intersections can be reused. Games are ordered by finish timestamp, then game UUID. Gzip has a fixed zero timestamp and no filename header; identical records produce identical archive bytes with the same exporter/runtime.

Download names contain the month and the first 16 hexadecimal characters of the archive's SHA-256. The backend generates and stores each archive, and exposes it through the public download API. The manifest stores the full hash; a companion .sha256 file can be checked with shasum -a 256 -c FILE.sha256. On Linux, sha256sum -c FILE.sha256 works too. A rebuilt month receives a new name when its content changes. Consumers should discover the current file from the manifest.

Root properties

PropertyMeaning
FF[4] GM[4] CA[UTF-8]SGF version, Gomoku/Renju game family, encoding.
AP[GomokuParty:2.0] SZ[15]Exporter/profile implementation and square board size.
RU[Gomoku Freestyle]Human-readable ruleset: Gomoku Freestyle, Gomoku Renju, Gomoku Swap2, Pente, Ninuki Renju or Caro. XR provides the exact backend ruleset identifier.
GNStable game UUID. Not a player ID or an authenticated replay token.
PC / SOSite URL / database URL.
DTUTC start date, YYYY-MM-DD. See XST/XET for full timestamps.
PB[Black] PW[White]Fixed anonymous labels, not account identities.
BR / WRBlack/white pre-game rating, formatted as an integer followed by “ Elo”. Historical stored ratings are preserved.
REB+ / W+ for a line or capture win; B+R / W+R for resignation; B+T / W+T for timeout; 0 for a recorded draw.
CP[CC0-1.0]Dataset dedication.

Profile extensions

These uppercase properties extend SGF without changing its grammar. Readers must process XCP to replay capture variants correctly. Readers that ignore it can recover the placement order but will display an incorrect board after a capture. GM[4] identifies the Gomoku/Renju family; the exact capture and opening semantics belong to this versioned profile. Writers using this profile must preserve its documented semantics.

PropertyMeaning
XGP[gomoku-party-sgf-2]Versioned profile identifier.
XR / XMExact ruleset (FREESTYLE, RENJU, SWAP2, PENTE, NINUKI_RENJU, CARO) and mode (RANKED, CASUAL, PARTY, CHALLENGE, REMATCH, TOURNAMENT).
XRTrated or unrated, from the authoritative backend.
XMCTotal recorded stone placements; at least 5. Swap2 opening placements count as moves.
XTCThree values: XTC[PER_MOVE][seconds per move][0] or XTC[FISCHER][initial seconds per player][increment seconds]. SGF TM is omitted.
XST / XETStart/finish timestamps in ISO 8601 UTC, ending in Z, with optional fractional seconds.
XERFIVE_IN_ROW, CAPTURE_WIN, RESIGNATION, TIMEOUT or DRAW.
XCP (move node)List of captured coordinates, for example XCP[ih][jh]. Remove these stones immediately after placing that node’s stone. This matches the client SGF export extension.

Coordinates and moves

The original recorded stone colours are preserved, including historical Swap2 openings with adjacent placements of the same colour. Swap2 opening colours are stored in placement order, independently of the person placing them; Black/White labels and ratings refer to the final colour assignments. Each non-root node contains exactly one B or W move. A coordinate is two lowercase ASCII letters a through o: column first, row second, both counted from the top-left. Thus aa is top-left, oa top-right, ao bottom-left, and hh the centre. Move coordinates use intersections. Consumers must not reverse row and column.

SGF values escape \ as \\ and ] as \]. The profile's text values contain no literal line breaks. Parsers should follow the SGF grammar rather than splitting blindly on semicolons or brackets.

Complete example

This synthetic example ends when White resigns after five moves; it is documentation only and is not included in the downloadable dataset.

(;FF[4]GM[4]CA[UTF-8]AP[GomokuParty:2.0]SZ[15]RU[Gomoku Freestyle]GN[00000000-0000-4000-8000-000000000001]PC[https://gomokuparty.com]DT[2026-08-12]PB[Black]PW[White]BR[1200 Elo]WR[1210 Elo]RE[B+R]SO[https://gomokuparty.com/database/]CP[CC0-1.0]XGP[gomoku-party-sgf-2]XR[FREESTYLE]XM[RANKED]XRT[rated]XMC[5]XTC[PER_MOVE][60][0]XST[2026-08-12T12:00:00Z]XET[2026-08-12T12:02:00Z]XER[RESIGNATION];B[hh];W[ih];B[ii];W[jj];B[hi])

Manifest contract

manifest.json (GET /api/v1/database) is UTF-8 JSON with schemaVersion: 1, profile, license, scope, totalGames and months ordered newest first. Each month contains month, games, file (download filename), downloadUrl and checksumUrl (absolute API paths), bytes, uncompressedBytes, sha256, publishedAt, candidateGames, excludedGames, exclusions (reason counts) and results (termination counts). Version-2 entries also contain profile, rulesets and modes (game counts by identifier), and ratedGames. Counts include zero-game months. Clients should ignore unknown fields. A breaking profile or manifest change requires a new version.

Version-1 compatibility

Previously published gomoku-party-sgf-1 archives retain their original bytes and download URLs. Their scope was rated RANKED Freestyle only, with scalar XTC seconds per move. Version 2 regenerates those closed months with the broader scope and a new gomokuparty-games-YYYY-MM-HASH.sgf.gz filename. The manifest lists the newest successfully published archive per month; during an upgrade, an older month may still use version 1 until its replacement is ready. Each month’s profile identifies its actual semantics.

Public API

GET /api/v1/database returns the archive manifest. GET /api/v1/database/manifest.json is an alias. Use each entry’s downloadUrl to download the gzip file and checksumUrl for its SHA-256 file. Downloads support HEAD, Content-Length, Content-Disposition and conditional requests with ETag / If-None-Match. Archive URLs include a content hash and can be cached indefinitely. Unknown or unpublished files return 404. Only read access is public: visitors cannot trigger an export.

A dedicated backend worker starts after application startup and checks for missing completed UTC months every six hours. Archives are stored persistently in PostgreSQL in 256 KiB chunks and become visible only after successful generation. The worker uses its own scheduler and a database lock, so game clocks and multiple server instances remain independent of the export.

Reuse and privacy

The dataset and this profile are available under CC0 1.0 Universal. Game records expose no player names, account IDs, contact details, chat, device information, anti-cheat signals or private replay tokens. Black and White labels are not linkable player pseudonyms. Published archive copies may be retained by downloaders.

Inspired by the monthly download model of the Lichess open database. SGF is an existing, independently maintained standard. This profile is maintained by Gomoku Party; contact us about format or data issues.