{"id":17645187,"url":"https://github.com/dechristopher/octad","last_synced_at":"2025-05-07T04:46:06.839Z","repository":{"id":57566314,"uuid":"339486573","full_name":"dechristopher/octad","owner":"dechristopher","description":"Octad game library written in go for lioctad.org","archived":false,"fork":false,"pushed_at":"2023-12-13T15:31:34.000Z","size":135,"stargazers_count":5,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T04:46:00.558Z","etag":null,"topics":["bishop","board","castle","chess","game","go","king","knight","library","octad","pawn","pawn-castle","piece","queen","rook"],"latest_commit_sha":null,"homepage":"https://lioctad.org","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dechristopher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-16T18:06:49.000Z","updated_at":"2022-07-07T02:11:47.000Z","dependencies_parsed_at":"2024-04-07T16:45:20.851Z","dependency_job_id":null,"html_url":"https://github.com/dechristopher/octad","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dechristopher%2Foctad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dechristopher%2Foctad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dechristopher%2Foctad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dechristopher%2Foctad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dechristopher","download_url":"https://codeload.github.com/dechristopher/octad/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252816520,"owners_count":21808702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bishop","board","castle","chess","game","go","king","knight","library","octad","pawn","pawn-castle","piece","queen","rook"],"created_at":"2024-10-23T10:53:32.572Z","updated_at":"2025-05-07T04:46:06.813Z","avatar_url":"https://github.com/dechristopher.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# octad\n[![GoDoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](https://godoc.org/github.com/dechristopher/octad)\n[![Go Report Card](https://goreportcard.com/badge/notnil/chess)](https://goreportcard.com/report/dechristopher/octad)\n[![License](http://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/dechristopher/octad/master/LICENSE)\n\n**octad** is a set of go packages which provide common octad chess variant\nutilities such as move generation, turn management, checkmate detection,\na basic engine, PGN encoding, image generation, and others.\n\n## Repo Structure\n\n| Package    | Docs Link | Description |\n| ---------- | -------------------------------------------- | --------------------------------------------------------------------------------------- |\n| **octad**  | [dechristopher/octad](README.md)             | Move generation, serialization / deserialization, turn management, checkmate detection  |\n| **image**  | [dechristopher/octad/image](image/README.md) | SVG octad board image generation                                                        |\n| **liad**   | [dechristopher/octad/liad](liad/liad.go)     | **Li**(bre oct)**ad** test harness and sample self play implementation                  |\n\n\n## Installation\n\n**octad** can be installed using \"go get\".\n\n```bash\ngo get -u github.com/dechristopher/octad\n``` \n\n## Octad Game\nOctad was conceived by Andrew DeChristopher in 2018. Rules and information about\nthe game can be found below. Octad is thought to be a solved, deterministic game\nbut needs formal verification to prove that. This repository exists as an effort\ntowards that goal.\n\n### Board Layout\nEach player begins with four pieces: a knight, their king, and two pawns placed\nin that order from left to right relative to them. An example of this can be\nseen in the board diagrams below:\n\n| Octad Board | 1. c2 | 1. c2 b3 | 1. c2 b3 2. cxb3! ... |\n| ----------- | ----- | -------- | --------------------- |\n| ![Octad board](doc/octad1.svg \"Octad board\") | ![Octad board](doc/octad2.svg \"1. c2\") | ![Octad board](doc/octad3.svg \"1. c2 b3\") | ![Octad board](doc/octad4.svg \"1. c2 b3 2. cxb3! ...\") |\n\n### Rules\nAll standard chess rules apply:\n\n* En passant is allowed\n* Pawn promotion to any piece\n* Stalemates are a draw\n\nThe only catch, however, is that castling is possible between the king and any\nof its pieces on the starting rank before movement. The king will simply switch\nspaces with the castling piece in all cases except the far pawn, in which case\nthe king will travel one space to the right, and the pawn will lie where the\nking was before. An example of white castling with their far pawn can be\nexpressed as `[ 1. c2 b3 2. O-O-O ... ]` with the resulting structure leaving\nthe knight on a1, a pawn on b1, the king on c1, and the other pawn on c2. Here\nis what that would look like on the board:\n\n![Octad board](doc/far-castle.svg \"White after far pawn castling\")\n\n#### Castling Notation\n* Knight castle: **O**\n* Close pawn castle: **O-O**\n* Far pawn castle: **O-O-O**\n\n### OFEN Notation\nOFEN is a derivation of FEN to support the features of Octad. Read more\n[here](doc/OFEN.md).\n\n### Sample Games\n\n```pgn\n1.O-O a3\n2.Nc2 a2\n3.b3+ Nxb3+\n4.Kb2 a1=Q+\n5.Nxa1 Nxa1\n6.Kxa1 Kc3\n7.Ka2 b3+\n8.Ka1 b2+\n9.Kb1 Kb3\n10.d3 Kc3\n11.d4=Q+ Kxd4\n12.Kxb2 1/2-1/2\n\nDrawn by Insufficient Material\n```\n\n```pgn\n1.c2 b3\n2.Kb2 O-O-O\n3.cxb3 cxb3\n4.d2 Nc2\n5.d3 Nxa1\n6.d4=Q# 1-0\n\nWhite wins by Checkmate\n```\n\n## Performance\n\n**octad** has been performance tuned, using\n[pprof](https://golang.org/pkg/runtime/pprof/), with the goal of being fast\nenough for use by octad bots and engines. This implementation relies heavily\non the use of [bitboards](https://chessprogramming.wikispaces.com/Bitboards),\nresulting in very solid computational performance.\n\n### Benchmarks\n\nThe benchmarks can be run with the following command:\n```\ngo test -bench=.\n```\n\nResults from the baseline 2019 16\" MBP:\n```\nBenchmarkBitboardReverse-12           \t1000000000     0.000016 ns/op\nBenchmarkStalemateStatus-12           \t971688\t       1220 ns/op\nBenchmarkInvalidStalemateStatus-12    \t1387780\t       857 ns/op\nBenchmarkPositionHash-12              \t1429471\t       841 ns/op\nBenchmarkValidMoves-12                \t235640\t       4992 ns/op\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdechristopher%2Foctad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdechristopher%2Foctad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdechristopher%2Foctad/lists"}