Getting started with open source game playing AIs

Post on 08-Apr-2017

49 views 4 download

Transcript of Getting started with open source game playing AIs

Getting started with

Open Source Game AIs

Melvin Zhangmelvin@melvinzhang.net

@melvinzhangzy

Stockfish Pachi

https://en.wikipedia.org/wiki/File:ST Battle Chess.png

http://afflictor.com/2012/09/11/chess-programs-regularly-play-at-good-amateur-level/

https://en.wikipedia.org/wiki/Deep Blue (chess computer)

Deep Blue

https://stockfishchess.org/ Lang:C++ License:GPLv3

Stockfish

Game tree

https://en.wikipedia.org/wiki/Game tree

Optimal play

Terminal

min player

max player

Optimal play

1 01 1 1Terminal

min player

max player

Optimal play

1 01 1 1

0

Terminal

min player

max player

Optimal play

1 01 1 1

0 1

Terminal

min player

max player

Optimal play

1 01 1 1

0 1

1

Terminal

min player

max player

Chess has about 1046 (2153) states!

Minimax algorithm with heuristic score

Cut-off

min player

max player

Minimax algorithm with heuristic score

.7 .1 .6 .9Cut-off

min player

max player

Minimax algorithm with heuristic score

.7 .1 .6 .9

.1

Cut-off

min player

max player

Minimax algorithm with heuristic score

.7 .1 .6 .9

.1 .6

Cut-off

min player

max player

Minimax algorithm with heuristic score

.7 .1 .6 .9

.1 .6

.6

Cut-off

min player

max player

https://tests.stockfishchess.org/

Testing AI changes is crucial

Heuristic scores are hard!

http://mathworld.wolfram.com/Go.html

by Google Deepmind

https://deepmind.com/research/alphago/

https://gogameguru.com/alphago-races-ahead-2-0-lee-sedol/

http://pachi.or.cz/ Lang:C License:GPLv2

Pachi

Monte Carlo evaluations

Cut-off

min player

max player

Monte Carlo evaluations

Cut-off

min player

max player

Monte Carlo evaluations

Cut-off

min player

max player

Monte Carlo evaluations

Cut-off

min player

max player

Monte Carlo evaluations

Cut-off

min player

max player

.7

Monte Carlo Tree Search (MCTS)

Some games have hidden information!

http://magic.wizards.com/en/events/coverage/gpsin15/father-son-2015-06-27

https://magarena.github.io Lang:Java License:GPLv3

Choose a random instantiation of the hiddeninformation during simulation

Theory Practice

Theory Practice• Optimal play

• Minimax

• Monte Carlotree search

• Sampling hiddeninformation

Theory Practice• Optimal play

• Minimax

• Monte Carlotree search

• Sampling hiddeninformation

Stockfish Pachi