SlideShare uma empresa Scribd logo
1 de 34
Baixar para ler offline
de:code 2019
C# ドキドキ・ライブコーディング対決 @ de:code
- ONLY C#!! Blazor Web 開発バトル -
小島の分
MW51
小島 富治雄
福井コンピュータ グループ
Microsoft MVP for Developer Technologies
自己紹介
過去の対戦での工夫
今回の
7並べの
戦略
9
自分の役割は何か?
~役割に合った戦略を~
役割を考える
今回の戦略は2つ
ざわ…
ざわ…
イ
カ
サ
マ
だ
!
戦略 その1 「対 チート」
public interface IPlayer
{
...
// 自分の手番で出すカードを返す
Card PutCard(IList<Card> myCards,
IList<Card> cardsOnTable, // テーブルのカード
IDictionary<IPlayer, int> playerPassCount); // 全員のパスの回数
}
今回の各自が実装するコード
誰かが工夫を
仕掛けてこない
理由がない
過去に「オセロ対決の最初の手番で盤面を全部自分の石にした」人がいる
// チートがあったら自分の手札とパスの回数を戻して、
if (RestoreAgainstCheat(myCards, playerPassCount))
// 不正を報告する
// (IFTTT を使って、Twitter に #decode19 付きで晒上げるか?)
ReportCheat();
「対 チート」 対策
戦略 その2 「ML (Machine Learning: 機械学習)」
先ずは学習用データの準備
局面を数値化
0
1
2
1
0 0 0 1 0 2 2 2 2 0 0 0 0
0 1 0 0 0 1 2 0 0 0 1 0 0
0 1 1 0 2 2 2 2 1 0 0 0 0
0 0 1 0 0 1 2 2 2 1 0 0 0
局面を数値化
GameRunner ツールの作成
GameRunner ツールの作成
一回目のデータ
機械学習の流れ (Machine Learning)!
GameRunner
Azure SQL
Database
クラウドに保存
Azure Machine
Learning
Studio
機械学習で解析!
沢山戦わせた局面
と勝敗のデータ
のべの計算時間
10時間
ML で作成した学習
モデルで AI を作成
繰り返して
モデルを洗練
Azure SQL Database
Azure SQL Database
Azure Machine Learning Studio
Azure Machine Learning Studio
Azure Machine Learning Studio
Azure Machine Learning Studio
機械学習の流れ (Machine Learning)!
GameRunner
Azure SQL
Database
クラウドに保存
Azure Machine
Learning
Studio
機械学習で解析!
沢山戦わせた局面
と勝敗のデータ
のべの計算時間
10時間
ML で作成した学習
モデルで AI を作成
何度も繰り返す
ことでより強く!
Machine Learning
あれ?
なんか違和感。
忘れてることない?
クロス ドメイン
クロス ドメイン対策
クロス ドメイン対策
ざわ…
ざわ…
Currently, we don‘t
support disabling
CORS on API side.
マジか。
クロス ドメイン対策
ざわ…
ざわ…
Web 上の API が呼べ
ないなら、ML.NET を
使えばよいじゃない
マジか。いや、それが
… …
ML.NET は?
public class PlayerKojima : IPlayer
{
public override string PalyerName { get => "小島"; }
public override string PalyerImageName { get => "kojima.jpg"; }
public Card PutCard(IList<Card> myCards, IList<Card> cardsOnTable,
IDictionary<IPlayer, int> playerPassCount)
{ … }
}
結局、手でロジックを組んで API で評価
ボロ…
ボロ…
ボロ…
Deep
Shallow
Learning!
圧倒的、浅さっ…!
最後に… Blazor の感想
ねぇ、L は?
L はどこからきたの?

Mais conteúdo relacionado

Mais de Fujio Kojima

Mais de Fujio Kojima (20)

C#の新機能勉強会 ~ C#7、8の新機能を活用して速く安全なプログラムを書こう~
C#の新機能勉強会 ~ C#7、8の新機能を活用して速く安全なプログラムを書こう~C#の新機能勉強会 ~ C#7、8の新機能を活用して速く安全なプログラムを書こう~
C#の新機能勉強会 ~ C#7、8の新機能を活用して速く安全なプログラムを書こう~
 
C# ドキドキ ライブ コーディング!! ~ 小島の分 ~ | BuriKaigi 2020
C# ドキドキ ライブ コーディング!! ~ 小島の分 ~ | BuriKaigi 2020C# ドキドキ ライブ コーディング!! ~ 小島の分 ~ | BuriKaigi 2020
C# ドキドキ ライブ コーディング!! ~ 小島の分 ~ | BuriKaigi 2020
 
牛タン会議 2019 @ 仙台 「C# ドキドキ ライブ!!」 小島の分
牛タン会議 2019 @ 仙台 「C# ドキドキ ライブ!!」 小島の分牛タン会議 2019 @ 仙台 「C# ドキドキ ライブ!!」 小島の分
牛タン会議 2019 @ 仙台 「C# ドキドキ ライブ!!」 小島の分
 
『機械学習 (AI/ML) の基礎と Microsoft の AI | 2019/04/02 Global AI Nights Fukui
『機械学習 (AI/ML) の基礎と Microsoft の AI | 2019/04/02 Global AI Nights Fukui『機械学習 (AI/ML) の基礎と Microsoft の AI | 2019/04/02 Global AI Nights Fukui
『機械学習 (AI/ML) の基礎と Microsoft の AI | 2019/04/02 Global AI Nights Fukui
 
機械学習 (AI/ML) 勉強会 #2 IoT編
機械学習 (AI/ML) 勉強会 #2 IoT編 機械学習 (AI/ML) 勉強会 #2 IoT編
機械学習 (AI/ML) 勉強会 #2 IoT編
 
機械学習 (AI/ML) 勉強会 #1 基本編
機械学習 (AI/ML) 勉強会 #1 基本編機械学習 (AI/ML) 勉強会 #1 基本編
機械学習 (AI/ML) 勉強会 #1 基本編
 
BuriKaigi2019 「C# ドキドキ・ライブコーディング」 小島の分
BuriKaigi2019 「C# ドキドキ・ライブコーディング」 小島の分BuriKaigi2019 「C# ドキドキ・ライブコーディング」 小島の分
BuriKaigi2019 「C# ドキドキ・ライブコーディング」 小島の分
 
機械学習入門
機械学習入門機械学習入門
機械学習入門
 
C# でニューラルネットワークをスクラッチで書いて機械学習の原理を理解しよう
C# でニューラルネットワークをスクラッチで書いて機械学習の原理を理解しようC# でニューラルネットワークをスクラッチで書いて機械学習の原理を理解しよう
C# でニューラルネットワークをスクラッチで書いて機械学習の原理を理解しよう
 
C# LINQ ~深く知って、使いまくろう~
C# LINQ ~深く知って、使いまくろう~C# LINQ ~深く知って、使いまくろう~
C# LINQ ~深く知って、使いまくろう~
 
「ふくいソフトウェアコンペティション 2014 大賞受賞者プレゼンテーション」
「ふくいソフトウェアコンペティション 2014 大賞受賞者プレゼンテーション」「ふくいソフトウェアコンペティション 2014 大賞受賞者プレゼンテーション」
「ふくいソフトウェアコンペティション 2014 大賞受賞者プレゼンテーション」
 
.NET MVP によるドキドキ・ライブコーディング! 小島の分
.NET MVP によるドキドキ・ライブコーディング! 小島の分.NET MVP によるドキドキ・ライブコーディング! 小島の分
.NET MVP によるドキドキ・ライブコーディング! 小島の分
 
Windows アプリケーション開発 はじめに ~ Windows アプリケーション開発初学者の方向け Visual Studio を使ったアプリケーショ...
Windows アプリケーション開発はじめに ~ Windows アプリケーション開発初学者の方向けVisual Studio を使ったアプリケーショ...Windows アプリケーション開発はじめに ~ Windows アプリケーション開発初学者の方向けVisual Studio を使ったアプリケーショ...
Windows アプリケーション開発 はじめに ~ Windows アプリケーション開発初学者の方向け Visual Studio を使ったアプリケーショ...
 
HTML5 on ASP.NET
HTML5 on ASP.NETHTML5 on ASP.NET
HTML5 on ASP.NET
 
最新C#動向と関数型言語haskell ~命令型静的プログラミングから関数型動的プログラミングへのシフト~
最新C#動向と関数型言語haskell ~命令型静的プログラミングから関数型動的プログラミングへのシフト~最新C#動向と関数型言語haskell ~命令型静的プログラミングから関数型動的プログラミングへのシフト~
最新C#動向と関数型言語haskell ~命令型静的プログラミングから関数型動的プログラミングへのシフト~
 
C# 式木 (Expression Tree) ~ LINQをより深く理解するために ~
C# 式木 (Expression Tree) ~ LINQをより深く理解するために ~C# 式木 (Expression Tree) ~ LINQをより深く理解するために ~
C# 式木 (Expression Tree) ~ LINQをより深く理解するために ~
 
C# 6.0 Preview
C# 6.0 PreviewC# 6.0 Preview
C# 6.0 Preview
 
Microsoft .NET 入門
Microsoft .NET 入門Microsoft .NET 入門
Microsoft .NET 入門
 
Visual Studio による開発環境・プログラミングの進化
Visual Studio による開発環境・プログラミングの進化Visual Studio による開発環境・プログラミングの進化
Visual Studio による開発環境・プログラミングの進化
 
F流 『オブジェクト指向の考え方の基礎の基礎』 ~ソフトウェア開発の原則編~
F流『オブジェクト指向の考え方の基礎の基礎』~ソフトウェア開発の原則編~F流『オブジェクト指向の考え方の基礎の基礎』~ソフトウェア開発の原則編~
F流 『オブジェクト指向の考え方の基礎の基礎』 ~ソフトウェア開発の原則編~
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 

de:code 2019 MW51 「C# ドキドキ・ライブコーディング対決」 小島の分