/cpp-memory-management-chatbot

Basic ChatBot about Memory Management in C++ | Knowledge Graph | Levenshtein Distance | Smart Pointers | C++

Primary LanguageC++

Memory Management Chatbot

In this project you will see how to implement and run a little ChatBot program that can answer pbasic questions about Memory Management in C++, which is a very cool topic for fans of efficient coding!

In a simple GUI window you can ask the ChatBot about certain C++ Memory Management topics in free text form. The ChatBot creates a knowledge graph representation via loading a text file (the knowledge base). Here ChatBot answers represent the graph nodes and user queries represent the graph edges. After you entered a query and pressed enter, the query is sent to the ChatBot and it uses the Levenshtein distance to find the most probabl answer and displays it.

Dependencies for Running Locally

Basic Build Instructions

  1. Clone this repo.
  2. Make a build directory in the top level directory: mkdir build && cd build
  3. Compile: cmake .. && make
  4. Run it: ./membot.

Project Structure

Files of Interest

Fiels that might be most interesting for you from a Memory Management perspective are:

  • chatlogic.h and chatlogic.cpp
  • graphnode.h and graphnode.cpp
  • chatbot.h and chatbot.cpp

A cool exercise would be to clone the original repository from Udacity which can be found here, try to solve the tasks yourself and then compare with this solution. Have fun coding!

Acknowledgements

This is the project for the third course in the Udacity C++ Nanodegree Program: Memory Management. If you are interested in C++ programming, or just want to freshen up your game, I can highly recommend the course!