Hello :) Nice to meet you. I'm trying to do something similar.
I have researched the necessary data types required for a program in order to understand, learn and, therefore, ask (to learn some more).
My approach is to teach the program just like a little baby. But a little baby gets bored, distracted and doesn't get it the first time. So a computer program would act the same, until it has the basic tools for understanding, like language.
My current model is this
- create a (blank) database; -- this database has some tables like : words, sentences, actions etc.
create a program that can receive input (sentences); parses the sentences, saves words, tries to make sense of the sentence (see python nltk); if the sentence requires output then try to search for output by looking in the database for saved actions. If there are no actions then the program asks the user for the result or hints. If you build a script that searches the answer on the web (good luck) then the program asks the user if it is allowed to look-up the answer online.
If the program cannot resolve the users' request, then it builds up interest on that request.
I'm also trying to create a tree of synapses based on the input-output process. EG: the table of synapses has these fields : 1. id; 2. id_object (more on that later) 3. id_parent (the id of the parent synapse). This would be useful if, say, you would want the program to be multi-tasking and remember the discussions so that you would not have to repeat every command over and over.
For instance: I'll prompt the program to search a "THING" for me and "PERFORM" an "ACTION" with that "THING". This requires RAM-like learning (temporary memory) in order to firstly search for the "THING" and (after and IF it finds it) "PERFORM" the (heh based on the programs' synapses history) best matched "ACTION" that it could find.
This is not an answer to your question because you need to understand databases and nltk before you can continue. This is my concept (or approach) of creating a literally learning machine.
Cheers!