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
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
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
220
コンパウンドプロダクト開発のためのローカルプロセスマネージャー再発明 #layerxgo
izumin5210
0
460
AWS Transform Customによる Spring Boot 2.xから4.xへのVerUp
satoshi256kbyte
2
110
Japan Community Day at Kubecon + CloudNativeCon Japan 2026: Learning Container Privilege Control by Building My Own Low-Level Container Runtime
ternbusty
1
170
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
1
2k
言葉の格闘技のススメ~紙とペンと言葉から始める、キャリアの描き方~
progresscicada
2
190
Press start. Python's next generation.
willingc
PRO
3
250
プロポーザルを書いてもらう
pvcresin
0
590
AI駆動開発にグラフDBを重ねてみた
satoshi256kbyte
1
370
承認済みなのに差戻しできてしまうバグ、型で潰せます
shinchit
0
120
楽しそうなつよつよエンジニアと目が死んでる僕/A brilliant engineer having a blast, and dead-eyed me.
3l4l5
2
260
Introducing Stack Pull Request in GitHub
kkamegawa
0
110
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Are puppies a ranking factor?
jonoalderson
2
3.8k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
290
Code Review Best Practice
trishagee
74
20k
Evolving SEO for Evolving Search Engines
ryanjones
0
270
From π to Pie charts
rasagy
0
330
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Leo the Paperboy
mayatellez
8
2.2k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
420
The Cult of Friendly URLs
andyhume
79
7k
Product Roadmaps are Hard
iamctodd
55
12k
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