Learning the probability of mate in shogi using SVM - PowerPoint PPT Presentation

1 / 38
About This Presentation
Title:

Learning the probability of mate in shogi using SVM

Description:

Almost all computer shogi players have their own check-mate-routine. ... Samuel's checkers, TD-GAMMON, Neuro-Go,... SVM succeeds in many classification problems. ... – PowerPoint PPT presentation

Number of Views:38
Avg rating:3.0/5.0
Slides: 39
Provided by: miwa
Category:

less

Transcript and Presenter's Notes

Title: Learning the probability of mate in shogi using SVM


1
Learning the probability of mate in shogi using
SVM
  • M2 Makoto Miwa
  • Chikayama Taura Lab

2
Outline
  • Introduction Motivation
  • Mate problem
  • Support Vector Machine
  • Classifier
  • Experiments Results
  • Classification
  • Control mate search
  • Conclusion Future Work

3
Outline
  • Introduction Motivation
  • Mate problem
  • Support Vector Machine
  • Classifier
  • Experiments Results
  • Classification
  • Control mate search
  • Conclusion Future Work

4
Introduction
  • Checking mates is a critical problem in shogi.
  • Many successful AND/OR tree search algorithms
  • PN, PDS, df-pn
  • Almost all computer shogi players have their own
    check-mate-routine.
  • In Gekisashi, the check-mate-routine uses about
    30 of the entire search time.

5
Motivation (1)
  • Success of machine learning in game playing
  • Samuels checkers, TD-GAMMON, Neuro-Go,
  • SVM succeeds in many classification problems.
  • Just a little computation is required in
    classification.

6
Motivation (2)
  • Can SVM learn mated or not classification from
    examples?
  • Using this classifier, we can
  • Control mate-search.
  • Control the ratio between mate-search and
    true-search.
  • etc.

7
Outline
  • Introduction Motivation
  • Mate problem
  • Support Vector Machine
  • Classifier
  • Experiments Results
  • Classification
  • Control mate search
  • Conclusion Future Work

8
What is mate?
  • Mate in the narrow sense
  • Opponent king will be captured in the next turn.
  • Mate in the wide sense
  • Opponent can be forced to take the mate position
    in the narrower sense.

9
Mate Search Algorithms
  • Purpose
  • Predict whether a position is mated or not (with
    continuation check).
  • If mated, find a way to mate.
  • Method
  • Many successful AND/OR tree search algorithms.
  • PN, PDS, df-pn

10
PDS A. Nagai et al., 1998
  • Proof-number and Disproof-number Search
  • Purpose
  • PDS tries to prove the node mated or not with the
    smallest node extention.
  • Method
  • PDS searches a certain node with smallest
    (dis)proof number at (AND)OR node.
  • Proof-number (pn)
  • The number of leaf nodes that must be true to
    prove the node is true.
  • Disproof-number (dn)
  • The number of leaf nodes that must be false to
    prove the node is false.

11
Mate search in shogi (1)
  • Mate search at almost all nodes in the tree.
  • To find mate without continuation check like
    brinkmate.
  • To find threatmate, a move that the attacker can
    mate the defenders king at his next move if the
    defender does nothing.

12
Mate search in shogi (2)
Search start
Decide the upper bound of the number of nodes in
mate search from the depth.
Mate Search
No or unknown
Mated?
Yes
Search child nodes
Search end
Game-tree
13
Outline
  • Introduction Motivation
  • Mate problem
  • Support Vector Machine
  • Classifier
  • Experiments Results
  • Classification
  • Control mate search
  • Conclusion Future Work

14
Support Vector Machine (1)
  • Proposed by Vapnik et al. in 1992
  • Two-class classifier
  • Important Features
  • Maximize margin
  • Support vectors
  • represent hyperplane with a small set of input
    data
  • Outputs
  • By fitting a sigmoid function, we can map the
    outputs into probabilities. (J. Plaat, 2000)
  • Kernel Trick

15
Support Vector Machine (2)
Constructs the hyperplane (h) that maximize the
margin.
Problem
Margin
h
dual problem
Support Vector
16
Support Vector Machine (3)
Classifier
  • w and b can be pre-computed.
  • Only one dot product per test data has to be
    computed.

Fast classification can be performed.
17
Outline
  • Introduction Motivation
  • Mate problem
  • Support Vector Machine
  • Classifier
  • Experiments Results
  • Classification
  • Control mate search
  • Conclusion Future Work

18
Classifier (1)
  • How to construct the classifier.
  • Based on the criterion of mate, label the train
    position mated or not mated.
  • Extract mate features from the train position.
  • Input these labels and mate features to the SVM
    and train the SVM.

19
Classifier (2)
  • Define mate as
  • PDS can find the position mated in the wide
    sense in searching 1,000,000 nodes.
  • 1,000,000 nodes
  • One mate can be found in 30 sec.

20
Classifier (3)
  • Mate Features (for each sides) - 135 features
  • Features about the king
  • Position, distance between two kings
  • Features for 14, 27 squares in front of the king,
    10, 21 squares behind the king, and 8 squares
    around the king .
  • Board edge, occupied or not, square control
  • Number of squares the king can escape
  • Number of defense pieces, attack pieces and
    pinned pieces
  • Pieces in hand
  • Which pieces and how many pieces in hand
  • Potential attack
  • Pieces can put or move the square which they can
    attack the king.

21
Classifier (4)
22
Outline
  • Introduction Motivation
  • Mate problem
  • Support Vector Machine
  • Classifier
  • Experiments Results
  • Classification
  • Control mate search
  • Conclusion Future Work

23
Experimental environment
  • SVM
  • LIBSVM
  • SVM Library developed by Chih-Chung Chang and
    Chih-Jen Lin
  • http//www.csie.ntu.edu.tw/cjlin/libsvm/

24
Outline
  • Introduction Motivation
  • Mate problem
  • Support Vector Machine
  • Classifier
  • Experiments Results
  • Classification
  • Control mate search
  • Conclusion Future Work

25
Experiments - Classification -
  • Purpose
  • Study the behavior of the classifier.
  • Datasets Usage
  • 40000 positions
  • 1 train set (30000 positions) and 1 test
    set(10000 positions).

26
Result - Classification - (1)
  • Accuracy 0.865
  • mate
  • Precision 0.744
  • Recall 0.605
  • not mate
  • Precision 0.940
  • Recall 0.892
  • Computation time
  • About half a day in train using 30000 positions.
  • 1.0msec per one classification.

27
Result - Classification - (2)
  • Accuracy 0.865
  • Almost same accuracy in searching 500 nodes
    (about 8th step from the leaf in Gekisashi) with
    PDS.
  • ?This classifier might be useful in the deep
    portion of a game tree.

8 step
28
Result - Classification - (3)
  • 1.0msec per one classification
  • In Gekisashi, PDS expends 5.8 msec in searching
    500 nodes.
  • ?Fast enough for practical use.

29
Outline
  • Introduction Motivation
  • Mate problem
  • Support Vector Machine
  • Classifier
  • Experiments Results
  • Classification
  • Control mate search
  • Conclusion Future Work

30
Experiments control mate search (1)
  • Control the amount of search nodes in mate search
    depending on the classifiers output.
  • The classifiers output mated
  • ?Increase the amount to ascertain the result of
    the classifier.
  • The classifiers output not mated
  • ?Decrease the amount to eliminate the search
    which brings the result of unknown.

31
Experiments control mate search (2)
Search start
Decide the upper bound of the number of nodes in
mate search from the depth.
Control the upper bound.
Mate Search
No or unknown
Mated?
Yes
Search child nodes
Game-tree
Search end
32
Experiments control mate search (2)
Search start
Sub
Decide the upper bound of the number of nodes in
mate search from the depth.
Input to the SVM.
Control the upper bound.
No
Yes
Mated?
Mate Search
No or unknown
Mated?
Decrease the upper bound.
Increase the upper bound.
Yes
Search child nodes
Search end
Return
33
Result control mate search - (1)
No search when being classified "not mated"
34
Result control mate search - (2)
The classifier is efficient as not mated
classifier.
1/3 time the number of search nodes when being
classified "not mated"
35
Result control mate search - (3)
  • VS Original (Winning Percentage)

36
Outline
  • Introduction Motivation
  • Mate problem
  • Support Vector Machine
  • Classifier
  • Experiments Results
  • Classification
  • Control mate search
  • Conclusion Future Work

37
Conclusion
  • Classification
  • The classifier shows so good accuracy.
  • With linear kernel, a classification is fast
    enough for practical use.
  • Control mate search
  • To decrease the search nodes which are classified
    not mated improves the runtime performance.

38
Future Work
  • Measure the performance and decide where to use
    this classifier.
  • Optimize SVM parameters and input features.

39
Result - Classification - (4)
High precision in searching a small number of
nodes as a not-mated-classifier.
Write a Comment
User Comments (0)
About PowerShow.com