Intelligent Non-Player Character with Deep Learning. Intelligent Non-Player Character with Deep Learning 1

Similar documents
Department of Computer Science and Engineering. The Chinese University of Hong Kong. Final Year Project Report LYU1601

How AI Won at Go and So What? Garry Kasparov vs. Deep Blue (1997)

46.1 Introduction. Foundations of Artificial Intelligence Introduction MCTS in AlphaGo Neural Networks. 46.

Mastering Chess and Shogi by Self- Play with a General Reinforcement Learning Algorithm

Google DeepMind s AlphaGo vs. world Go champion Lee Sedol

Andrei Behel AC-43И 1

Game-playing: DeepBlue and AlphaGo

CS 380: ARTIFICIAL INTELLIGENCE MONTE CARLO SEARCH. Santiago Ontañón

AI in Tabletop Games. Team 13 Josh Charnetsky Zachary Koch CSE Professor Anita Wasilewska

Monte Carlo Tree Search

School of EECS Washington State University. Artificial Intelligence

SDS PODCAST EPISODE 110 ALPHAGO ZERO

Using Neural Network and Monte-Carlo Tree Search to Play the Game TEN

TD-Leaf(λ) Giraffe: Using Deep Reinforcement Learning to Play Chess. Stefan Lüttgen

CSC321 Lecture 23: Go

Artificial Intelligence Search III

Foundations of Artificial Intelligence Introduction State of the Art Summary. classification: Board Games: Overview

Success Stories of Deep RL. David Silver

The Principles Of A.I Alphago

AlphaGo and Artificial Intelligence GUEST LECTURE IN THE GAME OF GO AND SOCIETY

TTIC 31230, Fundamentals of Deep Learning David McAllester, April AlphaZero

CPS 570: Artificial Intelligence Two-player, zero-sum, perfect-information Games

CS 188: Artificial Intelligence

Computer Go: from the Beginnings to AlphaGo. Martin Müller, University of Alberta

Deep Learning. Dr. Johan Hagelbäck.

CS 331: Artificial Intelligence Adversarial Search II. Outline

CSE 473: Artificial Intelligence. Outline

Foundations of Artificial Intelligence

Automated Suicide: An Antichess Engine

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence

CS 4700: Foundations of Artificial Intelligence

AI, AlphaGo and computer Hex

CS440/ECE448 Lecture 11: Stochastic Games, Stochastic Search, and Learned Evaluation Functions

CS885 Reinforcement Learning Lecture 13c: June 13, Adversarial Search [RusNor] Sec

Experiments with Tensor Flow Roman Weber (Geschäftsführer) Richard Schmid (Senior Consultant)

Artificial Intelligence. Minimax and alpha-beta pruning

Augmenting Self-Learning In Chess Through Expert Imitation

Improving MCTS and Neural Network Communication in Computer Go

Mastering the game of Go without human knowledge

Learning Deep Networks from Noisy Labels with Dropout Regularization

Adversarial Search. Soleymani. Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter 5

CS 387: GAME AI BOARD GAMES. 5/24/2016 Instructor: Santiago Ontañón

Adversarial Search. Human-aware Robotics. 2018/01/25 Chapter 5 in R&N 3rd Ø Announcement: Slides for this lecture are here:

Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning

Machine Learning and RF Spectrum Intelligence Gathering

V. Adamchik Data Structures. Game Trees. Lecture 1. Apr. 05, Plan: 1. Introduction. 2. Game of NIM. 3. Minimax

Radio Deep Learning Efforts Showcase Presentation

Design and Implementation of Magic Chess

MyPawns OppPawns MyKings OppKings MyThreatened OppThreatened MyWins OppWins Draws

COMP219: COMP219: Artificial Intelligence Artificial Intelligence Dr. Annabel Latham Lecture 12: Game Playing Overview Games and Search

CITS3001. Algorithms, Agents and Artificial Intelligence. Semester 2, 2016 Tim French

Adversarial Search. CS 486/686: Introduction to Artificial Intelligence

INTRODUCTION TO DEEP LEARNING. Steve Tjoa June 2013

Game Playing. Garry Kasparov and Deep Blue. 1997, GM Gabriel Schwartzman's Chess Camera, courtesy IBM.

Foundations of AI. 6. Board Games. Search Strategies for Games, Games with Chance, State of the Art

Contents. Foundations of Artificial Intelligence. Problems. Why Board Games?

Foundations of AI. 6. Adversarial Search. Search Strategies for Games, Games with Chance, State of the Art. Wolfram Burgard & Bernhard Nebel

COMP219: Artificial Intelligence. Lecture 13: Game Playing

An Introduction to Artificial Intelligence, Machine Learning, and Neural networks. Carola F. Berger

Game Playing AI. Dr. Baldassano Yu s Elite Education

Artificial Intelligence

TEMPORAL DIFFERENCE LEARNING IN CHINESE CHESS

Game Playing State-of-the-Art CSE 473: Artificial Intelligence Fall Deterministic Games. Zero-Sum Games 10/13/17. Adversarial Search

Lecture 14. Questions? Friday, February 10 CS 430 Artificial Intelligence - Lecture 14 1

6. Games. COMP9414/ 9814/ 3411: Artificial Intelligence. Outline. Mechanical Turk. Origins. origins. motivation. minimax search

CSC 578 Neural Networks and Deep Learning

GPU ACCELERATED DEEP LEARNING WITH CUDNN

Adversarial Search Aka Games

Chess Algorithms Theory and Practice. Rune Djurhuus Chess Grandmaster / September 23, 2013

Adversarial Search. CS 486/686: Introduction to Artificial Intelligence

Generating an appropriate sound for a video using WaveNet.

History and Philosophical Underpinnings

BayesChess: A computer chess program based on Bayesian networks

CS 188: Artificial Intelligence

Deep learning with Othello

Ar#ficial)Intelligence!!

CSE 40171: Artificial Intelligence. Adversarial Search: Games and Optimality

Game Playing: Adversarial Search. Chapter 5

The Art of Neural Nets

CS 4700: Foundations of Artificial Intelligence

Artificial Intelligence Adversarial Search

CSE 40171: Artificial Intelligence. Adversarial Search: Game Trees, Alpha-Beta Pruning; Imperfect Decisions

ELE 408 Final Project

Today. Types of Game. Games and Search 1/18/2010. COMP210: Artificial Intelligence. Lecture 10. Game playing

AI & Machine Learning. By Jan Øye Lindroos

Game playing. Chapter 5, Sections 1 6

Ch.4 AI and Games. Hantao Zhang. The University of Iowa Department of Computer Science. hzhang/c145

Decoding Brainwave Data using Regression

Adversarial Search. CMPSCI 383 September 29, 2011

Introduction to Machine Learning

Applying Modern Reinforcement Learning to Play Video Games. Computer Science & Engineering Leung Man Ho Supervisor: Prof. LYU Rung Tsong Michael

Demystifying Machine Learning

Recent Progress in Computer Go. Martin Müller University of Alberta Edmonton, Canada

XiangQi Jing Sai Gui Ze 象棋竞赛规则 Laws of Xiangqi 2011 中国象棋协会审定

Artificial Intelligence

Lesson 08. Convolutional Neural Network. Ing. Marek Hrúz, Ph.D. Katedra Kybernetiky Fakulta aplikovaných věd Západočeská univerzita v Plzni.

Decision Making in Multiplayer Environments Application in Backgammon Variants

Data-Starved Artificial Intelligence

Othello/Reversi using Game Theory techniques Parth Parekh Urjit Singh Bhatia Kushal Sukthankar

Transcription:

Intelligent Non-Player Character with Deep Learning Meng Zhixiang, Zhang Haoze Supervised by Prof. Michael Lyu CUHK CSE FYP Term 1 Intelligent Non-Player Character with Deep Learning 1

Intelligent Non-Player Character with Deep Learning 2

Background We all know the results Intelligent Non-Player Character with Deep Learning 3

Agenda o Background o Motivation & Objective o Methodologies o Design & Implementation o Results & Discussion o Conclusion Intelligent Non-Player Character with Deep Learning 4

Agenda o Background o Development of AI in Go, Chess and Chinese Chess o Difference among Go, Chess and Chinese Chess o Motivation & Objective o Methodologies o Design & Implementation o Results & Discussion o Conclusion Intelligent Non-Player Character with Deep Learning 5

Development of AI in Go No Good Results Zen beat Takemiya Masaki at five stones handicap Mar 2012 AlphaGo beat Lee Sedol Mar 2016 Minimax Searching Pruning Monte Carlo Deep Learning Intelligent Non-Player Character with Deep Learning 6

Difference between Go and Chess/Chinese Chess Intelligent Non-Player Character with Deep Learning 7

Development of AI in Chess Deep Blue beat Garry Kasparov May 1997 Stockfish won TCEC 2013, 2014, 2015 Giraffe plays at the level of an FIDE International Master on a PC Sep 2015 Minimax Searching Evaluation Function Hand-Coded Knowledge Minimax Searching Evaluation Function Hand-Coded Knowledge Deep Reinforcement Learning TCEC: Top Chess Engine Championship FIDE: World Chess Federation Intelligent Non-Player Character with Deep Learning 8

Difference between Chess and Chinese Chess Intelligent Non-Player Character with Deep Learning 9

Development of AI in Chinese Chess Tiansuo Inspur System beat five Grandmaster players Aug 2006 Chess Nade beat three Master players Nov 2009 Now??? Minimax Searching Alpha-Beta Pruning Hand-Coded Knowledge Minimax Searching Alpha-Beta Pruning Hand-Coded Knowledge Deep Learning??? Intelligent Non-Player Character with Deep Learning 10

Motivation Intelligent Non-Player Character with Deep Learning 11

Objective Server Human Player User Interface Game AI Intelligent Non-Player Character with Deep Learning 12

Agenda o Background o Motivation & Objective o Methodologies o Supervised Learning o Convolutional Neural Network o Design & Implementation o Results & Discussion o Conclusion Intelligent Non-Player Character with Deep Learning 13

Supervised Learning o Supervised Learning o the right answer is given o Regression Problem & Classification Problem o Unsupervised Learning o no right answer is given o Clustering Problem Intelligent Non-Player Character with Deep Learning 14

Neural Network o Non-linear Hypotheses o Neurons and Brain o Backpropagation Intelligent Non-Player Character with Deep Learning 15

Convolutional Neural Network o Feed-forward o Organization of Animal Visual Cortex o Image Recognition Local Receptive Fields Shared Weights and Biases Intelligent Non-Player Character with Deep Learning 16

Agenda o Background o Motivation & Objective o Methodologies o Design & Implementation o Project Workflow o Results & Discussion o Conclusion Intelligent Non-Player Character with Deep Learning 17

Project Workflow Accuracy Testing Model Design Model Building Model Training Model Testing Real Performance Testing Intelligent Non-Player Character with Deep Learning 18

Design Overview Game AI Policy Network Evaluation Network Predict probabilities of next moves Evaluate winning rate Intelligent Non-Player Character with Deep Learning 19

Game AI Structure Piece Selector Message Receiver Format Converter Feature Extractor Decision Maker Message Sender Move Selector Intelligent Non-Player Character with Deep Learning 20

Feature Channels Feature Channel 1 Feature Channel 2 Feature Channel 3 Feature Channel 4 Feature Channel 5 Feature Channel 6 Feature Channel 7 Feature Channel 8 Feature Channel 9 (only for Move Selector) Pieces belonging to different sides Pieces of Advisor type Pieces of Bishop type Pieces of Cannon type Pieces of King type Pieces of Knight type Pieces of Pawn type Pieces of Rock type Valid moves for the selected piece Intelligent Non-Player Character with Deep Learning 21

Feature Channels Chessboard Status 1 st Feature Channel 4 th Feature Channel 9 th Feature Channel Intelligent Non-Player Character with Deep Learning 22

Piece Selector & Move Selector Intelligent Non-Player Character with Deep Learning 23

Piece Selector & Move Selector Extracted Features First Hidden Convolutional Layer Second Hidden Convolutional Layer Third Hidden Layer (Softmax Layer) Probability Distribution Rectified Linear Unit (ReLU) Intelligent Non-Player Character with Deep Learning 24

Selection Strategy o Strategy 1: o Select the piece with highest possibility given by Piece Selector o Select the destination of that piece with highest possibility given by Move Selector o Strategy 2: o Calculate the probability of moving a piece * the probability of a destination of that piece o Select the combination with highest probability Intelligent Non-Player Character with Deep Learning 25

Project Workflow Accuracy Testing Model Design Model Building Model Training Model Testing Real Performance Testing Intelligent Non-Player Character with Deep Learning 26

TensorFlow o an open source software library o for numerical computation o using data flow graphs o flexibility and portability Intelligent Non-Player Character with Deep Learning 27

Project Workflow Accuracy Testing Model Design Model Building Model Training Model Testing Real Performance Testing Intelligent Non-Player Character with Deep Learning 28

Training Dataset Collected Game Records Features and Targets Training Dataset for Different NN models Intelligent Non-Player Character with Deep Learning 29

FEN Format rnbakab1r/111111111/1c1111nc1/p1p1p1p1p/111111111/111111111/ P1P1P1P1P/1C11C1111/111111111/RNBAKABNR, r Intelligent Non-Player Character with Deep Learning 30

Format Conversion 炮二平五 马二进三 车一进一 车一平六 车六进七 车九进一 炮八进五 炮五进四 车九平六 前车进一 车六平四 车四进六 炮八平五 炮8平5 马8进7 车9平8 车8进6 马2进1 炮2进7 马7退8 士6进5 将5平6 士5退4 炮5平6 将6平5 Intelligent Non-Player Character with Deep Learning 31

Training Strategy o Piece Selector and Move Selector are trained separately o Shuffle the training dataset containing over 1,600,000 moves o Train the models batch by batch o Test the accuracy along the process o An untrained testing dataset containing over 80,000 moves Intelligent Non-Player Character with Deep Learning 32

Project Workflow Accuracy Testing Model Design Model Building Model Training Model Testing Real Performance Testing Intelligent Non-Player Character with Deep Learning 33

Results Piece Selector Accuracy accuracy = # of correct predictions / total # of test cases prediction: the choice with the highest probability Intelligent Non-Player Character with Deep Learning 34

Results Move Selector Accuracy Intelligent Non-Player Character with Deep Learning 35

Results Move Selector Accuracy Advisor 89.8% Bishop 91.2% Cannon 54.1% King 79.8% Knight 70.1% Pawn 90.4% Rock 53.6% Move Selector Accuracy Intelligent Non-Player Character with Deep Learning 36

Results Intelligent Non-Player Character with Deep Learning 37

Results Intelligent Non-Player Character with Deep Learning 38

Results Intelligent Non-Player Character with Deep Learning 39

Results Selection Strategy 1 Selection Strategy 2 Intelligent Non-Player Character with Deep Learning 40

Discussion o Possible Reasons: o CNN not deep enough o Training dataset not large enough o Records in training dataset may not be the optimal choices o For one chessboard status, there may be different move choices in training dataset o It s hard to judge which choice is better in current phase Intelligent Non-Player Character with Deep Learning 41

Conclusion o Achieved overall high accuracy o Performed badly in some cases o Need further improvement o Reinforcement Learning o Not limited by training dataset o Evaluation Network o To judge which move is better Intelligent Non-Player Character with Deep Learning 42

Q&A Intelligent Non-Player Character with Deep Learning 43