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
inoha_naito
August 01, 2021
Programming
730
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
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
240
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
430
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
450
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
190
Workers Cache を知る
syumai
0
310
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
2.5k
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
340
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
320
AWSに止められる覚悟してますか?
morizo_1984
2
490
Embedded Swiftで作る自作USBデバイス によるiOSデバイスの自動テスト / iOSDC Japan 2026 glassfiber
glassfiber
0
160
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
140
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
600
Featured
See All Featured
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
530
Prompt Engineering for Job Search
mfonobong
0
460
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
HDC tutorial
michielstock
2
930
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
930
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
710
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
How to make the Groovebox
asonas
2
2.5k
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 他にも、 迷路生成だと「穴掘り法」や「壁伸ばし法」 迷路探索だと「幅優先探索」や「深さ優先探索」 また、ダンジョン生成アルゴリズムなどもある。