It's finally time to attempt a Self-Avoiding Walk! In this video, I quickly visualize a simple JavaScript p5.js implementation of a self-avoiding walk. I then tackle the more complex problem of backtracking to find a solution to a space-filling self-avoiding walk. thecodingtrain.com/challenges...
p5.js Web Editor Sketches:
🕹️ Basic Self Avoiding Walk: editor.p5js.org/codingtrain/s...
🕹️ Self Avoiding Walk with Backtracking: editor.p5js.org/codingtrain/s...
🕹️ Self Avoiding Walk 3D: editor.p5js.org/codingtrain/s...
🕹️ Self Avoiding Walk with Bezier: editor.p5js.org/codingtrain/s...
🕹️ Self Avoiding Walk with Recursion: editor.p5js.org/codingtrain/s...
🕹️ Random Walk with Alpha: editor.p5js.org/codingtrain/s...
🎥 Previous video: • Coding Challenge 161: ...
🎥 All videos: • Coding Challenges
Links discussed in this video:
🔗 Self Avoiding Walk (Wikipedia): en.wikipedia.org/wiki/Self-av...
🔗 The complexity of counting self-avoiding walks in subgraphs of two-dimensional grids and hypercubes: www.sciencedirect.com/science...
🔗 The pivot algorithm: A highly efficient Monte Carlo method for the self-avoiding walk (sci-hub): sci-hub.st/10.1007/bf01022990
Other videos mentioned in this video:
🎥 Random Walker - Coding Challenge 52: • Random Walker in p5.js...
🎥 Minesweeper - Coding Challenge 71: • Coding Challenge #71: ...
🎥 filter() - Array Functions: • 16.8: Array Functions:...
🎥 Maze Generator - Coding Challenge 10: • Coding Challenge #10.1...
🎥 Recursion - Coding Train 77: • Coding Challenge #77: ...
🎥 A* Pathfinding Algorithm - Coding Challenge 51: • A* Pathfinding Algorit...
🎥 3D Self Avoiding Walk - Coding Train Live (May 27, 2021): • Coding Train Live!
Timestamps:
0:00 Choo choo! Welcome!
1:05 Explain! How can we go about this?
2:29 Code! Let's add a visited grid.
6:25 Code! What are the options for movement now?
10:34 Code! Let's check the edges.
12:34 I could stop here but wait.
13:30 Explain! How can we think about backtracking?
15:15 Code! Let's make a spot class and a path variable.
24:23 Code! Now backtracking!
29:38 Whoops! Copying allOptions was a mistake.
31:19 Code! Maybe we need an end condition.
32:09 Yay! It worked.
32:22 This could take awhile. Could it be improved?
🚂 Website: thecodingtrain.com/
👾 Share Your Creation! thecodingtrain.com/Guides/com...
🚩 Suggest Topics: github.com/CodingTrain/Rainbo...
💡 GitHub: github.com/CodingTrain
💬 Discord: / discord
💖 Membership: kzitem.infojoin
🛒 Store: standard.tv/codingtrain
📚 Books: www.amazon.com/shop/thecoding...
🖋️ Twitter: / thecodingtrain
📸 Instagram: / the.coding.train
🎥 Coding Challenges: • Coding Challenges
🎥 Intro to Programming: • Start learning here!
🔗 p5.js: p5js.org
🔗 p5.js Web Editor: editor.p5js.org/
🔗 Processing: processing.org
📄 Code of Conduct: github.com/CodingTrain/Code-o...
This description was auto-generated. If you see a problem, please open an issue: github.com/CodingTrain/websit...
Негізгі бет Coding Challenge 162: Self-Avoiding Walk
Пікірлер: 212