CPPND_Project_03_Chatbot

View the Project on GitHub

Memory Management Chatbot

Goals

The main goal of this project is to debug and refactor an application, so it makes efficient use of memory, and also to fix a crash that always happens when the application is closed. The key aspects of the refactoring are exclusive versus shared ownership, ownership transfer, shared pointers, rule-of-five, and move semantics.

Results

The application creates a dialogue where users can ask questions about some aspects of memory management in C++. After the knowledge base of the chatbot has been loaded from a text file, a knowledge graph representation is created in computer memory, where chatbot answers represent the graph nodes and user queries represent the graph edges. After a user query has been sent to the chatbot, the Levenshtein distance is used to identify the most probable answer.