Coding Challenge #79: Number Guessing Chatbot

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



Duration: 21:16
35,470 views
644


In this coding challenge I attempt to create a chatbot that plays a number guessing game. I use the RiveScript along the JavaScript library p5.js. Code: https://thecodingtrain.com/challenges/79-number-guessing-chatbot

πŸ•ΉοΈ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/_XqFRhtaK

πŸŽ₯ Previous video: https://youtu.be/UcdigVaIYAk?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ Next video: https://youtu.be/iFTgphKCP9U?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH

References:
πŸ”— RiveScript: https://www.rivescript.com/
πŸ”— jQuery: https://jquery.com/
πŸ”— AIML on Wikipedia: https://en.wikipedia.org/wiki/Artificial_Intelligence_Markup_Language
πŸ”— RiveScript on Github: https://github.com/aichaos/rivescript-js

Videos:
πŸŽ₯ Programming with Text: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6YrbSJBg32eTzUU50E2B8Ch
πŸŽ₯ Chatbots with RiveScript - Programming with Text: https://youtu.be/wf8w1BJb9Xc
πŸ”΄ Coding Train Live 103: https://youtu.be/Pscq691SADc?t=5290s

Related Coding Challenges:
πŸš‚ #37 Diastic Machine: https://youtu.be/u-HUtrpyi1c
πŸš‚ #39 Mad Libs Generator: https://youtu.be/ziBO-U2_t3k
πŸš‚ #80 Voice Chatbot with p5.Speech: https://youtu.be/iFTgphKCP9U

Timestamps:
0:00 Introduce the coding challenge
0:34 Set up p5.js ketch
0:54 Reference RiveScript resources
1:13 Explain file structure
1:34 Create a RiveScript file
2:00 Initialize a number
2:22 Add a trigger to display a message
2:55 Create chat interface with HTML elements
4:38 Target HTML elements
5:13 Consider text input
6:05 Reference RiveScript for JavaScript
7:48 Fix typo
8:05 Debug console error
8:38 Import jQuery
9:50 Follow RiveScript documentation
10:20 Create a reply
11:00 Refine the bot logic
11:08 Reply to a numerical input
12:40 Check RiveScript syntax for conditionals
13:53 Test the bot
14:50 Pick a random number
15:35 Send random number to the bot
16:32 Set answer number in the bot
17:07 Test program
17:40 Debug the bot logic
18:02 Fix RiveScript syntax to set a variable
18:49 Explain shortcomings
19:18 Mention RiveScript sequencing
20: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

#patternmatching #chatbot #artificialintelligence #textgenerator #javascript #p5js #rivescript







Tags:
JavaScript (Programming Language)
live
programming
daniel shiffman
creative coding
p5.js
p5.js tutorial
p5js
javascript (programming language)
tutorial
javascript
algorithms
programming from a to z
programming with text
pattern matching
chatbot js
chatbot javascript
chatbot rivescript
bot js
bot javascript
rivescript language
jquery rivescript
ai chatbot
artificial intelligence chatbot