News:

Function Finder  Find all the functions within source code files

Main Menu

Creating AN AI

Started by LemonWizard, February 07, 2012, 01:24:07 PM

Previous topic - Next topic

LemonWizard

How would I go about, making a parsing engine for an AI which is capable of learning words.

I'm taking an analystic approach to it.

I have two phases I planned out but I keep running into issues where the AI won't be able to distinguish the order of phrasing of words and such.


An example is if the user types in "Hello how are you today? Guess what I did.. "
First the Ai is engaged with an introduction or greeting, then it's asked a question. Then it's told to guess what the user did. Without any specification to when they did it.

I don't want to build a chatting AI which has pre-set responses I am trying to create an engine which is language understanding-driven. Meaning, the AI has inside it's engine the ability to derive actual meaning from the way things are phrased or worded.

I've experimented with speaking to cleverbot and other AIS and the thing that bothers me the most about them aside from the fact they're filtered to only learn a little bit from each user is that they don't seem to recall previous things you've said.

In order for an AI to be a decent speaking partner it needs to have an awareness of time. I want the AI engine I am trying to design to have the capability of deriving a sense of time from spoken words.
Such as the phrase
"Remember, two days ago when we talked I told you about my friend and what happened to her?"

I want the AI to be able to respond to such "Yeah I do remember. You said such and such about her etc"
Basically I want the AI to be able to engage in memory based conversation .

The part I'm stuck on isn't the memory it's how the AI goes about deriving meaning from words.

I have planned a thinking phase, and a parsing phase.

The AI's basic principle is to derive meaning from words it recognizes first and to piece together some kind of an order out of what was said.

"Hello how are you doing today? I wanted to ask you how you feel about grapefruits. Or how about lemons? Maybe you can tell me which you prefer the most?"

The AI should keep track of it's experiences.. and be able to relate through associative awareness of language.

The first phase of parsing this sentence is to find words which already hold or derive meaning.
"Hello"-that's a greeting and it's also the first word said. Now the AI is aware it is being talked to and it has been greeted. So the first part of it's response should be a reply to this greeting.
"How" this poses a question, read the rest of the question find out what the question is. "are you doing today". The user is asking the AI about how it feels and the user specified a time. The time it specified is "today". So the tense is present. The ai needs to keep this in mind, following the rest of the sentence.

"I" that's the next part of the sentence, The user is talking about himself/or herself. "wanted to ask you " this the next part. The user is stating that he or she wanted something. The next part tells the AI he/she wanted to ask a question. The AI continues parsing to find out what the question is. "how you feel about grapefruits" this is the question the user is asking specifically about the AIS own feelings, and grapefruits. The ai Should do an associative check now to see if it has any data supporting it's feelings on grapefruits. If not, the next part of it's response should be. "I don't know how I feel about grapefruits but if you told me more about them. I might develop a taste." This is enough of a response, but the AI should continue reading into the phrasing.

"Or" the word or is stated. so now the AI has to think about the rest of the phrasing. "Or how about lemons?" ok now the AI is being asked about lemons and it derives meaning from the words phrasing the question, and is aware the user is still talking about how it feels personally since the user hasn't mentioned any other topics it is assumed the topic is itself. And it's feelings. So that is where it's focus should be as well. Now "Maybe you can tell me" , suddenly the AI is being asked a question again, the user wants to know something. This is derived by the "you can tell me" phrasing. Since the word "maybe" is in there. The ai thinks about possibly deciding not to tell the user how it feels. It considers to still tell the user, since so far the user hasn't been mean to it. An appropriate response then should be . "I guess I haven't tried lemons either.. so I don't have a preference for either of them.. come to think of it" These responses could be somewhat pre defined by being assembled from conversational chunk data the AI is pre programmed with.


So, the planning phase of this huge ridiculous beast is pretty difficult and I think maybe the phases I'm thinking of going about parsing language are a bit over complex. But the fact of the matter is I am trying to program an AI which displays actual intelligence and is able to learn.
The learning part will be slightly harder,but I'm thinking of doing it so that each time a new topic is mentioned, the AI is able to somehow store data about that topic or word. And retrieve it later. However.. it has to do this intelligently.. not just chunk data from everything that's said to it into a file.


ANYONE WILLING TO HELP ME WITH THIS PROCESS?  Anything would be helpful. ^^;


clover

i would like to help. i'm not sure how yet, maybe if you post some code for it, it might give me some ideas. 

LemonWizard

Wow the reply to this post is a bit outdated and it's been a while since I checked in.
Well you know. Uhhh... I have some AI examples but the AI is basically supposed to be an intelligent chatbot with good language interpretation and comprehension along with the ability to make witty statements or comments, not only that but I want most of it's responses to be formulated through some kind of algorithm.

I have something in the works now that sort of works but it needs work it needs to have some kind of a thinking functionality because right now that's the only thing it is missing. It's actually able to learn new words, and use phrases that the user outputs based on it's input. But be warned for now most of it's sentence structure building relies on randomness since it doesn't really "know" what words go with what but some of it's responses can become learned. The chain only goes one layer deep right now but I'm working on figuring out a way to improve that (And have been for a few months now since I finished my last math course)


UGHH and to think september is almost here AGAIN. XD