Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Entropy Evaluation method for Bulls and Cows game
Search
Hongyi Shen
October 17, 2014
Programming
1
280
Entropy Evaluation method for Bulls and Cows game
AI midterm presentation
Hongyi Shen
October 17, 2014
Tweet
Share
More Decks by Hongyi Shen
See All by Hongyi Shen
How Rsync works
wilbeibi
1
260
Are Bookstores Dying?
wilbeibi
0
71
A Little SVM ( Simple Chinese)
wilbeibi
0
120
Other Decks in Programming
See All in Programming
エラーって何種類あるの?
kajitack
5
300
Benchmark
sysong
0
260
20250628_非エンジニアがバイブコーディングしてみた
ponponmikankan
0
350
Webの外へ飛び出せ NativePHPが切り拓くPHPの未来
takuyakatsusa
2
350
PHPでWebSocketサーバーを実装しよう2025
kubotak
0
110
型付きアクターモデルがもたらす分散シミュレーションの未来
piyo7
0
810
Code as Context 〜 1にコードで 2にリンタ 34がなくて 5にルール? 〜
yodakeisuke
0
100
Haskell でアルゴリズムを抽象化する / 関数型言語で競技プログラミング
naoya
17
4.9k
[初登壇@jAZUG]アプリ開発者が気になるGoogleCloud/Azure+wasm/wasi
asaringo
0
130
PHP 8.4の新機能「プロパティフック」から学ぶオブジェクト指向設計とリスコフの置換原則
kentaroutakeda
2
490
Gleamという選択肢
comamoca
6
760
GoのGenericsによるslice操作との付き合い方
syumai
3
680
Featured
See All Featured
Designing for Performance
lara
609
69k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
124
52k
Typedesign – Prime Four
hannesfritz
42
2.7k
Rebuilding a faster, lazier Slack
samanthasiow
81
9.1k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
Raft: Consensus for Rubyists
vanstee
140
7k
Scaling GitHub
holman
459
140k
The Straight Up "How To Draw Better" Workshop
denniskardys
233
140k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
Into the Great Unknown - MozCon
thekraken
39
1.9k
Transcript
Bulls and Cows solutions Hongyi Shen
[email protected]
‣ key property: symmetric ‣ how to make next guess
‣ entropy evaluation ! ‣ five guess algorithm
target: guess: 0123 0364 1A1B 0213 4075 9138 5421 0123
0364 … … 1A1B 0A2B 0A1B 0A1B 4A0B 1A1B ?A?B ‣ key property: symmetric
Guess the one that would eliminate the most possibilities. ‣
Entropy evaluation map each guess to a possible group, choose the group with maximum entropy ‣ Five-guess algorithm use minimax tech to score each guess, choose the one might eliminate the most possibilities ‣ How to make next guess
3 digits, 0~5 ‣ Entropy evaluation
Rounds Complexity Entropy 5.31 O(m^2). Five-guess < 5.31 O(n^2). Random
guess 5.63 O(1). ‣ Performance VJGQTGVKECNNKOKV
Reference:! ! The Computer As Master Mind by Donald E.
Knuth! ! Mastermind as test-bed for search algorithms by J.H. O'Geran etc.! ! Strategies for playing MOO, or “Bulls and Cows” by John Francis Thanks