SlideShare a Scribd company logo
1 of 23
Download to read offline
カーリングの局面評価関数を学習
WITH “TENSOR FLOW”
KATSUKI OHTO
2016/2/10
自己紹介
大渡 勝己 (Katsuki Ohto)
今は学生です
分野…ゲームAI
LT内容
TensorFlow使ったことないけど
軽い気持ちでLT立候補したら
いつの間にか人数増えてて
会場Googleで
穴があったら入りたい
カーリング
氷上で石を投げ合って得点を競うゲーム
オリンピックの時には全国的に騒がれる
複雑な要素を排除すると、
ゲーム的には
二人零和完全情報不確定ゲーム
カーリングのルール
円の中心に近い方が得点をもらえる
← 黄色が3点
カーリングAI
電気通信大学の研究室が
設計した戦略シミュレータ
「デジタルカーリング」
http://minerva.cs.uec.ac.jp/c
urling/wiki.cgi
を利用
評価関数
局面の良し悪しを点数化
例)私の評価関数
connpassを見たらいつの間にか人数相当増えていた
→ −300
実際話している今 → +500
(緊張で気分が高揚)
カーリング評価関数
カーリングの各エンド
(テニスにおけるセットのようなもの)の得点
−8 ~ +8 点
これを繰り返す
→局面の情報から、−8 ~ +8のうち
どの得点になるかを予測できれば良い!
カーリング+TENSORFLOW
INPUT 局面情報(石の配置)
OUTPUT 予測される得点(の確率分布)
石の配置は画像として扱えるので、
TensorFlowのチュートリアルコード(MNIST)を
(ほぼ)そのまま使ってみよう!
局面の画像化
先後の石の情報を強引に1枚の白黒にする
𝑝 画素 𝑠# 盤上にある石α,	
   𝛽係数
𝑑(𝑝, 𝑠#) = 𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒(𝑝, 𝑠#)
𝑐𝑜𝑙𝑜𝑟5 = ∑ α𝑒789 5,:;
<
:;(先)
− ∑ α𝑒789(5,:;)<
:;(後)
石の影響をガウシアン(正規分布)で加算
線形関数による予測
線形関数による近似
𝑦 = 𝑊𝑥 + 𝑏
y = tf.nn.softmax(tf.matmul(x_placeholder, W) + b)
得点予測率 41%(ランダムだと6%程度)
出力クラス数
W = tf.Variable(tf.zeros([784, 17])) # 行列
b = tf.Variable(tf.zeros([17])) # ベクトル
MNISTでは出力クラス数10だったところを
変えるだけでOK
突っ込み
そもそも棋譜のうち、
「後手1点」の割合が41%
<得点の分布(x100)>
←後手 [ 0 0 2 8 32 97 239 415 15 139 32 9 3 1 0 0 0 ]先手→
𝑦 = 𝑊𝑥 + 𝑏
バイアス項が発散しているだけ…
CNNによる予測
画像認識に強いCNN
(Convolutional Neural Network)ならば
もっともまともな特徴抽出ができるのでは
CNNによる予測
画像認識に強いCNN
(Convolutional Neural Network)ならば
もっともまともな特徴抽出ができるのでは
… (チュートリアルをコピペ中)
得点予測率 53%!!
突っ込み(その2)
実はトレーニングデータとテストデータに
同じエンドの別局面が入っている
石が
1個増えた
突っ込み(その2)
・連続値が完全一致することはほとんどないので、
完全一致した場合は得点も同じ
→石の位置を丸暗記しているだけかも
評価関数の出来
隠れた石を叩こうとしたらガードに引っかかった→相手有利に
[0, 0, 0, 2, 2, 4, 13, 58,
1, 13, 1, 2, 0, 0, 0, 0, 0]
[0, 0, 0, 0, 2, 9, 34, 35,
7, 7, 1, 1, 0, 0, 0, 0, 0]
突っ込み(その3)
そもそもCNNは平行移動に強いのが持ち味
カーリングの石の配置は平行移動可能なのか…
部分的には可能かもしれない
扱う対象をよく考えた方が良い
感想
・TensorFlowチュートリアルの内容だけでも
すぐに応用できるので、入門としては豪華
・モデル保存が簡単にできる。
特に複数の予測器をつなげても楽々
(先手と後手で分けたり)
・いろいろ罠にはまらないよう注意…
モデル保存
運命の出会いは突然にやってくる
saver = tf.train.Saver() # 保存(読込)準備
saver.save(sess, “model.ckpt”) #保存
saver.restore(sess, “model.ckpt”)) #読込
感想
・カーリングはとりあえず機械学習を試すに
はちょうどいい!
・機械学習の標準問題として
カーリングを!
今後のゲームAI大会
2016/3/9 Game AI Tournament@電通大
人狼
カーリング
…etc
2016/3/19 – 20 コンピュータ囲碁大会
2016/5/3 – 5 コンピュータ将棋選手権
他 ぷよぷよAI など

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

カーリングの局面評価関数を学習 WITH “TENSOR FLOW”

Editor's Notes

  1. 半分