Development of a self-learning companion bot with the ability to calculate an arithmetic expression
Abstract
Development of a self-learning companion bot with the ability to calculate an arithmetic expression
Incoming article date: 10.01.2023The algorithm and code listing of the developed self-learning chatbot are presented. Able to maintain a conversation with the user, switch to training mode in the absence of the necessary information, analyze the context of the conversation for "forbidden" words. The Trim function is used, which removes extraneous characters represented in the tr property. And also an additional option "Solve arithmetic problems" is implemented in case of a request from the user. When implementing the latter option, a recursive descent algorithm based on three nested recursive functions was used, while the binary tree is filled in. A function has been developed to divide the incoming string into tokens. The chatbot code is developed in C++/C# based on the principles of object-oriented programming with the development of classes.
Keywords: artificial intelligence, machine learning, voice assistant chatbot, learning mode, tokens, recursive descent, binary tree