Coding Challenge #42: Markov Chains - Part 2

Subscribers:
1,750,000
Published on ● Video Link: https://www.youtube.com/watch?v=9r8CmofnbAQ



Duration: 8:08
25,222 views
406


In this multi-part coding challenge I attempt to use a Markov Chain to generate a new name for my YouTube channel. Code: https://thecodingtrain.com/challenges/42-markov-chain-name-generator

p5.js Web Editor Sketches:
๐Ÿ•น๏ธ Markov Chain Text: https://editor.p5js.org/codingtrain/sketches/Y6SvoMcyH
๐Ÿ•น๏ธ Markov Chain Name Generator: https://editor.p5js.org/codingtrain/sketches/AAgqWiJAW

Other Parts of this Challenge:
๐Ÿ“บ Markov Chain Text: https://youtu.be/eGFJ8vugIWA

๐ŸŽฅ Previous video: https://youtu.be/aKiyCeIuwn4?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
๐ŸŽฅ Next video: https://youtu.be/8Z9FRiW2Jlc?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
๐ŸŽฅ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH

References:
๐Ÿ”— Google Ngram Viewer: https://books.google.com/ngrams
๐Ÿ”— n-gram on Wikipedia: https://en.wikipedia.org/wiki/N-gram
๐Ÿ”— Web Trigrams: http://www.chrisharrison.net/index.php/Visualizations/WebTrigrams
๐Ÿ”— Generative Course Descriptions: http://static.decontextualize.com/toys/next_semester?
๐Ÿ”— King James Programming: http://kingjamesprogramming.tumblr.com/
๐Ÿ”— Markov Chains Explained: http://setosa.io/ev/markov-chains/
๐Ÿ”— Perlin Noise song: https://soundcloud.com/fl00per/perlin-noise
๐Ÿ’ป Programming from A to Z - Markov Chains: http://shiffman.net/a2z/markov

Live Stream Archive:
๐Ÿ”ด Coding Train Live 64: https://youtu.be/4DR0ryGSYJQ?t=4637s

Related Coding Challenges:
๐Ÿš‚ #37 Diastic Machine: https://youtu.be/u-HUtrpyi1c
๐Ÿš‚ #39 Mad Libs Generator: https://youtu.be/ziBO-U2_t3k

Timestamps:
0:00 Introduce the coding challenge
0:10 Mention the coding challenge 'Markov Chain Text'
0:18 Describe the scope of the coding challenge
0:43 Introduce dataset with name suggestions
1:10 Load dataset
2:12 Loop through the strings of text
2:35 Create n-grams for the input text
3:08 Debug loop logic
3:58 Credit Python code inspiring the algorithm
4:27 Create an array for the beginning of the string
5:24 Explain the importance of repeated values
5:32 Pick a random beginning
6:00 Experiment with different arguments
6:57 Explore creative possibilities
7:20 Conclude the coding challenge

Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound

๐Ÿš‚ Website: http://thecodingtrain.com/
๐Ÿ‘พ Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
๐Ÿšฉ Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
๐Ÿ’ก GitHub: https://github.com/CodingTrain
๐Ÿ’ฌ Discord: https://thecodingtrain.com/discord
๐Ÿ’– Membership: http://youtube.com/thecodingtrain/join
๐Ÿ›’ Store: https://standard.tv/codingtrain
๐Ÿ–‹๏ธ Twitter: https://twitter.com/thecodingtrain
๐Ÿ“ธ Instagram: https://www.instagram.com/the.coding.train/

๐ŸŽฅ Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
๐ŸŽฅ Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA

๐Ÿ”— 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-of-Conduct

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

#markovchain #ngram #textgenerator #javascript #p5js







Tags:
live
programming
daniel shiffman
creative coding
p5.js
coding challenge
p5.js tutorial
p5js
javascript (programming language)
tutorial
javascript
algorithms
javascript string object
js string object
programming from a to z
programming challenge
regular expressions
text analysis
markov chains
ngrams
ngram
n-gram
n-grams
markov chain
markov text generator
markov chain algorithm