So, the story starts late night probably
between 1:00 AM – 3:00 AM when I was searching around for an AI that helps my
discord Love bot to be intelligent enough to generate its own answers and reply
to people.
I developed this discord Bot using Node.js
and discord.js module. It looks pretty good and well trained to respond to
users when someone says, “Hi” or “Hello” but the game changes when bot gets
such a message from the user which isn’t in its list. So how can I overcome the
problem?
Well after searching a lot on the internet,
I found couple of ways to train my Bot with an AI through an API which means
that sending an API request to the Cloud will generate an answer by sending a
JSON response. I was excited to use these cloud AI technologies but forgot to
note that these cloud companies charge you for using their services (don’t have
an idea – but not all).
Besides these methods I was already thinking
that what if I developed my own AI that learns and responds to user. Would
there be anyway simpler way to implement this idea without heavily diving into
proper AI and Machine Learning field? Would there be any method to implement
Neural networks and other techniques that trains my Bot? Would there be any
source which I can implement directly in Node.js without moving to Python,
keras, tensorflow and other complex solutions?
Going through my feed, I actually noticed a video
from Traversy Media in which they talk about a Simple Machine
Algorithm using a module called Brain.js inside Node.js. I was
pretty shocked when I looked at this.
After learning some cool methods and techniques, I actually trained myself how an AI works or precisely how Neural Networks works to make predictions by taking different inputs and outputs as a training data model.
I tried my bot to detect and reply to feelings but it didn’t worked well as it was taking much time to iterate (500 times) so I pushed the code to my git repository and went to sleep.
The next day I came up with some cool ideas and rewrite the training model so the AI detects the feelings much better and match my expectations more accurately. I ran the program couple of times and Boom! It worked fine for me. After making couple of edits and changes the app worked fine and I am done with it.
At last, I would like to say it was a pretty fun and nice experience that a guy with zero knowledge of AI actually learns how to make training models and train a network to make predictions. That’s super great!
I would also
love to recommend this cool module named Brain.js you should definitely
check out this and make some cool Neural networks project.
Best of
Luck!
Link to
install Node.js (Install Node.js)
Link to
Traversy Media AI tutorial (Tutorial)
Link to Brain.js
module (Brain.js Website)
Comments
Post a Comment