Creating AI 'chatbots' that learn

I’m trying to make a chatbot similar to this:
https://www.roblox.com/games/6168743407/Rose-The-A-I-Chatbot

So, basically, one that’s intelligent and learns from what others say/what you say, etc. But I’m not sure where to start learning or who exactly to ask. If someone could provide some helpful tips/resources to guide me, that’d be great! Thanks.

2 Likes

In order to achieve this, you have to code a brain similar to a biological brain. This can be done using the help of Neural Network

Here is a roblox Neural Network Module (Not made by me)

Hope it helps! :slight_smile:

6 Likes

first off ive read into rose, she isnt an ai, her data model makes no sense she doesnt recall from past inputs and has no sense of weight bias. what you want to do however is get data of chats, this will be our delta bias. from there we apply this to our activation function in our neural network. This is really simple (like 5 neurons). If you want your ai to come to a certain conclusion, a supervised approach might be a better option. see my implementation of the neural network here https://github.com/EppersonJoshua/machineLearningXOR/blob/main/main.py

2 Likes

I made one of these before for a laugh. They arent too bad to do, you will want to basically using string.match() to search through what the user has said.

I broke mine down into key categories for the first part of the users text:
Greetings, Questions and Commands

For greetings it will pick a random response from what it has learned then checks to see if there are also any questions or commands after the greeting in case the user has tried something like ‘Hello, How are you?’

Then with questions I broke it down into the 5 W’s who,what,when,where,why and also added in a few variations that have the same meaning like Why and How could be used in the same way.

When the bot comes across something it doesn’t know or lacks data on it can then ask ‘I’m sorry, I’m still learning, how would someone normally respond to this’ and gets the user to add some data in.

For the command side of things this is mainly for if you wanted the bot to also be able to do some things. For example alter the workspace, move around e.c.t. For this I checked for words like ‘Follow’ or ‘Open’ in order to do some basic things.

I would recommend trying to use HTTP service to get some information so it isn’t completely dependable on the DataStores. So you could find a trustworthy search engine that allows for API use and use that attempt to pull information that doesn’t pertain to questions about the bot. For example using it to solve maths problems or tell you a little bit about the news.

Even with some shortcuts this is not a easy project and you can expect the bot to lack a lot of responses. It would be worth opening it up to a group of trusted friends as early as possible so that they can start filling it up with Data.

2 Likes