The code has been fixed, but I would love to hear any improvements!
Huge amount of credit to
Hello fellow coders! I have an assignment for a coding class that I have been working on – it is to create an artificial intelligence that can “hold a conversation”. I got stuck in this code, because I just can’t figure out a way to program this type of thing in Hopscotch. Any help would be greatly appreciated, and, of course, you would be credited in my final project.
Also, please give input on how I can improve the AI in general – suggestions such as a better conversation flow, or topics that you prefer to talk about. Thank you so much!
Here is the link:
Here is the problem described in more detail:
I would like to be able to have the program check an answer, and continue the conversation by asking a question about that answer, or making a comment about that answer. Sometimes, I want the comments/questions to be the same, and sometimes I want them to be different. Something like this chart:
My concern is using forever loops to check for whether I have clicked one button or another. Check in the code to see. If I don’t use forever loops, then I have trouble with it checking at the right time, and if I do use forever loops, then it constantly checks and doesn’t show anything else.
Thank you so much!
Also, could anybody help with this part of the code? If I put this code in:
Then it works, but if I put this code in:
Then it doesn’t work. Any ideas on why?