Coding Challenge #79: Number Guessing Chatbot
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