Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
プログラムで迷路を作る
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
inoha_naito
August 01, 2021
Programming
740
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
プログラムで迷路を作る
inoha_naito
August 01, 2021
Other Decks in Programming
See All in Programming
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
4
890
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
120
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
190
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
240
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
残高管理から台帳サービスへの進化
artoy
1
210
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
160
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
180
GraphQL の onError と Nullability のこれから
quramy
0
180
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
150
AmebaブログはKMPから卒業します
kmars0605
0
220
AIに “答え“を書かせるのを やめてみた
___akari11
0
130
Featured
See All Featured
HDC tutorial
michielstock
2
970
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
950
How to Talk to Developers About Accessibility
jct
2
590
Typedesign – Prime Four
hannesfritz
42
3.2k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Become a Pro
speakerdeck
PRO
31
6.3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.3k
Optimizing for Happiness
mojombo
378
71k
A Tale of Four Properties
chriscoyier
163
24k
Writing Fast Ruby
sferik
630
63k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
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 他にも、 迷路生成だと「穴掘り法」や「壁伸ばし法」 迷路探索だと「幅優先探索」や「深さ優先探索」 また、ダンジョン生成アルゴリズムなどもある。