百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
F

FoolGo

> 编程语言
开源

基于 MCTS 而非神经网络的 Go AI

377 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

基于 MCTS 而非神经网络的 Go AI

FoolGo is a Go A.I. based on MCTS (Monte Carlo Tree Search).

It shows the beginner level on the 9x9 board currently, for it does not use neural networks, but only the simple UCT (UCB for Tree) algorithm and Monte Carlo simulation.

The underlying data structure and algorithms are quite efficient. Specifically, it runs 40 thousand Monte Carlo games per second on my MacBook Air 2014.

The key ideas of the Go game's implementation are as follows:

  • We implement a string of connected pieces using the disjoint set to update piece strings during the game process efficiently.
  • We use bit operations to update the liberty point number of piece strings efficiently. For example, we use or when merging several piece strings into a single one.
  • We do not implement a tree structure for tree search, but use a hash table to keep game states. Especially, we use Zobrist Hashing to compute the hash value of a game state incrementally.

For MCTS, we use multi-thread search on CPU. In detail, we simply prohibit a thread from exploring nodes that are being explored by peer threads.

This project is highly readable and extensible due to its well-designed OOP design. Some important classes are listed as follows:

  • FullBoard A game board class providing efficient methods such as PlayMove to update the game state.
  • Player An interface providing inheritable methods such as NextMove. For example, RandomPlayer, a Player subclass, will return a random legal position of the next move when called its NextMove, while UCTPlayer performs the UCT algorithm to find the next move.
  • Game An interface containing two Player objects. For example, MonteCarloGame contains two RandomPlayer objects.

Make

  • boost is required
  • mkdir build && cd build
  • cmake ..
  • make

Contact

  • email : [email protected]
  • QQ Group:823648893

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C++the-game-of-go

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言