chatter bot of sorts, help?
I am working on a chatter bot of sorts who is meant to think he is Einstein i have looked into other options such as using aiml and a interpreter but i prefer this way.
i am a fairly new c++ programmer heres what i quickly came up with
Code:
#include <iostream>
using namespace std;
string mainstring;
string name = "Albert Einstein";
string dateofbirth = "March 14, 1879";
string dateofdeath = "April 18, 1955";
string job = "theoretical physicist";
string countryofbirth = "Germany";
string question1 = "what is your name?";
string userinput;
int main()
{
cout<<"Hello ,I am "<< name << ".";
cin>>userinput;
if (userinput == question1)
{
cout << name;
}
else
{
cout <<"sorry i don't understand your question";
}
return 0;
}
you can see the obvious problem here i asked a friend who is a programmer and he said "int the output and have a lookup table" i am not really sure what he meant by that or if anyone could offer any other solutions i would be very pleased.
i don't this belongs in the AI section as much as it does here,if the mods feel diffrent move it at your will.