{"id":38665709,"url":"https://github.com/lene/go-3","last_synced_at":"2026-01-17T09:47:38.583Z","repository":{"id":30557558,"uuid":"34112359","full_name":"lene/go-3","owner":"lene","description":"Three dimensional Go game","archived":false,"fork":false,"pushed_at":"2025-11-24T17:43:43.000Z","size":1434,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-28T04:49:55.662Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lene.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-04-17T11:13:06.000Z","updated_at":"2025-10-19T18:34:17.000Z","dependencies_parsed_at":"2023-10-24T10:27:37.183Z","dependency_job_id":null,"html_url":"https://github.com/lene/go-3","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/lene/go-3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lene%2Fgo-3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lene%2Fgo-3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lene%2Fgo-3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lene%2Fgo-3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lene","download_url":"https://codeload.github.com/lene/go-3/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lene%2Fgo-3/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28505565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-17T09:47:38.434Z","updated_at":"2026-01-17T09:47:38.545Z","avatar_url":"https://github.com/lene.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"The Asian game of Go (its Japanese name; also known as Weiqi in Chinese and Baduk in Korean) takes \nplace on a two-dimensional board. Its idea readily extends to three dimensions - placing stones on a\ncubic lattice. \n\n\u003cimg src=\"src/doc/resources/2022-10-08-194426_1280x960_scrot.png\" \n     alt=\"Example of a game situation on a 7x7x7 three-dimensional Go board\"\n     width=\"826\" /\u003e\n\nThis is a program for playing on such a three-dimensional lattice. \n\n# Installing\n\nTo play three-dimensional Go you need one server and a client for each player. You can either run \nthem from a docker image (the recommended way at this time) or build them with `sbt` and run them\nlocally.\n\n## Docker image\n\nUsing the docker image no local installation is needed. It is necessary that you have `docker` \ninstalled locally and the `docker` daemon is running. See https://www.docker.com/get-started/ to get\nstarted with `docker`.\n \n## Building from source\n\nIt is assumed you have Scala and the `sbt` Scala Build Tool installed. See \n[Installing `sbt`](#markdown-header-installing-sbt) below for minimalistic install instructions for \n`sbt`.\n\n### Clone the repository from GitHub\n```shell\n$ git clone https://github.com/lene/go-3.git\n```\n`cd go-3` to continue.\n\n### Build with `sbt`\n```shell\n$ sbt universal:packageBin\n```\nThis creates the archive `target/universal/go-3d-$VERSION.zip`, where `$VERSION` is the version of \n3D Go you are trying to install. If you unzip this archive to folder `$TARGET`, it will create the \nfolders `$TARGET/go-3d-$VERSION/bin` and `$TARGET/go-3d-$VERSION/lib`. When referring to commands in \nthe following, it is assumed that `$TARGET/go-3d-$VERSION/bin` is in your `$PATH` - otherwise, \nprepend `$TARGET/go-3d-$VERSION/bin` to the commands given below.\n\n# Running\n\n## Server\n\nSet `$SAVE_DIR` to the folder to save games in and `$PORT` to the port the server runs on.\n\n### From docker image\n```\n$ docker run [--net=host] [--env SAVE_DIR=$SAVE_DIR] [--env PORT=$PORT] \\\n    -t registry.gitlab.com/go-3/go-3/server:latest\n```\nDepending on your Docker configuration, the `--net=host` may be necessary or not.\n\n### From a local install\n``` \n$ go-server [--port $PORT] [--save-dir $SAVE_DIR]\n```\n\n## Client\n\n### Docker\nFor the client, no convenient Docker image exists yet. If you do not want to perform the local \ninstallation, I suggest you run the docker image in interactive mode:\n```shell\n$ docker run --net=host --env PORT=$PORT --entrypoint /bin/bash -it \\\n         -t registry.gitlab.com/lilacashes/go-3/server:latest\n```\nYou will be dropped into a `bash` shell. From there you can add `/go-3/bin` to the `PATH` \nenvironment variable:\n```shell\n$ export PATH=/go-3/bin:$PATH\n```\nand continue as with a local install, as detailed below.\n\n### Local install\n\n#### Connecting two players to start a game\nTo start a new game with board size `$SIZE`:\n```\n$ ascii-client --server $SERVER --port 6030 --size $SIZE --color [b|w]\n```\nThis will print a status line with a Game ID and a token:\n\n\u003cimg src=\"src/doc/resources/2022-10-08-210914_1344x2054_scrot.png\"\n     alt=\"Example output after starting the first ASCII client as player Black\"\n     width=\"1280\" /\u003e\n\nYou will need to remember the Game ID for another player to join the game. Remember the token if you\nmight close down your client and want to reconnect to the same game later on.\n\nTo register as second player for a game with ID `$GAME_ID`:\n```\n$ ascii-client --server $SERVER --port 6030 --game-id $GAME_ID --color [b|w]\n```\nThis will print a similar line in the just started second line:\n\n\u003cimg src=\"src/doc/resources/2022-10-08-211010_1344x2054_scrot.png\"\n     alt=\"Example output after starting the second ASCII client as player White\"\n     width=\"1280\" /\u003e\n\n#### Making moves\nMeanwhile the first client will now show an ASCII representation of an empty 3D Go board, as \n`$SIZE` 2D board laid out next to each other:\n\n\u003cimg src=\"src/doc/resources/2022-10-08-211407_1344x2054_scrot.png\"\n     alt=\"Example output of the empty 3D Go board\"\n     width=\"1280\" /\u003e\n\nOnce a client is ready to make a move, the command `s $X $Y $Z` will set a stone at position\n(`$X`, `$Y`, `$Z`), or the command `p` will pass.\n\nTo get help, enter any unrecognizable command:\n\n\u003cimg src=\"src/doc/resources/2022-10-08-211922_1344x2054_scrot.png\"\n     alt=\"Entering a bad command to read the help\"\n     width=\"1280\" /\u003e\n\nOnce you have set, your client will wait for the opponent to respond:\n\n\u003cimg src=\"src/doc/resources/2022-10-08-212303_1344x2054_scrot.png\"\n     alt=\"Player Black, after setting a stone\"\n     width=\"1280\" /\u003e\n\nWhile the other client will now display the updated board with the last set stone, and ask player \nWhite to make their move:\n\n\u003cimg src=\"src/doc/resources/2022-10-08-212507_1344x2054_scrot.png\"\n     alt=\"Player White waiting for input\"\n     width=\"1280\" /\u003e\n\nThis will continue until either both players pass or the number of possible moves is exceeded, at \nwhich point the client will display each player's score and exit.\n\n#### 3D display of a game\nAdmittedly the board display in the ASCII client is not very intuitive. Since version 0.7.0 there is\na client providing a three-dimensional display of the board. This client can only watch boards at \nthe moment, not make any moves, so it can be used in conjunction with the ASCII client. To start it, \ntype:\n```shell\n$ gdx-client --server $SERVER --port 6030 --game-id $GAME_ID\n```\nto get a freely rotatable and zoomable representation of the board akin to this:\n\n\u003cimg src=\"src/doc/resources/2022-10-08-213939_1280x960_scrot.png\"\n     alt=\"3D representation of the board\"\n     width=\"993\" /\u003e\n\n#### Reconnecting after a dropped connection\nTo reconnect to a game that has already started and the player has been given the authentication\ntoken `$TOKEN`:\n```\n$ ascii-client --server $SERVER --port 6030 --game-id $GAME_ID --token $TOKEN\n```\nThe client will display a spinning prompt while waiting for the other client to make their move.\n\n#### Bot client\nA client with a number of predefined strategies is available. To use it, run:\n```shell\n$ bot-client --server $SERVER --port 6030 \\\n            [--size $SIZE --color b|w ] | \\ \n            [--game-id $GAME_ID --color b|w] |\\\n            [--game-id $GAME_ID --token $TOKEN] \n            --strategy $STRATEGY [--max-thinking-time-ms $MILLISECONDS]\n```\nwhere `$STRATEGY` currently can be any, or any combination, of:\n* `random`: set stones at random (an awful strategy!)\n* `closestToCenter`: set as close to the center as possible\n* `onStarPoints` : try to set on the star points first. If all are occupied, try the next strategy.\n* `closestToStarPoints`: try to set as close to star points as possible\n* `maximizeOwnLiberties`: have as many liberties (counted over all stones) as possible with every \n  move\n* `minimizeOpponentLiberties`: take away the opponent's liberties (counted over all opponent's \n  stones)\n* `maximizeDistance`: set stones as far away as possible from others\n* `prioritiseCapture`: try to capture opponent stones, setting a stone next to an opponent's stone \n  with the fewest liberties\n\nand `$MILLISECONDS` is the approximate(!) maximum time in milliseconds the bot will take to\nmake a move. The time is limited by randomly choosing a selection from all possible moves, and \nexecuting the strategy on those. The default is not to limit the thinking time.\n\nIf you combine multiple strategies (by giving a comma separated list as input to `--strategy`), the\nstrategies are evaluated one after the other, the next strategy executed on the moves that are \nequally optimal according to the previous strategy. For example, \n`--strategy prioritiseCapture,closestToCenter,maximizeOwnLiberties` will try to minimize the \nliberties of an opponent's stone. If there are multiple stones with an equal number of liberties, it\nwill choose among those which are closest to the center (\"on the inside\"). And if multiple of those \nremain, it will prefer those positions that give itself more liberties.\n\n# Development notes\n\n## Installing `sbt`\n\nSee https://www.scala-sbt.org/1.x/docs/Installing-sbt-on-Linux.html for full instructions.\n\n### Shortcut for Ubuntu\n```shell\necho \"deb https://repo.scala-sbt.org/scalasbt/debian all main\" | sudo tee /etc/apt/sources.list.d/sbt.list\necho \"deb https://repo.scala-sbt.org/scalasbt/debian /\" | sudo tee /etc/apt/sources.list.d/sbt_old.list\ncurl -sL \"https://keyserver.ubuntu.com/pks/lookup?op=get\u0026search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823\" | sudo apt-key add\nsudo apt-get update\nsudo apt-get install sbt\n```\n\n### Troubleshooting\n\n```shell\n$ sbt compile\n...\n[error] java.io.IOException: User limit of inotify instances reached or too many open files\n...\n```\ncan be solved with:\n```shell\n$ cat /proc/sys/fs/inotify/max_user_instances\n128\n$ echo 256 | sudo tee /proc/sys/fs/inotify/max_user_instances\n256\n```\nor for a longer term solution (?)\n```shell\n$ sudo sysctl fs.inotify.max_user_instances=256\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flene%2Fgo-3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flene%2Fgo-3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flene%2Fgo-3/lists"}