NLP engine for implementing intelligent agents?


I was wondering, do you guys know some well-documented natural language processing(NLP) engine suitable for applications like implementing emotion-aware NPCs in games?

The idea is to exploit NLP in a similar way to Façade, i.e. have the user interact with an NPC via textual input.

Looking forward to read your answers :slight_smile:

At the end of the day it’s still going to be relying on a bunch of logic to sort through this kind of thing. Which means you’re going to be writing your own logic and conversations as well as emotions that the npc would possess which will be handled through an array.

The best way to handle this in my opinion would basically be to write up all the potential responses and use a sorting algorithm to decide which would be best when in X emotion. First thing is first though, place it in a .dat file and have C++ open it. Use structs to plan out the logic(And obviously hold the data) and then assign it to your npc depending on the conditions.

Now if you want something like Cleverbot and have them learn via real-time… that’s a whole different story my friend.

(Forgot to add something that might help you!: Input/output with files - C++ Tutorials)

Thanks for the answer. Indeed, Cleverbot is a good example of what I would like to achieve :slight_smile: that’s what I’d like to use the NLP engine for.

That’s going to be pretty difficult. I’m not sure if you have an NLP engine on hand but if not then I can offer a way to create something similar. From my limited knowledge about Cleverbot it actually doesn’t have pre-set responses but i’m positive in it’s initial life it had pre-set questions. At the very basic level it would probably read the entire string and pick up the keywords, “Why, how, when, where, how come, isn’t it…, ?” blah, blah, blah you get the idea. When those words are used it’s immediately sorted into a ‘question’ array and stores the entire question; horrible grammar and all.

So replicating something like this in UE4 is actually going to be a hell of a job. It’s hard enough to create the logic on web-apps dedicated specifically to it but putting something like this into a game is no small feat. Generally it’s why you don’t see it very often if at all. Though I don’t have a doubt in my mind that it’s possible. Technically what you could try to do is make a simple web-page with pre-defined responses and maybe a question or two. In Unreal do some HTTP requests via code(C++) and probe the logic from there. This would probably be the best step for this kind of AI.

I’m sure there might be other ways of going about it but in truth AI is really one of the most difficult subjects to perform in the most effective way possible. If I were to tackle the “learning” AI I would handle it via HTTP requests for a variety of reasons. I hope this was helpful to you and anybody else who is also curious on this topic.