| 1 | # Overview # |
| 2 | |
| 3 | This repository contains a fork of GNU Go v3.8. |
| 4 | |
| 5 | I'm currently reading *Surreal Numbers* by Knuth and hope to continue with *On |
| 6 | Games and Numbers* by Conway. Applying these numbers to analysis of Go, just as |
| 7 | Conway did, would provide an engaging example as I learn to exploit my Xeon Phi |
| 8 | coprocessors. Hence, this fork of GNU Go to fiddle with. |
| 9 | |
| 10 | |
| 11 | # Status # |
| 12 | |
| 13 | Successfully builds and executes on FreeBSD 12 and Debian 10. |
| 14 | |
| 15 | Additional display modes verified in `st`, `xterm` and on a Tektronix 4107 |
| 16 | terminal. |
| 17 | |
| 18 | |
| 19 | # Modifications # |
| 20 | |
| 21 | ## ANSI Terminal Support ## |
| 22 | |
| 23 | I find myself less distracted when playing from a serial terminal. I also |
| 24 | rarely finish a game in one session. Thus, my selection of GNU Go as a base |
| 25 | upon which to tinker was in part driven by its `--mode=ascii` CLI interface. |
| 26 | This allows me to run a game inside `screen`, (re-)attaching to it either from |
| 27 | a real serial terminal or from a terminal emulator on a modern computer. |
| 28 | |
| 29 | When playing in ASCII mode, I found all my mental effort expended simply |
| 30 | attempting to read the board position. Adding some color cleared the fog. In |
| 31 | order to maintain compatibility with `screen` and my terminal, this addition of |
| 32 | color uses only ANSI escape codes to set the background, printing an ASCII |
| 33 | space character to create a block of color. This mode may be selected via the |
| 34 | `--mode=ansi` option. The screenshot below shows ASCII mode on the left and |
| 35 | ANSI mode on the right, both boards depicting the same game. |
| 36 | |
| 37 | ![Screenshot: ASCII mode (left) vs ANSI mode (right)](/sgk-go/.git/blob_plain/HEAD:/interface/interface-example.png) |
| 38 | |
| 39 | In support of serial terminals like my Tektronix 4107 which only support |
| 40 | era-appropriate ANSI escape codes, an additional `--mode=strictansi` option was |
| 41 | created. |
| 42 | |
| 43 | |
| 44 | ## Two Player Mode ## |
| 45 | |
| 46 | The ANSI mode mentioned above was cloned to create a two-player mode with the |
| 47 | same terminal-compatible ANSI-color UI. Both players must reside on the same |
| 48 | computer and have permission to create FIFOs under `/tmp/` with `mknod()`. |
| 49 | |
| 50 | The first player to launch Go plays as black and the second player to launch |
| 51 | plays as white. |
| 52 | |
| 53 | All communication in the client is strictly synchronous. Thus, commands to save |
| 54 | or analyze the game may only occur during your turn. Outside your turn, your |
| 55 | client will only display the following message, accepting no other input until |
| 56 | a move is received from your opponent. |
| 57 | |
| 58 | Waiting to receive move from other player... |
| 59 | |
| 60 | When a game terminates, each player is provided an opportunity to save an SGF |
| 61 | file for later analysis. Continuing a multiplayer game from SGF is not |
| 62 | currently supported. |
| 63 | |
| 64 | |
| 65 | ## Future Plans ## |
| 66 | |
| 67 | The GNU Go engine is written in plain old C, all reasonably organized and |
| 68 | readable. Combined with how inherently parallel most Go analysis appears to |
| 69 | be, this forms an ideal test case as I bring all the Xeon Phi development tools |
| 70 | online and learn to write parallel C code which fully exploits them. |
| 71 | |
| 72 | |
| 73 | # Instructions # |
| 74 | |
| 75 | The original GNU `README`, including full build instructions, may be found |
| 76 | under the filename `GNU_README`. On most platforms, to simply build and then |
| 77 | execute directly from within the build directory, run the following commands. |
| 78 | |
| 79 | ./configure |
| 80 | make |
| 81 | ./interface/gnugo |
| 82 | |