Gomoku Artificial Intelligence

Consaty / Oct. 2019

Rules

What is Gomoku or Renju?

Forbidden Moves

Black will most certainly win

RIF opening

That is not enough

  • Swap after 3rd move
  • Need two 5th moves
  • 26 standard openings

Soosõrv-8

Rules in international competition

Gomocup

Gomocup - the Gomoku AI Tournament

AI based on ML

AlphaGomoku: An AlphaGo-based Gomoku

Artificial Intelligence using Curriculum Learning

The Legend

Yixin / 弈心

The Champion

Embryo - Gomoku/Renju engine

How They Win

Learning Deeper?

NO.

Searching Deeper.

Basic Techniques

What we need? what should AI do?

Frontend design

To do a good job, an artisan needs the best tools

Backend development

To do a good job, an artisan needs the best tools

C++ programming language

Gomoku board

15 × 15 board

int board[15][15];

Black and White

const int BLACK = 1;
const int WHITE = 2;
const int EMPTY = 0;
const int NONE = -1;

Encoding

Value Network

To guess if you can win!

Evaluating the board

By PolarisChiba, 2018

Evaluating the board

董红安“计算机五子棋博弈系统的研究与实现”, 2015

Evaluating the board

By Consaty, 2016

Pattern Matching

Minimax Algorithm

Maximizing the minimum!

Maximizing Player

Combine with VN

You can't search all of the states

Implementation

Run recursively!

Alpha-Beta Pruning

Don't do what you don't need to do!

Extra Parameters

alpha - Maximum of Max layers

beta - Minimum of Min layers

Implementation

Heuristic Search

Rank them before search them!

Iterative Deepening

Find the shortest path to win!

Zobrist Hash

Store the value in the table!

Optimizations

Beyond limits!

五子棋AI實作

By 林尚廷

五子棋AI實作

INFOR 32nd X 33rd 社課 -- 簡易介紹

  • 642