@TheCodingTrain
  @TheCodingTrain
The Coding Train | Coding Challenge 162: Self-Avoiding Walk @TheCodingTrain | Uploaded 3 years ago | Updated 2 hours ago
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/162-self-avoiding-walk

p5.js Web Editor Sketches:
πŸ•ΉοΈ Basic Self Avoiding Walk: editor.p5js.org/codingtrain/sketches/2_4gyDD_9
πŸ•ΉοΈ Self Avoiding Walk with Backtracking: editor.p5js.org/codingtrain/sketches/dRWS3A9nq
πŸ•ΉοΈ Self Avoiding Walk 3D: editor.p5js.org/codingtrain/sketches/D0ONOlCDT
πŸ•ΉοΈ Self Avoiding Walk with Bezier: editor.p5js.org/codingtrain/sketches/KFbX0NWgh
πŸ•ΉοΈ Self Avoiding Walk with Recursion: editor.p5js.org/codingtrain/sketches/UPxBk1YiB
πŸ•ΉοΈ Random Walk with Alpha: editor.p5js.org/codingtrain/sketches/IEw2RkDnJ

πŸŽ₯ Previous video: youtu.be/EvS_a921dBo?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ All videos: youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH

Links discussed in this video:
πŸ”— Self Avoiding Walk (Wikipedia): en.wikipedia.org/wiki/Self-avoiding_walk
πŸ”— The complexity of counting self-avoiding walks in subgraphs of two-dimensional grids and hypercubes: sciencedirect.com/science/article/pii/S030439750300080X
πŸ”— The pivot algorithm: A highly efficient Monte Carlo method for the self-avoiding walk (sci-hub): https://sci-hub.st/10.1007/bf01022990

Other videos mentioned in this video:
πŸŽ₯ Random Walker - Coding Challenge 52: youtu.be/l__fEY1xanY
πŸŽ₯ Minesweeper - Coding Challenge 71: youtu.be/LFU5ZlrR21E
πŸŽ₯ filter() - Array Functions: youtu.be/qmnH5MT_luk
πŸŽ₯ Maze Generator - Coding Challenge 10: youtu.be/HyK_Q5rrcr4
πŸŽ₯ Recursion - Coding Train 77: youtu.be/jPsZwrV9ld0
πŸŽ₯ A* Pathfinding Algorithm - Coding Challenge 51: youtu.be/aKYlikFAV4k
πŸŽ₯ 3D Self Avoiding Walk - Coding Train Live (May 27, 2021): youtu.be/jlK1SJr-FBc?t=4353

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: http://thecodingtrain.com
πŸ‘Ύ Share Your Creation! thecodingtrain.com/Guides/community-contribution-guide.html
🚩 Suggest Topics: github.com/CodingTrain/Rainbow-Topics
πŸ’‘ GitHub: github.com/CodingTrain
πŸ’¬ Discord: discord.gg/hPuGy2g
πŸ’– Membership: http://youtube.com/thecodingtrain/join
πŸ›’ Store: standard.tv/codingtrain
πŸ“š Books: amazon.com/shop/thecodingtrain
πŸ–‹οΈ Twitter: twitter.com/thecodingtrain
πŸ“Έ Instagram: instagram.com/the.coding.train

πŸŽ₯ Coding Challenges: youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ Intro to Programming: youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA

πŸ”— p5.js: p5js.org
πŸ”— p5.js Web Editor: editor.p5js.org
πŸ”— Processing: processing.org

πŸ“„ Code of Conduct: github.com/CodingTrain/Code-of-Conduct

This description was auto-generated. If you see a problem, please open an issue: github.com/CodingTrain/website/issues/new
Coding Challenge 162: Self-Avoiding WalkAll aboard! Revisiting Monty Hall, WFH and trying some Apple Basic!All aboard! Apple Basic, Macrodata Refinement, Passenger Showcase, Upcoming Challenges3.3: Angles and Vectors - Nature of Code3.7: Additive Waves - The Nature of Code5.2 Seeking a Target - The Nature of CodeCoding Challenge 183: Paper Marbling Algorithm4.4: Particle Systems with Image Textures - The Nature of CodeCoding Trade Live:  Side Project Saturday! (Live from the Attic)ml5.js: Image ClassificationSide Project Saturday!Coding Challenge 171: Wave Function Collapse

Coding Challenge 162: Self-Avoiding Walk @TheCodingTrain

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER