The Legendary Super Derp Posted August 21, 2020 Share Posted August 21, 2020 Hi, Im Having a little Trouble With An AI That Can Hold Memory. I Have 5 Strings (Memory Cartridges Or What You Would Call It.) string MEMORY1 = ""; string MEMORY2 = ""; string MEMORY3 = ""; string MEMORY4 = ""; string MEMORY5 = ""; And When You Type Text into the chat bot, it holds a memory in the memory cartridges. like so: cin >> MEMORY1; // Goes into the MEMORY 1 cartridge And if you type a certain thing into the first memory card it will effect the second: cin >> MEMORY1; if(MEMORY1 == "hello"){ Response = "Hi, Im Sam.\n"; cout << Response; } cin >> MEMORY2; if(MEMORY2 == "Example"){ if(MEMORY1 == "hello"){ Response = "thanks!"; cout << Response; } } but if i used 2 words, It would skip over, but if theres no other one, like my example. it ends the program. TL:DR : If i use 2 words for chatbot ai text, it skips and ends program. this is the first c++ program ive ever made, so it would mean a lot if you can help me :) Link to comment Share on other sites More sharing options...
WolfLord Skywalker Posted May 3, 2022 Share Posted May 3, 2022 Hey pal. I've seen the same problem too. If you want to add multiple words to memory,let's say memory1 for example then if(MEMORY1 == "hello"){ = wrong if(MEMORY1 == "hello", "hi"){ = right helps the ai add more vocabulary to each string Link to comment Share on other sites More sharing options...
WolfLord Skywalker Posted May 3, 2022 Share Posted May 3, 2022 Also I have a problem of my own. Do you think you can help? How do you code an ai scanner (as shown in the w3schools ai tutorial front page), and what is the file extension for ai code Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now