Computer understands your text and is able to speak back

Started by
34 comments, last by Minsc&Boo 7 years, 6 months ago

Have this been done? I'm trying to make an AI that can understand any text with exclusively letter and numbers only and be able to talk back to a human or other AI. Does anyone know anything about the concept I'm working on?

Advertisement
What do you mean by "understands?" In this context, that word can mean multiple things.

There's a lot of subjective wiggle room in your request, and not a lot of clarity. What does "understand" mean? What does "exclusively letter and numbers" mean? What does "talk back" mean?

Processing natural language has come quite a long way. Apple's Siri, Amazon's Echo, and Microsoft's Cortana are all products that are available now that can understand what a human says, make reasonable interpretations, and provide responses and follow up. They're not perfect, but they are surprisingly good.

I had this idea to allow certain NPCs in my game to be communicated with by directly typing in a short phrase of words with no periods, question marks, or other English grammar symbols. The NPC would be able to understand the short phase of words typed and reply back in text. I want to NPCs to correctly be able to interpret most text because unlike Siri or Cortana, they aren't just designed to be asked questions, they could approach the player if they're acting suspicious or ect and start the conversation themselves. I also want NPCs to be able to communicate with each other to speak in English text about actions the player has done or events.

I just wanted to see if this type of technology has already been developed and is commonly known before I start up my research and logic.

sounds like a reasonable idea i have a question though why would you make the ais job harder than it needs to be punctuation exists for a reason i think text without punctuation symbols would be harder to understand

Because we as human don't say "question mark" or "period" at the end of a sentence. We just know when something is a question, order, or statement. If we don't we ask clarifying questions and I think it would be fun for a player and AI to miscommunicate and all hell breaks loose but that my evil side speaking. By limiting how many character could be type and only working with letters and number I aimed to make it truly simple. Since the conversations will be first person most of the time I don't want to accommodate sentences like this "Go home now Rick?" the AI would be think it's being asked a question when it is not. Like a human the AI must use the words given to figure out if it is being asked a question, given a statement, or order. I have considered using parenthesis "" but I decided to go all out. Only when the player writes a note to AI character will these English symbols be required to because I always wanted to use these snobby gentlemen characters to humiliate players with bad grammar.

Natural language processing is an entire field of research. There's a lot to look up if you want to go down that route.

I suspect that limiting the input to just alphanumeric characters will actually make the problem harder: the more context you can get, the better your results will be, generally speaking. You might want to consider targeting a subset of language, such as the symbolic approach used by Siboot, but that will still require some careful design.

Your best bet for an off-the-shelf solution might just be to hook a chatbot up to your NPCs. There's several open-source chatbots, and you could probably create an AIML bot specification that meets your needs.

By limiting how many character could be type and only working with letters and number I aimed to make it truly simple.

As above, this will generally make things harder. The complexity in this problem space is not in the number of characters a user can type.

The basics of the kind of text parsing you're talking about have existed for ages; DOS adventure and text adventure games did this a long time ago. The problem is that natural language has a lot of ambiguity to it that you can't easily resolve algorithmically without context. Punctuation provides some context you can use to get a little more information out of the input, and you will need all you can get. If you choose to go the route of ignoring that sort of contextual information you're basically just going to be building yourself a huge pattern-matching database, which is fundamentally no different (and no more advanced) than what was done in those old games.

If that's what you're aiming for, that's fine: such a system is extremely easy to build and extremely easy to extend. It's just entirely inflexible and most likely won't make anybody think you've got a clever AI under there. If you want something more complex, be prepared for a lot of work trying to understand the context and structure of sentences. Including punctuation and prior input (a "short term memory" of sorts).

Because we as human don't say "question mark" or "period" at the end of a sentence.

Some language do in fact have a verbal question mark in there speech. The end of the sentence is the period.

Punctuation is an attempt to give written words the same complexity as speech. In English when you ask a question the pitch, tempo and pronunciation changes.

When making a AI like this it helps to start with text, because it's already a form of data and easier to translate and has less rules.

Jake, Jake? Jake!

That is an actual sentence, that you can hear in your head because of punctuation.

If that's what you're aiming for, that's fine: such a system is extremely easy to build and extremely easy to extend. It's just entirely inflexible and most likely won't make anybody think you've got a clever AI under there. If you want something more complex, be prepared for a lot of work trying to understand the context and structure of sentences. Including punctuation and prior input (a "short term memory" of sorts).
I have to agree with Petrie here, I used python a while back to make an AI that could respond to people. The speech part was harder as you had to translate waves and because it was so complex the AI responding to text worked better.

By limiting how many character could be type and only working with letters and number I aimed to make it truly simple.

As above, this will generally make things harder. The complexity in this problem space is not in the number of characters a user can type.

The basics of the kind of text parsing you're talking about have existed for ages; DOS adventure and text adventure games did this a long time ago. The problem is that natural language has a lot of ambiguity to it that you can't easily resolve algorithmically without context. Punctuation provides some context you can use to get a little more information out of the input, and you will need all you can get. If you choose to go the route of ignoring that sort of contextual information you're basically just going to be building yourself a huge pattern-matching database, which is fundamentally no different (and no more advanced) than what was done in those old games.

If that's what you're aiming for, that's fine: such a system is extremely easy to build and extremely easy to extend. It's just entirely inflexible and most likely won't make anybody think you've got a clever AI under there. If you want something more complex, be prepared for a lot of work trying to understand the context and structure of sentences. Including punctuation and prior input (a "short term memory" of sorts).

I've looked around at a few chat bots programs and some are interesting and others are predictable. I know this goes against what was advise but I think I'll accept this challenge. Why is that I don't needs to say these symbols in my speech to communicate? How am I figuring out all these ambiguities? I've thought about this for a while and now that I think I know I'm making a chat bot I'm going to start planning. I truly believe I see a simple solution my way to this simulation . I dreamed the code and it looked simple so I'm going to do it.

Thanks for suggestions thought

This topic is closed to new replies.

Advertisement