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
棋譜管理アプリとデータモデリング
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
arashigaoka
May 11, 2021
Programming
97
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
棋譜管理アプリとデータモデリング
将棋の棋譜を管理するアプリ
https://kifoo.app
arashigaoka
May 11, 2021
Other Decks in Programming
See All in Programming
今さら聞けない .NET CLI
htkym
0
190
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
260
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
380
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
1
510
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
580
AI Engineeringは、AIプロダクトだけのものか? 〜AIがソフトウェアを作る時代の新しい当たり前〜 / No AI in your product. AI Engineering in your development.
rkaga
4
430
AIが無かった頃の素敵な出会いの話
codmoninc
1
430
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
18k
Google Apps Script で Ruby を動かす
kawahara
0
230
プロポーザルを書いてもらう
pvcresin
0
510
AI時代に設計が 最大の生産性レバーになる 意図駆動開発とデータを消さない設計|Don't Delete Your Data or Your Intent — Design as the Deepest Lever in the AI Era
tomohisa
1
860
What's New in Android 2026
veronikapj
0
260
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
A designer walks into a library…
pauljervisheath
211
24k
Designing for humans not robots
tammielis
254
26k
The Spectacular Lies of Maps
axbom
PRO
1
910
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
650
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Ruling the World: When Life Gets Gamed
codingconduct
0
300
The Pragmatic Product Professional
lauravandoore
37
7.4k
YesSQL, Process and Tooling at Scale
rocio
174
15k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.8k
Transcript
将棋の棋譜管理アプリを作る yuta.okumura
棋譜って何? 囲碁・将棋・チェスなどのボードゲームにおいて、互いの対局者が⾏ った⼿を順番に記⼊した記録を指す。by wikipedia 次ページに具体例
#KIF version=2.0 encoding=Shift_JIS #---- Kifu for iPhone V4.10 ---- 開始⽇時:2020/08/23
21:30:22 終了⽇時:2020/08/23 21:35:51 ⼿合割:平⼿ 先⼿:⽵下 後⼿:奥村 ⼿数---- 指⼿--------- 消費時間-- 1 7六歩(77) ( 0:02/00:00:02) 2 8四歩(83) ( 0:00/00:00:00) 3 7⼋⾶(28) ( 0:00/00:00:02) 4 8五歩(84) ( 0:00/00:00:00) ...
モチベーション リアルの⼤会で指した棋譜を⼊⼒したい ネットで指した棋譜を⼊⼒したい -> 複数端末で同期( スマホで⼊⼒して、PC で⾒る) 過去の対局を検索したい -> 局⾯検索
作ったもの https://kifoo.app
None
局⾯検索とは? ⾃分が特定の囲いや戦法を⽤いた棋譜の⼀覧を取得したい
None
データモデリングどうするかが難問
案 1. 1 局⾯を 1 ⽂字列で表す
None
None
メリット データの持ち⽅がシンプル デメリット 正規表現で検索するため、スケールするか⼼配( 多い⼈だと、インタ ーネットで対局したものだけで数万棋譜 * 100 とかある)
案 2. 1 局⾯を 1 テーブルで表す
None
None
メリット クエリがシンプルに書ける デメリット 冗⻑(1 回の指し⼿に対して 1 つの駒しか動かないので、ほとんど 同じ情報を重複して持たなくてはならない) ⾒た⽬がださい
案 3. 1 指し⼿を 1 テーブルで表す
None
None
メリット 保持すべきデータ量が少ない デメリット クエリを書くのが難しい パフォーマンスの⾼いクエリを書くのが難しい
結果 僕は SQL をシンプルに保つことを重視したため、案 2 を採⽤しまし た。 ただデータの持ち⽅が冗⻑な懸念が残っているので、 他の案が良い、またはこんな⽅法があるみたいなアイデアがあればぜ ひ教えていただきたいです!
twitter: https://twitter.com/showkittie