Sashité for Developers
  1. Sashité for Developers
  2. Specifications
  3. PCN
  4. 1.0.0
  5. Examples

PCN Examples

Practical implementation guide for Portable Chess Notation v1.0.0.


Overview

This document provides comprehensive examples of PCN (Portable Chess Notation) usage across various game scenarios and configurations. These examples demonstrate practical applications of the PCN specification using the integrated Sashité ecosystem specifications.

Note: All examples are for illustration purposes only. PCN records observable facts without interpreting their competitive significance, maintaining rule-agnostic principles throughout.


Traditional Chess Games

Standard Chess Opening

A traditional chess game featuring the King’s Gambit opening:

{
  "meta": {
    "name": "King's Gambit",
    "event": "Club Championship"
  },
  "sides": {
    "first": {
      "name": "Alice",
      "elo": 1650,
      "style": "CHESS"
    },
    "second": {
      "name": "Bob",
      "elo": 1720,
      "style": "chess"
    }
  },
  "setup": "+rnbq+kbn+r/+p+p+p+p+p+p+p+p/8/8/8/8/+P+P+P+P+P+P+P+P/+RNBQ+KBN+R / C/c",
  "moves": [
    ["e2", "e4"],
    ["e7", "e5"],
    ["f2", "f4"],
    ["e5", "f4"]
  ],
  "status": "in_progress"
}

Completed Chess Game with Checkmate

Scholar’s Mate demonstration:

{
  "sides": {
    "first": {
      "name": "Alice",
      "style": "CHESS"
    },
    "second": {
      "name": "Bob",
      "style": "chess"
    }
  },
  "setup": "+rnbq+kbn+r/+p+p+p+p+p+p+p+p/8/8/8/8/+P+P+P+P+P+P+P+P/+RNBQ+KBN+R / C/c",
  "moves": [
    ["e2", "e4"],
    ["e7", "e5"],
    ["d1", "h5"],
    ["b8", "c6"],
    ["f1", "c4"],
    ["g8", "f6"],
    ["h5", "f7"]
  ],
  "status": "checkmate"
}

Cross-Style Games

Chess vs Makruk Match

Hybrid game where different players use different piece traditions:

{
  "sides": {
    "first": {
      "name": "Western Player",
      "style": "CHESS"
    },
    "second": {
      "name": "Thai Player",
      "style": "makruk"
    }
  },
  "setup": "rnsmksnr/8/pppppppp/8/8/8/+P+P+P+P+P+P+P+P/+RNBQ+KBN+R / C/m",
  "moves": [
    ["e2", "e4"],
    ["d6", "d5"]
  ],
  "status": "in_progress"
}

Note: This example shows how PCN handles cross-style scenarios using SNN in player objects (CHESS for first player, makruk for second player) and SIN in FEEN positions (C for Chess, m for Makruk).

Chess vs Ōgi Match

Cross-style example between Chess and Ōgi:

{
  "sides": {
    "first": {
      "name": "Chess Player",
      "style": "CHESS"
    },
    "second": {
      "name": "Ōgi Player",
      "style": "ogi"
    }
  },
  "setup": "lnsiksnl/1r4b1/pppppppp/8/8/8/+P+P+P+P+P+P+P+P/+RNBQ+KBN+R / C/o",
  "moves": [
    ["e2", "e4"],
    ["e6", "e5"],
    ["b1", "c3"]
  ],
  "status": "in_progress"
}

Game Status Examples

Resignation

{
  "sides": {
    "first": {
      "name": "Tactical Player",
      "style": "CHESS"
    },
    "second": {
      "name": "Strategic Player",
      "style": "chess"
    }
  },
  "setup": "+rnbq+kbn+r/+p+p+p+p+p+p+p+p/8/8/8/8/+P+P+P+P+P+P+P+P/+RNBQ+KBN+R / C/c",
  "moves": [
    ["e2", "e4"],
    ["c7", "c5"],
    ["g1", "f3"],
    ["d7", "d6"],
    ["d2", "d4"],
    ["c5", "d4"],
    ["f3", "d4"],
    ["g8", "f6"],
    ["b1", "c3"],
    ["a7", "a6"]
  ],
  "status": "resignation"
}

Stalemate

{
  "sides": {
    "first": {
      "name": "Player A",
      "style": "CHESS"
    },
    "second": {
      "name": "Player B",
      "style": "chess"
    }
  },
  "setup": "7k/5Q2/6K1/8/8/8/8/8 / c/C",
  "moves": [
    ["f7", "f8"]
  ],
  "status": "stalemate"
}

Position Repetition

{
  "sides": {
    "first": {
      "name": "Cautious Player",
      "style": "CHESS"
    },
    "second": {
      "name": "Defensive Player",
      "style": "chess"
    }
  },
  "setup": "r3kbnr/ppppqppp/2n1b3/8/2B1P3/3Q1N2/PPP2PPP/RNB1K2R / C/c",
  "moves": [
    ["d3", "b3"],
    ["e6", "c4"],
    ["b3", "c4"],
    ["e7", "e6"],
    ["c4", "b3"],
    ["e6", "e7"],
    ["b3", "d3"],
    ["e7", "e6"],
    ["d3", "b3"],
    ["e6", "e7"]
  ],
  "status": "repetition"
}

Minimal Valid PCN

The smallest valid PCN document:

{
  "setup": "8/8/8/8/8/8/8/8 / ?/?",
  "moves": [],
  "status": "in_progress"
}

This represents an empty board with unknown styles, no moves played, and the game still in progress.


Tournament Context Example

PCN with full metadata for tournament play:

{
  "meta": {
    "name": "Italian Game",
    "event": "World Chess Championship",
    "location": "London, UK",
    "round": 5,
    "started_on": "2025-11-15",
    "finished_at": "2025-11-15T18:45:00Z",
    "href": "https://example.com/game/12345"
  },
  "sides": {
    "first": {
      "name": "Magnus Carlsen",
      "elo": 2830,
      "style": "CHESS"
    },
    "second": {
      "name": "Fabiano Caruana",
      "elo": 2820,
      "style": "chess"
    }
  },
  "setup": "+rnbq+kbn+r/+p+p+p+p+p+p+p+p/8/8/8/8/+P+P+P+P+P+P+P+P/+RNBQ+KBN+R / C/c",
  "moves": [
    ["e2", "e4"],
    ["e7", "e5"],
    ["g1", "f3"],
    ["b8", "c6"],
    ["f1", "c4"],
    ["f8", "c5"]
  ],
  "status": "in_progress"
}