Enviar pesquisa
Carregar
LightsOutSolver
•
Transferir como PPTX, PDF
•
0 gostou
•
490 visualizações
まえすとろ
Seguir
日本Androidの会さいたま支部2月定例発表資料
Leia menos
Leia mais
Tecnologia
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 20
Baixar agora
Recomendados
Lights outを線形代数で解く
Lights outを線形代数で解く
まえすとろ
Unity勉強会 エフェクト
Unity勉強会 エフェクト
Junpei Nomura
VRM 標準シェーダ MToon の使い方
VRM 標準シェーダ MToon の使い方
VirtualCast, Inc.
「●曜から夜更かし・・・」にならないコツ
「●曜から夜更かし・・・」にならないコツ
Keiichiro Sedo
{触れる/食べられる} ゼータ関数 #ABpro 2015
{触れる/食べられる} ゼータ関数 #ABpro 2015
Junpei Tsuji
マイクロにしすぎた結果がこれだよ!
マイクロにしすぎた結果がこれだよ!
mosa siru
機械学習初学者が短期間でTensor flowで作ったmnistモデルをandroidアプリに組み込んだ話
機械学習初学者が短期間でTensor flowで作ったmnistモデルをandroidアプリに組み込んだ話
まえすとろ
ベイズ統計セミナーVol4
ベイズ統計セミナーVol4
まえすとろ
Recomendados
Lights outを線形代数で解く
Lights outを線形代数で解く
まえすとろ
Unity勉強会 エフェクト
Unity勉強会 エフェクト
Junpei Nomura
VRM 標準シェーダ MToon の使い方
VRM 標準シェーダ MToon の使い方
VirtualCast, Inc.
「●曜から夜更かし・・・」にならないコツ
「●曜から夜更かし・・・」にならないコツ
Keiichiro Sedo
{触れる/食べられる} ゼータ関数 #ABpro 2015
{触れる/食べられる} ゼータ関数 #ABpro 2015
Junpei Tsuji
マイクロにしすぎた結果がこれだよ!
マイクロにしすぎた結果がこれだよ!
mosa siru
機械学習初学者が短期間でTensor flowで作ったmnistモデルをandroidアプリに組み込んだ話
機械学習初学者が短期間でTensor flowで作ったmnistモデルをandroidアプリに組み込んだ話
まえすとろ
ベイズ統計セミナーVol4
ベイズ統計セミナーVol4
まえすとろ
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Mais conteúdo relacionado
Destaque
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Destaque
(20)
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
LightsOutSolver
1.
Lights Out Solverのメカニズム 2016/02/13
まえすとろ
2.
自己紹介 ・name : まえすとろ
(@maestro_L_jp) ・Github : https://github.com/LyricalMaestro ・Qiita : http://qiita.com/LyricalMaestro0 ・ブログ:http://lyricalmaestrojp.hatenablog.com/
3.
はじめに… ライツアウトというゲームを簡単に解くためのソルバー「LightsOutSolver」に使 ったロジックについて説明します。(そのロジックは数学を使っています) スマホゲームの中にも数学が潜んでいることを知っていただければ。
4.
LightsOutとは? ライツアウトとは、n x n
にならんだライトをタップしていき、すべてのライトを消灯にしていくゲームです。 このゲームでは、ライトの代わりに「赤色・灰色のタイル」 を使っており、n x nにタイルを並べています。このタイルの色がライトの状態 を表します。 ・赤色 -> ライト点火 ・灰色 -> ライト消灯 本アプリでは、パネルをタップすると、タップしたパネルと隣接する上下左右のパネルの色が変わります。赤色なら灰色に、灰色なら赤色 に変わります。 パネルをタップしていき、すべてのパネルが灰色になればステージクリアです。 クリアした際にタップしたパネル数が少なければ少ないほど良いです。 https://ja.wikipedia.org/wiki/%E3%83%A9%E3%82%A4%E 3%83%84%E3%82%A2%E3%82%A6%E3%83%88 よちよちライツアウトリリースしてます。 https://play.google.com/store/apps/details?id=com.lyricalorigi nal.beginnerslightsout2&hl=ja
5.
今回作ったもの 与えられたステージに対して、最小タップ数で解くために必要なタップ数とタッ プすべきパネルを教えてくれるSolver. - アプリで公開しています https://play.google.com/store/apps/details?id=com.lyricaloriginal.lightsouts olver&hl=ja - ライブラリとしてGithubにも公開 https://github.com/LyricalMaestro/LightsOutSolver
6.
デモ
7.
中はどんなロジックで実装しているのか? ステージから導き出される連立方程式を解いている。 例えば、左図のようなステージであれば、右下のような方程式を解けばよい。
8.
連立方程式の導き出し方(1) 各パネルの色の状態を表現するためにベクトルを用いる。 ・ ・ ・ ・ ・ ・ ・・・ ・・・ (1,1) (2,1) (2,2) (2,n) (1,n)(1,2) (n,1)
(n,2) (n,n) 1 (赤色) or 0 (灰色)が入る
9.
連立方程式の導き出し方(2) パネルをタップする。 →パネルの点灯状態の状態遷移(ここを数式化する) (A) (B) (A) (B) このパネルをタップ
10.
連立方程式の導き出し方(3) 今後扱う数字として「2を法にした数字」を導入。(数学用語で標数2の体)
11.
連立方程式の導き出し方(4) この数字を使えばタップの操作は足し算を使って表現できる。 (A) (B) (A)
(B) このパネルをタップ このベクトルを 「タップ操作ベクトル」 という。
12.
連立方程式の導き出し方(5) ・パネルタップの作用は順序を入れ替えても同じ。 ・2回作用させると何もしなかったのと同じ。 → ライツアウトをとくにはタップすべきパネルを順序によらず1回タッ プ すればOK.
13.
連立方程式の導き出し方(6) 以下の方程式を満たすような解x_(i,j)を解けば良い。 すべての成分が0のベクト ル. パネル(i,j)タップ操作に対 応する「タップ操作ベク トル」 パネル(i,j)の点灯状態。
14.
連立方程式の導き出し方(7) 行列を導入して作用から連立方程式を導く。(全ページの方程式は行列を使って以 下のように変形できる) 「タップ操作ベクトル」 をうまく行列化したもの パネル(i,j)の点灯状態。
15.
連立方程式の導き出し方(8) 3x3の以下のステージの場合だと右の方程式を解けばOK
16.
連立方程式の導き出し方(9) 先ほどの方程式の解は左下のようなベクトルになる。 - 右下のかっこのパネルをタップすればクリアできる。
17.
Solverに使った連立方程式の性質(1) ・3x3,6x6はどんな問題でも解ける。 ・4x4, 5x5はとけない問題が存在する。 -> 連立方程式を構成する行列が可逆かどうかによる。
18.
・3x3,6x6はどんな問題でも解ける。 ・4x4, 5x5はとけない問題が存在する。 -> 連立方程式を構成する行列が可逆かどうかによる。 ->
とける問題については解き方が何パターンも存在する。 -> …解けなくない? Solverに使った連立方程式の性質(2)
19.
・ライツアウトのサイズに依存した行列Aの中でAx = 0となるベクトルxの数だけ ライツアウトの解は存在する。 -
どれか一つライツアウトの解が得られれば上記条件を満たすベクトルを足し たもの全てがライツアウトの解となる。 - これらの解からタップ数(i.e. 1の数)がもっとも少ないベクトルを抽出する。 解けないライツアウトのパターンとライツアウ トの解のパターン
20.
参考文献 ・続・アルゴリズムを学ぼう リンクはこちら
Baixar agora