Ian Osgood's Forth Go Program (FGP)
Here is a small Go program which uses Monte Carlo techniques to play Go on a small board. Included are a random player, a straight Monte Carlo player, and a UCT player.
This uses a bitmap board representation, with bitboards for white, black, and empty stones. Bitboard operations and a board stack are used for extracting information needed to play Go.
Source
Future work
- Further performance tuning. It is critical to a Monte Carlo Go program that the numerous random playouts are as fast as possible.
- Defining words to factor out duplication and unroll loops in the core bitboard operations.
- Add Go intelligence for smarter moves. Currently, it only knows not to fill in its own eyes.
- Support Go Text Protocol or CGOS protocol for playing in a client UI or on a game server.
Links
- Sensei's Library: a wiki about all aspects of Go.
- Upper Confidence bounds applied to Trees: the recently discovered algorithm which is making computer Go more tractable.
- Computer Go Server: place for computer opponents to compete.
- Marcel Hendrix's line profiler: used to find performance hot-spots.
- Wanted! "Go in Forth." Ting, C. H. Dr. Dobb's Journal, 83 (Sept. 1983), 54-60. (Duplicated in Dr. Dobbs Toolbook of Forth (Ch. 4).) Only 8 screens of code! Please send me a link to this source online.
- Marcel Hendrix sent me a version he converted to iForth in 1992: go.frt
- Wanted! Go code by Chuck Moore, the inventor of Forth. Apparently, he has said that this was one of the early problems he tried to tackle in his new language.