{"id":17937787,"url":"https://github.com/sensuikan1973/othello-complete-analysis","last_synced_at":"2025-03-24T08:33:48.839Z","repository":{"id":42536299,"uuid":"303182209","full_name":"sensuikan1973/othello-complete-analysis","owner":"sensuikan1973","description":"[WIP] Othello complete analysis research","archived":true,"fork":false,"pushed_at":"2023-11-01T03:21:21.000Z","size":2685,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T06:51:59.278Z","etag":null,"topics":["othello"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sensuikan1973.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-10-11T18:05:24.000Z","updated_at":"2025-02-10T10:14:31.000Z","dependencies_parsed_at":"2022-09-10T07:52:35.068Z","dependency_job_id":"6c375f20-f49a-4291-aca1-02e323a3eb25","html_url":"https://github.com/sensuikan1973/othello-complete-analysis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensuikan1973%2Fothello-complete-analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensuikan1973%2Fothello-complete-analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensuikan1973%2Fothello-complete-analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensuikan1973%2Fothello-complete-analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sensuikan1973","download_url":"https://codeload.github.com/sensuikan1973/othello-complete-analysis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245235859,"owners_count":20582330,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["othello"],"created_at":"2024-10-28T23:07:46.323Z","updated_at":"2025-03-24T08:33:48.404Z","avatar_url":"https://github.com/sensuikan1973.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [WIP] オセロの完全解析、どうやるか? いくらかかるか?\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\"https://raw.githubusercontent.com/sensuikan1973/othello-complete-analysis/main/images/head_image.png\" width=\"300\"\u003e\n\u003c/p\u003e\n\n## 目次\n\u003c!--ts--\u003e\n\n\n\u003c!-- Added by: runner, at: Wed Nov  1 03:21:19 UTC 2023 --\u003e\n\n\u003c!--te--\u003e\n\n## 想定読者\nオセロに興味がある人、関連技術に詳しい人、富豪\n\n## 序論 「オセロ界におけるソフト事情の概要」\n### ここで言う「オセロ」の定義\n[「オセロ」の公式サイト](https://www.megahouse.co.jp/othello/what/)にある通り、`8 × 8` の大きさで、特定の初期配置から打ち進めるものを指すとします。  \nエイトスターズオセロやグランドオセロなどの派生競技は含めません。\n\n### 現在の解析状況\n前提としてざっくり書いておきます。\n\n* 黒と白が最善を尽くせば `引分` と考えられてるが、完全解析は済んでない。\n* 人間 vs ソフトの話は[昔話](https://www.skatgame.net/mburo/event.html)で、今はいかに上手く _活用_ するかが焦点。\n* 最近のプレイヤーが研究に使うソフトは、[edax](https://github.com/abulmo/edax-reversi) や [Zebra](http://radagast.se/othello/zebra.html) など。\n  * 個人/数人単位での学習が進んだことで、_一個人が対人戦に勝つための_ 情報は出揃いつつあると言っていい。\u003cbr/\u003e\n  _誤解を恐れずに言えば、手持ちの情報全て覚えればほぼ負けない世界になりつつある_。\u003cbr/\u003e\n  でも覚えきれないので、「人に勝つための定石をいかに研究しておくか」+「未知の局面に対応する力をいかに磨けるか」が重要な昨今。\u003cbr/\u003e\n\n### ソフトの活用 〜世界大会を例に〜\nオセロ大会に馴染みがない人向けに、具体例を挙げて簡単に説明しておきます。  \nこれは [World Othello Championship 2019 の決勝戦第 3 局](http://transcripts.worldothello.org/woc_history/2019/transcripts/round_14/html/TAKAHASHI%20Aki-TAKANASHI%20Yus_2.htm)の序盤(黒番)。  \n\u003cimg src=\"https://raw.githubusercontent.com/sensuikan1973/othello-complete-analysis/main/images/woc_2019_third_day_3th_game_opening.png\" width=\"200\"/\u003e  \nこの局面、`d7` が最善手とされていますが、黒は _あえて_ `c6` に着手しました。  \nそして、その後も _あえて_ 最善とされる手ではない所に着手し、自身の得意な進行に持ち込んで行きました。  \nこのように、`自分の得意な形の進行や相手の研究が手薄そうな進行`に持ち込むために、事前にソフトで研究しているのです。  \n大会だと相手は人間であり、ソフトと違ってどっかしらでミスをするので、最善進行のみにこだわる理由はほぼ無いのです。\n\nまた、_お互いに最後まで研究範囲のまま終局_ みたいな試合も起きえます。  \nこれは [World Othello Championship 2019 の決勝戦第 2 局](http://transcripts.worldothello.org/woc_history/2019/transcripts/round_14/html/TAKANASHI%20Yus-TAKAHASHI%20Aki.htm)の終局図。  \n\u003cimg src=\"https://raw.githubusercontent.com/sensuikan1973/othello-complete-analysis/main/images/woc_2019_third_day_2th_game_ending.png\" width=\"200\"/\u003e  \n引分です。これ、お互いに永遠に最善を打ち続けただけです。  \nこのように、特定の進行について研究通り 60 手打ち終える ということがたまに発生します。  \n現在のオセロ界におけるソフト活用話は、主旨とずれるので詳細は省略します。もう少し知りたい方には、[中森弘樹六段のスライド](https://www.slideshare.net/bakumomoki/ss-72668518)がオススメです。\n\n皆めちゃくちゃソフトを活用してます。\n\n### 用語定義\nこの記事で使う用語を定義しておく。\n\n|       用語       |                                                     意味                                                     |                                                                 補足                                                                 |\n| :--------------: | :----------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------: |\n|      大目標      |                                   `誰もが最高の情報を手軽に獲得できる世界`                                   |                                                                  -                                                                   |\n|      小目標      |                                                  `完全解析`                                                  |                                           今回の目標、完全解析を `小目標` と呼ぶことにする                                           |\n|      オセロ      |                                    [先述](#ここで言うオセロの定義) の通り                                    |                                                                  -                                                                   |\n|     オセラー     |                                      大会やネットでオセロをやっている人                                      |                                                                  -                                                                   |\n|     完全解析     |                           _全_ パターンの `結論(最善進行時の終局石差)` を出すこと                            |                                       _完全_ は、ありうる局面の全パターンを意味するということ                                        |\n|    最強の AI     |                             _あらゆる_ パターンに対して、最強手を導ける評価関数                              |                                                  `完全解析` 済みかどうかは関係ない                                                   |\n| 事実上の完全解析 |                                 `対人戦のために` 必要な情報が揃っていること                                  | 例えば、`-30` という大悪手の分岐は、人間からすると興味の対象外。\u003cbr\u003e目安としては、`0 ~ -8` の分岐が8割ほど網羅されているような状態。 |\n|      評価値      | 特定の箇所に着手することの評価値。\u003cbr/\u003e完全解析による `確かな` 値の場合もあれば、`不確かな` 値のこともある。 |                                                                  -                                                                   |\n|       book       |                                     学習を通して獲得した、評価値テーブル                                     |                                                                  -                                                                   |\n|   `完全` book    |                                         `完全解析` が実現された book                                         |                                                                  -                                                                   |\n|  `対人用` book   |                                  `事実上の完全解析` の実現を目的とした book                                  |                                                                  -                                                                   |\n|   `統合` book    |                              全ての情報を 1 つのファイルで持っている状態の book                              |                                                                  -                                                                   |\n|   `分割` book    |            特定の基準によって、分割された状態の book。\u003cbr/\u003e全てを統合すると `統合 book` になる。             |                                                                  -                                                                   |\n|  book の`展開`   |                          book を、アプリが高速にアクセス可能な領域に配置すること。                           |                                                              インメモリ                                                              |\n\n## 本論 「完全解析を考える」\n\n### `考えること` と `考えないこと`\n\n#### 考えること\n* 完全解析をする方法と費用\n* 完全解析の結果活用\n\n#### 考えないこと\n* [参考](#参考)にもいくつか挙げたような、`最強の AI` の話\n* 費用の工面法\n\n### _完全_ とは\n先述の通り、ありうる局面のパターンを意味するが、具体的に何パターンの話なのか?  \n状態空間, ツリー空間\n\n### 使うソフトウェアは?\n勝負は横に並べてのスケールをどこまで頑張れるか。  \n最終的には、担当する分岐量が最大であったノードの実行時間が全体の実行時間になる。  \nただし、それは Reduce 省略して逐次処理をほぼ無にできた場合の話に過ぎない。  \nスパコンも考える。\n\nあと、ゼロから新規のソフトを作る選択肢については考えないものとする。  \nやっても既存のを拡張する程度とする。\n\n[要素メモ書き]  \nメモリ  \nMap Reduce  \nbook 分散  \nReduce 省略  \n既存アセット  \nマルチプロセス  \nマルチスレッド  \nPlatform  \nAPI  \n\n### 方法/構成 X つ\n[要素メモ書き]  \nCPU, メモリ, aaa\n\n#### A: お手元のマシン\nただの叩き台\n\n#### B: スパコン\naaa\n\n#### C: Compute Engine Service\naaa\n\n#### D: Map Reduce Service\nReduce いらん \u0026 インスタンス間通信が不要なら筋悪な気がする。要調査。\n\n#### まとめ\n| 方法  | 概要  | 調達方法 | 所用時間 | 費用  |\n| :---: | :---: | :------: | :------: | :---: |\n|   A   |   -   |    -     |    -     |   -   |\n|   B   |   -   |    -     |    -     |   -   |\n|   C   |   -   |    -     |    -     |   -   |\n|   D   |   -   |    -     |    -     |   -   |\n\nXXX(仮に1500)万円をオセロにサクッと溶かせる大富豪の登場が待たれる。  \n冗談はさておき、将棋や囲碁と違ってプロが存在しないので、一企業が手を出す旨味があるかというと、厳しそう。(XXX 万で名を残せると考えれば...)\n\n試しに、研究熱心なオセラー皆で少しずつ出した場合一人あたりいくら必要かを考えてみる。  \n完全解析にお金を出すくらいに熱心なオセラーは、雑に考えると、全国大会に出場するような層がメインでしょう。  \n2020 年の名人戦の参加者が 200 人、そこに熱心なネットオセラーや海外プレイヤー等々も考慮し、雑に 500 人もお金を出してくれるとしましょう。  \n1500 万 / 500人 = 3万/人。  \n研究熱心なオセラー全員が 3 万ずつ出せばいけそう。みたいな。  \n\nこれは資源費だけの話で、そもそもの人手の話とかは無視してる。\n\n### 学習データの活用\nいよいよ大目標、`誰もが最高の情報を手軽に獲得できる世界` の話。\n\n#### 個人が携帯可能なものとして\n一個人が持ってるスマホ/PCのスペックは知れているので、統合 book を個人が携帯できる未来というのはそうそうやってこない。  \n携帯出来るのは、一部の分割 book に留まるでしょう。\n\nんー、あんま明るくない。\n\n#### オンラインサービスとして\n`評価値 API を提供する小さなサービス` が生まれるのが理想。明るい。  \n他の何かを作る開発者もそれを使って強力なエンジンを備えられる、そういう世界。\n\n当然、開発/運営してくれる人/お金が必要なので、全然簡単な話ではないが、個々人の端末レベル話から抜け出せるのはでかい。  \n\n[大まかな構成図](https://app.diagrams.net/#G1-f-UyKno-cqsMco1N8A5sSH_f-CAxukd)を書いてみると、こんな感じのものが考えられる。  \n\n![othello-eval-service-architecture](https://raw.githubusercontent.com/sensuikan1973/othello-complete-analysis/main/images/othello-eval-service-architecture.png)\n\n* ビジネスロジックが詰まった API サーバは常駐の必要がないので、オートスケールなり Cloud Functions(/Lambda) なりを活用可能。  \n* 勝負になるのは、book を _高速にアクセス可能な領域に展開したまま_ にしておきたい点。\u003cbr/\u003e\n  統合 book はサイズがでかすぎるので、丸ごと展開は現実的でない。\u003cbr/\u003e\n  分散 book にしたとしても、都度展開する場合、処理時間に対してそれが支配的になるのは明らかなので、都度展開は避けたい。\u003cbr/\u003e\n  そこで、常駐インスタンスを用意し、予め分散 book を展開しておくという工夫が考えられる。\u003cbr/\u003e\n  でも、それすると固定費が痛い。\n\n## 結論\naaa\n\n## 参考\n\n※ 一部の英語文献は、著者の許可を得て[日本語訳を公開してます](https://github.com/sensuikan1973/othello-complete-analysis/tree/main/translations)。\n\n### Othello\n#### Software\n* [edax](https://github.com/abulmo/edax-reversi)\n* [Zebra](http://radagast.se/othello/zebra.html)\n  * [作者 Gunnar Andersson による解説記事など](http://radagast.se/othello/)\n    * Booby Reversi などで有名な[奥原氏の翻訳もある](http://www.amy.hi-ho.ne.jp/okuhara/howtoj.htm)\n  * for Windows: [WZebra](http://radagast.se/othello/download.html)\n  * for Linux: [LZebra](http://radagast.se/othello/download3.html)\n  * for Android: [Reversatile (旧 DroidZebra)](https://play.google.com/store/apps/details?id=de.earthlingz.oerszebra)\n     * [Source Code](https://github.com/oers/reversatile)\n* [Logistello](https://www.skatgame.net/mburo/log.html)\n  * [paper list](https://skatgame.net/mburo/publications.html)\n* [Saio](https://www.romanobenedetto.it/Saio.htm)\n  * [SAIO: UN SISTEMA ESPERTO PER ILGIOCO DELL’OTHELLO](https://www.romanobenedetto.it/tesi.pdf)\n  * [ANALYZE: SAIO - World Othello Federation News](https://www.worldothello.org/news/131/analyze-saio)\n* [Nboard](http://www.orbanova.com/nboard/)\n  * [NTest Opening Book](http://www.orbanova.com/nbook/)\n* [Herakles](http://www.tournavitis.de/herakles/)\n  * [Mouse(m): A self-teaching algorithm that achieved master-strength at Othello](http://www.tournavitis.de/herakles/Paper.zip)\n* [FOREST](https://ocasile.pagesperso-orange.fr/forest.htm)\n  * [Developing an Artificial Intelligence for Othello/Reversi](https://ocasile.pagesperso-orange.fr/neurone.htm)\n  * See also: https://github.com/sensuikan1973/othello-complete-analysis/issues/1#issuecomment-716798458\n* OLIVAW\n  * [OLIVAW: reaching superhuman strength at Othello](https://www.slideshare.net/MeetupDataScienceRoma/olivaw-reaching-superhuman-strength-at-othello)\n* [Booby Reversi](http://www.amy.hi-ho.ne.jp/okuhara/index.htm)\n  * [リバーシのビットボードテクニック](http://www.amy.hi-ho.ne.jp/okuhara/bitboard.htm)\n* [Tothello](http://www.tothello.com/index.html)\n* [HAYABUSA](https://www.slideshare.net/uenokazu/20130906-hayabusa)\n* Others\n  * [Alpha Zero General](https://github.com/suragnair/alpha-zero-general)\n  * [reversi-alpha-zero](https://github.com/mokemokechicken/reversi-alpha-zero)\n  * [othello-zero](https://github.com/2Bear/othello-zero)\n\n#### Others (Paper, Blog, Slide, ...)\n* [Computer Othello | Wikipedia](https://en.wikipedia.org/wiki/Computer_Othello)\n* [Othello | Chess Programming Wiki](https://www.chessprogramming.org/Othello)\n* [Searching for Solutions in Games and Artificial Intelligence](http://fragrieu.free.fr/SearchingForSolutions.pdf)\n* [Optimizing Search Space of Othello Using Hybrid Approach](https://www.researchgate.net/publication/289505529_Optimizing_Search_Space_of_Othello_Using_Hybrid_Approach)\n* [Complexity of Othello game](https://ci.nii.ac.jp/naid/110003191565)\n* [Alpha-Beta vs Scout Algorithms for the Othello Game](http://ceur-ws.org/Vol-2486/icaiw_wdea_3.pdf)\n* [La base WTHOR](https://www.ffothello.org/informatique/la-base-wthor/)\n  * [オセロの棋譜データベースWTHORの読み込み方](https://qiita.com/tanaka-a/items/e21d32d2931a24cfdc97)\n* [Learning to Play Othello with Deep Neural Networks](https://arxiv.org/abs/1711.06583)\n* [縮小盤オセロにおける完全解析](https://www.ipsj-kyushu.jp/page/ronbun/hinokuni/1004/1A/1A-2.pdf)\n* [オセロの完全解析を解説する](https://blog.sakasin.net/solving-othello)\n* [Alpha \"Othello\" Zero 深層強化学習の理論と実装](https://www.slideshare.net/takehiko-ohkawa/alphaothello-zero-127398324)\n* [キロキティア](https://choi.lavox.net/start)\n* [もしオセロの初心者が Edax の評価関数を読んだら](https://qiita.com/tanaka-a/items/6d6725d5866ebe85fb0b)\n* [A World-Championship-Level Othello Program - 1981](https://apps.dtic.mil/dtic/tr/fulltext/u2/a106560.pdf)\n* [オセロ界はソフトといかに向き合ってきたか](https://www.slideshare.net/mobile/bakumomoki/ss-72668518)\n* [program rainting | World Othello Federation](https://www.worldothello.org/ratings/player?searchPlayerInput=+)\n* [XOT](http://berg.earthlingz.de/xot/aboutxot.php?lang=en)\n* [煮詰まった](http://f5-openning.blogspot.com/)\n\n### General\n* [Game complexity](https://en.wikipedia.org/wiki/Game_complexity) : ゲームの `複雑さ` がまとまった wiki。\n* [An estimation method for game complexity](https://arxiv.org/abs/1901.11161) : `Tree Size` (合法的なゲームの数)の複雑さの尺度を推定する方法を書いた論文\n* [A Deep Dive into Monte Carlo Tree Search](http://www.moderndescartes.com/essays/deep_dive_mcts/) : モンテカルロ木探索の詳細を解説する記事\n\n### Other Games\n#### Chess\n* [Bitboards on the Chess Programming Wiki](https://www.chessprogramming.org/Bitboards) : BitBoard のアルゴリズムの基礎を知るのにとても有用。チェスの wiki という位置付けですが、内容は一般的に重要なものが多い。\n* [LeelaChessZero](https://github.com/LeelaChessZero/lc0)\n* [Stockfish](https://github.com/official-stockfish)\n* [Stockfish完全解析](http://yaneuraou.yaneu.com/stockfish%e5%ae%8c%e5%85%a8%e8%a7%a3%e6%9e%90/)\n* [Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithm](https://arxiv.org/abs/1712.01815)\n* [チェスの棋譜約220万戦を分析してわかったことを可視化](https://gigazine.net/news/20160301-chess-game-visual-look/)\n\n#### Checker\n* [Checker is Solved](https://science.sciencemag.org/content/317/5844/1518/tab-pdf)\n\n#### Shogi\n* [Apery](https://github.com/HiraokaTakuya/apery)\n* [やねうら王](https://github.com/yaneurao/YaneuraOu)\n* [elmo](https://mk-takizawa.github.io/elmo/howtouse_elmo.html)\n* [コンピュータ将棋のHASHの概念について詳しく](http://yaneuraou.yaneu.com/2018/11/18/%e3%80%90%e6%b1%ba%e5%ae%9a%e7%89%88%e3%80%91%e3%82%b3%e3%83%b3%e3%83%94%e3%83%a5%e3%83%bc%e3%82%bf%e5%b0%86%e6%a3%8b%e3%81%aehash%e3%81%ae%e6%a6%82%e5%bf%b5%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6/)\n* [Bonanza](https://forest.watch.impress.co.jp/library/software/bonanza/)\n* [KENTO](https://note.com/shogi_kento/n/ncc05cc261b7e)\n* [Ponanza開発者、山本一成氏が語る強化学習とA/Bテスト運用の舞台裏](https://logmi.jp/tech/articles/321123)\n\n#### Go\n* [Leela Zero](https://github.com/leela-zero/leela-zero)\n* [Mastering the game of Go without human knowledge](https://www.nature.com/articles/nature24270)\n* [四路盤囲碁の完全解析](http://id.nii.ac.jp/1001/00058633/)\n\n### Infrastructure\n\n#### Services\n* [GCP](https://cloud.google.com/)\n  * [GCE](https://cloud.google.com/compute)\n  * [Dataproc](https://cloud.google.com/dataproc)\n  * [Dataflow](https://cloud.google.com/dataflow)\n  * [Google Cloud for AWS Professionals: Big Data](https://cloud.google.com/docs/compare/aws/big-data#transformation)\n* [AWS](https://aws.amazon.com/)\n  * [EC2](https://aws.amazon.com/jp/ec2/)\n  * [Amazon EMR](https://aws.amazon.com/jp/emr/)\n* [さくら](https://cloud.sakura.ad.jp/)\n  * [さくらのクラウドでHadoop/Spark/Asakusa環境を構築する](https://knowledge.sakura.ad.jp/3633/)\n* [Azure](https://azure.microsoft.com/)\n  * [Virtual Machine](https://azure.microsoft.com/ja-jp/services/virtual-machines/)\n  * [What is Apache Hadoop in Azure HDInsight?](https://docs.microsoft.com/ja-jp/azure/hdinsight/hadoop/apache-hadoop-introduction)\n\n#### Others\n* [並列コンピュータ 非定量的アプローチ](https://www.ohmsha.co.jp/book/9784274225710/)\n* [並行コンピューティング技法 --実践マルチコア/マルチスレッドプログラミング](https://www.oreilly.co.jp/books/9784873114354/)\n* [分散システムデザインパターン --コンテナを使ったスケーラブルなサービスの設計](https://www.oreilly.co.jp/books/9784873118758/)\n* [Microsoft: Cloud Design Patterns](https://docs.microsoft.com/ja-jp/azure/architecture/patterns/)\n\n---\n[![source](https://img.shields.io/badge/source-black.svg?logo=github)](https://github.com/sensuikan1973/othello-complete-analysis)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsensuikan1973%2Fothello-complete-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsensuikan1973%2Fothello-complete-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsensuikan1973%2Fothello-complete-analysis/lists"}