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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
inoha_naito
August 01, 2021
Programming
0
640
プログラムで迷路を作る
inoha_naito
August 01, 2021
Tweet
Share
Other Decks in Programming
See All in Programming
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
280
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
190
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
2.5k
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
3.9k
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
Apache Iceberg V3 and migration to V3
tomtanaka
0
160
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.3k
CSC307 Lecture 01
javiergs
PRO
0
690
「ブロックテーマでは再現できない」は本当か?
inc2734
0
970
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.4k
2026年 エンジニアリング自己学習法
yumechi
0
130
Fragmented Architectures
denyspoltorak
0
150
Featured
See All Featured
Discover your Explorer Soul
emna__ayadi
2
1.1k
Technical Leadership for Architectural Decision Making
baasie
1
240
Tell your own story through comics
letsgokoyo
1
810
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
430
Navigating Team Friction
lara
192
16k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.2k
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
340
Test your architecture with Archunit
thirion
1
2.1k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
The Curious Case for Waylosing
cassininazir
0
230
A designer walks into a library…
pauljervisheath
210
24k
Transcript
プログラムで迷路を作る
自己紹介 HN: いのは Twitter: @inoha_naito Webサイト: miraiportal(技術系ブログ) https://miraiportal.com/ 最近は、 ジョジョの7部経由で
SOUL‘d OUTの『ウェカピポ』にハマり 1日4,5回くらい聴いています。
今回の内容 迷路生成アルゴリズムのひとつ 「棒倒し法」を JavaScriptのライブラリ 「p5.js」を用いて実装しています。 日本語少なめ、 画像マシマシです。
準備
1. 格子を描画する
2. 配列に対応するセルを塗る
本編
3. 配列に外壁をセットする
4. 配列に内壁をセットする
5. 配列に壁をランダムにセットする
シード値を設定する(おまけ)
まとめ 今回のプログラム https://editor.p5js.org/inoha_naito/sketches/QGkMf2Mhv 他にも、 迷路生成だと「穴掘り法」や「壁伸ばし法」 迷路探索だと「幅優先探索」や「深さ優先探索」 また、ダンジョン生成アルゴリズムなどもある。