Coding Challenge 162: Self-Avoiding Walk

Описание к видео Coding Challenge 162: Self-Avoiding Walk

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. https://thecodingtrain.com/challenges...

p5.js Web Editor Sketches:
🕹️ Basic Self Avoiding Walk: https://editor.p5js.org/codingtrain/s...
🕹️ Self Avoiding Walk with Backtracking: https://editor.p5js.org/codingtrain/s...
🕹️ Self Avoiding Walk 3D: https://editor.p5js.org/codingtrain/s...
🕹️ Self Avoiding Walk with Bezier: https://editor.p5js.org/codingtrain/s...
🕹️ Self Avoiding Walk with Recursion: https://editor.p5js.org/codingtrain/s...
🕹️ Random Walk with Alpha: https://editor.p5js.org/codingtrain/s...

🎥 Previous video:    • Coding Challenge 161: Estimating π fr...  
🎥 All videos:    • Coding Challenges  

Links discussed in this video:
🔗 Self Avoiding Walk (Wikipedia): https://en.wikipedia.org/wiki/Self-av...
🔗 The complexity of counting self-avoiding walks in subgraphs of two-dimensional grids and hypercubes: https://www.sciencedirect.com/science...
🔗 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:    • Random Walker in p5.js (Coding Challe...  
🎥 Minesweeper - Coding Challenge 71:    • Coding Challenge #71: Minesweeper  
🎥 filter() - Array Functions:    • 16.8: Array Functions: filter() - Top...  
🎥 Maze Generator - Coding Challenge 10:    • Coding Challenge #10.1: Maze Generato...  
🎥 Recursion - Coding Train 77:    • Coding Challenge #77: Recursion  
🎥 A* Pathfinding Algorithm - Coding Challenge 51:    • A* Pathfinding Algorithm (Coding Chal...  
🎥 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: http://thecodingtrain.com/
👾 Share Your Creation! https://thecodingtrain.com/Guides/com...
🚩 Suggest Topics: https://github.com/CodingTrain/Rainbo...
💡 GitHub: https://github.com/CodingTrain
💬 Discord:   / discord  
💖 Membership: http://youtube.com/thecodingtrain/join
🛒 Store: https://standard.tv/codingtrain
📚 Books: https://www.amazon.com/shop/thecoding...
🖋️ Twitter:   / thecodingtrain  
📸 Instagram:   / the.coding.train  

🎥 Coding Challenges:    • Coding Challenges  
🎥 Intro to Programming:    • Start learning here!  

🔗 p5.js: https://p5js.org
🔗 p5.js Web Editor: https://editor.p5js.org/
🔗 Processing: https://processing.org

📄 Code of Conduct: https://github.com/CodingTrain/Code-o...

This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/websit...

Комментарии

Информация по комментариям в разработке