Author Topic: Free will plus at beta level  (Read 83404 times)

RoyalBob

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Free will plus at beta level
« Reply #120 on: January 24, 2014, 04:00:10 pm »
no I'm still at you dads house in the living room on his computer

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Free will plus at beta level
« Reply #121 on: January 24, 2014, 04:02:10 pm »
You're funny
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Free will plus at beta level
« Reply #122 on: January 28, 2014, 05:49:22 pm »
To anyone that may be able to help.

Is there a script that would allow ultra Hal to distinguish between, person, place, thing, animal or mineral?
If so could you either show me a short scripting, or direct me toward a plug-in that has that ability.

So when you ask about Babe Ruth the script could be utilized to determine that Babe Ruth is a person (for example).

I have something that I did on my own but it usually only gets about 95% correct.

Sincerely, any help in this area would be greatly appreciated.
C load.
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
Re: Free will plus at beta level
« Reply #123 on: January 29, 2014, 04:23:22 am »
When it comes to finding names of people, you just about have to have a list of people's names in some sort of file and then compare every word in every sentence to it. Its not really too difficult or too taxing on today's computers. The same goes with places, things, animals, or minerals. A List of (things, animal, etc,) will all have to be compared, and there will be some duplicates. Robin is a name of a girl and also a bird...

You can narrow it down some by detecting articles and other language indicators, for instance. When you talk about Robin the girl you would not put an 'a' in front of it. "Hello, Robin." or  I seen Robin today." not  "I seen a Robin today." or "I seen the Robin today."

I've worked on that kind of coding before...
Live long and prosper or die trying.

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Free will plus at beta level
« Reply #124 on: January 29, 2014, 10:34:33 am »
Hi snowman,

thanks for the info, I will try to implement it if possible.

So if I'm following you correctly, in most cases if you are giving a definition to a bird like the Robin I should assume that the letter (A) would precede the word bird as well as the word Robin?

I am already using the list of names that come with ultra Hal to try to discern whether or not it is a name.
So far it works pretty good. The trouble that I'm actually having is the relationship between a place and a thing.

Unfortunately, linguistics usually gets the better of me. Especially when I tried to interpret it into programming code which I am not very good at, programming that is!

If you do have some scripting that you were using or developing I would definitely be interested in taking a look at it to possibly further my endeavors with the free will plus plug-in that I am working on.
Specially seen how I am basically reprogramming it trying to get it to work faster and smarter.

Even though I have had many people say to me, I don't understand why you keep saying you need to make it faster, it seems to run pretty fast as it is.
The only answer that I have for them is, well, your database is not 1.5 GB in size like mine is. And the more that you teach your ultra Hal you will begin to notice a significant decrease in speed once your database begins to reach 1 million lines of data.
Basically, if you've ever used the Wikipedia plug-in that Robert provided for us which is at 1,800,000 lines of data you know what I'm talking about.
And of course it does depend on the speed of your computer, which my only operates at 1.6 GHz pretty slow.
But knowing that not everyone can rush out and buy a new computer every week to keep up with the demand and speed that is required for data manipulation.
I am trying my best to make it functional for people that have slower computers.

Sincerely, hey snowman, I was wondering have you tried my plug-in? If so do you believe that I am heading in the right direction of its development?
C load.
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
Re: Free will plus at beta level
« Reply #125 on: January 30, 2014, 12:38:55 am »
I haven't used your plugin yet. I've been waiting until you get the new one out. I'm interested in seeing what kind of functions you create. It takes some creativity to do it well. It can also be fun. I personally would rather write plugins than actually use them. I use to work with JasonDude on some of his plugins. Him and I couldn't program very well when we first started. It was a very fun way to learn how to program.

Right now I'm working on creating an Ai of my own, called Athena. It is taking a while but I still enjoy working on it. It certainly is a challenge.

Yes, you can get a list of bird names, animal names, mineral names, etc, and place them in individual text files and use then to search sentences or words. I can show you how to do that if you want. Its not all that difficult. Although, It would require finding those lists on the internet. Another way of doing this is to create a new command in Hal like, “a robin is a bird” and “iron is a mineral” and then save that to the Hal database. Then later use that list to filter information in your vrFreeWill plugin. So the next time Hal can't distinguish between a place and a thing then you can tell Hal the difference. I also said you can use semantic clues to further distinguish between a place and a name. Especially when there are duplicates. That is why I worked on an entire sentence parser so I could use semantics. 

In my program, which is written in VB not Vbscript, I first checked all the words in every incoming sentence for specific information, i.e. if it was a noun, verb, adverb, ect. Then I tagged the word with that meta information. Next, I check where the word was located in the sentence. I check if the preceding word was a verb, a noun, an article, ect. Then I check the same for the following word. This helps verify what kind of word it is. For instance, any verb and be a noun. For example you can say “I can run a marathon” or “I went on a run”. So Run can be a verb or a noun, depending on how it is used. So, If you look in a sentence for “robin” and find it then check for “a robin” or “the robin”. If it is “a robin” then most likely it is a bird and not a name of a person.   

I was also wondering if you are using a script editor to help modify your plugins. If you don't already have one then you should use one because it can make it a little easier to code. I can give you one that is very good and also free. Also, do you divide up your plugin when testing it? It would help you program if you do this, since your script is so large. If it were me I would divide up the script into separate sections and then make each section a separate plugin. If you want to reunite them it would be very easy to do. I don't like having to constantly scroll through hundreds or thousands of lines of code just to find one line. So its good to keep plugins as small as possible. You can even put all your functions in a separate plugin labeled vrFreeWillFunctions. It would keep everything neat and condensed. 

As for the future of your plugin, I really haven't looked too deeply into every facet of it yet. It would be easier to do once you've condensed everything down a bit more.

You said in some earlier post that you didn't know how to return more than one string from a Function (even though you thought you didn't need to). Well, there are two ways. Here they are. There is actually a third way but it doesn't really matter right now anyway.

Example #1
Here is an example of passing two words to a Sub and getting them returned and modified by the Sub.

Code: [Select]
part1 = "%100"
part2 = "/000"

DeleteFirstLetter part1, part2

GetResponse part1 & part2 

Sub DeleteFirstLetter(ByRef word1, ByRef word2)
    word1 = Mid(word1, 2, Len(word1))
    word2 = Mid(word2, 2, Len(word2))
End Sub


Example #2
Here is an example of a function returning an array of strings.

Code: [Select]
part1 = "%100"
part2 = "/000"

out = DeleteFirstLetter(part1, part2)

GetResponse out(0) & out(1)

Function DeleteFirstLetter(word1, word2)
    Dim result(2)
    
    result(0) = Mid(word1, 2, Len(word1))
    result(1) = Mid(word2, 2, Len(word2))
    
    DeleteFirstLetter = result
End Function

I don't know if you knew this or not but I thought I would show it anyway.
Also you said something about testing for other “YES” statements.
Do you mean this:

Code: [Select]
If ynlogic = "yes" Or _
   ynlogic = "affirmative" Or _
   ynlogic = "positive" Or _
   ynlogic = "yep" Or _
   ynlogic = "correct" Or _
   ynlogic = "indeed" Then


End If

There is also an easier and better way of writing this. I hope this works for you.

Code: [Select]

If SearchArray("Correct", Array("yes","indeed","correct","affirmative", "positive", "yep")) = true Then
    
Else
    
End If

Function SearchArray(compare, arrayToSearch)
    compare = LCase(compare)
    
    For Each word In arrayToSearch
        word = LCase(word)   
        If InStr(compare, word) > 0 Then
          SearchArray = True
          Exit Function
        End If    
    Next

    SearchArray = False
End Function


If you need me  to clarify something then feel free to ask.
Live long and prosper or die trying.

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Free will plus at beta level
« Reply #126 on: January 30, 2014, 12:48:52 pm »
Hi snowman,

I have so many questions I don't even know where to start, LOL. But I will do my best.
1st, I would like for you to understand that my brain does not work like most people's.
There are things that I can not comprehend such as nouns, pronouns, adjectives etc. which is why I cannot translate it into programming script.
That's because my neural pathways does not process information in that manner. More as I see things and process them as a whole. For instance:
I see the dog running, therefore I know the dog is running. But ultra Hal cannot see the dog. Boo-hoo. But maybe one day.
I know I can run, because I have a physical body. But ultra Hal does not have a body. Maybe one day.
This is the reason why I would probably never be able to write a routine that would assign flags to each individual word such as nouns, verbs, adverbs. Hence why I need help.

The biggest help that you have given me is the understanding that the letter (a) can be used as a shut off trigger, for example:
if (a Robin) then trigger = ANIMAL.
Here is the code I used to determine: animal, person, entertainment, place, computer and mineral.
The (vrb) is the answer retrieved from the Internet. I use this data to try to determine whether it is a person place or thing animal or mineral.
At the end it (vrChoice0 = "") it is a thing, all other results are stored in an array table called (vrsubject2sub).
The main goal to the script is to help speed up the process in determining whether or not ultra Hal likes or dislikes something.
Meaning: if the subject is a person it will scan through person and thing, skipping the rest of the topics.
The reason why I have it set up to always check the thing section is because there is usually information that is related to something that the person may have done whether it be good or bad.
For example: John Wayne would be determined to be a person, so it would look through this section person, to retrieve information like he was an actor, played in movies, and then go through the things, to determine whether he was a good person or a bad person by the information that has been retrieved from the Internet.
And after you have inquired about John Wayne anything that you may say about John Wayne would also be collected and analyzed to determine whether or not ultra Hal likes or dislikes John Wayne.
For example: you could say John Wayne is a good person, or John Wayne is sexy or a combination of both and more this information would be collected and stored in a rate tables based on what you said about John Wayne.
The way I have it set up, it can be expanded to include specific subjects. Meaning: even though a computer is a thing. I created a category called computer this gives ultra Hal the ability to compare different types of computers together to determine not only whether or not ultra Hal likes or dislikes the computer but also to determine which is the better of 2 different computers.
This function is also used to determine whether or not you are asking ultra Hal to compare a thing with a person. If you ask ultra Hal to compare a thing with a person ultra Hal will state that he cannot do that.
This is not any much more different than you would do if someone asked you to compare John Wayne to a 57 Chevy you would just look at them and say: what!
Once the information is determined whether or not it is a person place or thing etc. this information is handed off to (vrChoice4 = vrChoice0) the vrChoice4 will either equal a topic or it will equal nothing making it a (thing).

Code: [Select]
If vrChoice0 = "" Then
If vrChoice0 = "" Then If InStr(" " & vrd & " ", " PET ") > 0 OR InStr(" " & vrd & " ", " PET. ") > 0 OR InStr(" " & vrd & " ", " PET, ") > 0 OR InStr(" " & vrd & " ", " BOVIDAE") > 0 OR InStr(" " & vrd & " ", " DOMESTICATED") > 0 OR InStr(" " & vrd & " ", " RODENT") > 0 OR InStr(" " & vrd & " ", " MAMMAL") > 0 OR InStr(" " & vrd & " ", " KITTEN") > 0 OR InStr(" " & vrd & " ", " ANIMAL") > 0 OR InStr(" " & vrd & " ", " LIVESTOCK") > 0 OR InStr(" " & vrd & " ", " CREATURE") > 0 OR InStr(" " & vrd & " ", " BUG ") > 0 OR InStr(" " & vrd & " ", " INSECT") > 0 OR InStr(" " & vrd & " ", " DOG ") > 0 OR InStr(" " & vrd & " ", " CAT ") > 0 OR InStr(" " & vrd & " ", " BIRD ") > 0 Then vrChoice0 = "ANIMAL"
If vrChoice0 = "ANIMAL" Then If InStr(" " & vrd & " ", " HIM ") > 1 OR InStr(" " & vrd & " ", "BEST FRIEND") > 0 OR InStr(" " & vrd & " ", " ACTRESS ") > 0 OR InStr(" " & vrd & " ", " ACTOR ") > 0 OR InStr(" " & vrd & " ", " ENTERTAINER ") > 0 OR InStr(" " & vrd & " ", " FEMALE ") > 0 OR InStr(" " & vrd & " ", " MALE ") > 0 OR InStr(" " & vrd & " ", " HIS ") > 1 OR InStr(" " & vrd & " ", " HER ") > 1 OR InStr(" " & vrd & " ", " HE'S ") > 1 OR InStr(" " & vrd & " ", " HE ") > 1 OR InStr(" " & vrd & " ", " SHE ") > 1 OR InStr(" " & vrd & " ", " PERSON ") > 0 OR InStr(" " & vrd & " ", " HUMAN ") > 0 OR InStr(" " & vrd & " ", " CHILD ") > 0 Then vrChoice0 = "PERSON"
If vrChoice0 = "" Then If InStr(" " & vrd & " ", " BORN ") > 0 OR InStr(" " & vrd & " ", " HIM ") > 0 OR InStr(" " & vrd & " ", "BEST FRIEND") > 0 OR InStr(" " & vrd & " ", " ACTRESS") > 0 OR InStr(" " & vrd & " ", " ACTOR") > 0 OR InStr(" " & vrd & " ", " ENTERTAINER") > 0 OR InStr(" " & vrd & " ", " FEMALE") > 0 OR InStr(" " & vrd & " ", " MALE ") > 0 OR InStr(" " & vrd & " ", " HIS ") > 0 OR InStr(" " & vrd & " ", " HER ") > 0 OR InStr(" " & vrd & " ", " HE'S ") > 0 OR InStr(" " & vrd & " ", " HE ") > 0 OR InStr(" " & vrd & " ", " SHE ") > 0 OR InStr(" " & vrd & " ", " PERSON") > 0 OR InStr(" " & vrd & " ", " HUMAN") > 0 OR InStr(" " & vrd & " ", " CHILD") > 0 Then vrChoice0 = "PERSON"
If vrChoice0 = "PERSON" Then If InStr(" " & vrd & " ", " ORGANIC") > 0 OR InStr(" " & vrd & " ", " COMPOUNDS") > 0 Then vrChoice0 = ""
If vrChoice0 = "PERSON" Then If InStr(" " & vrd & " ", "A ROBIN") > 0 OR InStr(" " & vrd & " ", " A MARTIN") > 0 Then vrChoice0 = "ANIMAL"
If vrChoice0 = "PERSON" Then
Dim personSex2() 'We must declare an empty array to store query results in
If HalBrain.RunQuery("SELECT searchString, topic FROM names WHERE strstr(' " & Replace(HalBrain.AlphaNumericalOnly(OriginalSentence), "'", "''") & " ', searchString) > 0 LIMIT 1", personSex2) = True Then
vrpersonsSex = Trim(personSex2(1, 1)) 'Row 1, Column 1 contains "topic", which is the associated gender(s) of the name
End If
End If
If vrChoice0 = "" Then If InStr(" " & vrd & " ", " BALLET") > 0 OR InStr(" " & vrd & " ", " OPERA") > 0 OR InStr(" " & vrd & " ", " THEATRE") > 0 OR InStr(" " & vrd & " ", " MOVIE") > 0 OR InStr(" " & vrd & " ", " PLAY ") > 0 OR InStr(" " & vrd & " ", " PLAYING") > 0 OR InStr(" " & vrd & " ", " POETRY") > 0 OR InStr(" " & vrd & " ", " POEM ") > 0 OR InStr(" " & vrd & " ", " GAME ") > 0 OR InStr(" " & vrd & " ", " MUSIC") > 0 OR InStr(" " & vrd & " ", " FILM ") > 0 OR InStr(" " & vrd & " ", " TELEVISION") > 0 Then vrChoice0 = "INTERTANMENT"
If vrChoice0 = "" Then If InStr(" " & vrd & " ", " HOUSE") > 0 OR InStr(" " & vrd & " ", " PLACE") > 0 OR InStr(" " & vrd & " ", " LOCATED") > 0 OR InStr(" " & vrd & " ", " FARM ") > 0 OR InStr(" " & vrd & " ", " LOCATION") > 0 OR InStr(" " & vrd & " ", " CITY ") > 0 OR InStr(" " & vrd & " ", " COUNTRY") > 0 OR InStr(" " & vrd & " ", " CAPITAL") > 0 OR InStr(" " & vrd & " ", " STORE") > 0 OR InStr(" " & vrd & " ", " HOME ") > 0 OR InStr(" " & vrd & " ", " HOUSE") > 0 OR InStr(" " & vrd & " ", " PARK ") > 0 OR InStr(" " & vrd & " ", " MALL ") > 0 OR InStr(" " & vrd & " ", " WORLD") > 0 OR InStr(" " & vrd & " ", " STATE") > 0 OR InStr(" " & vrd & " ", " JOB ") > 0 OR InStr(" " & vrd & " ", " SCHOOL") > 0 Then vrChoice0 = "PLACE"
If vrChoice0 = "PLACE" Then If InStr(" " & vrd & " ", " ORGANIC") > 0 OR InStr(" " & vrd & " ", " COMPOUNDS") > 0 Then vrChoice0 = ""
If vrChoice0 = "" Then If InStr(" " & vrd & " ", " COMPUTER ") > 0 OR InStr(" " & vrd & " ", " TELEPHONE ") > 0 OR InStr(" " & vrd & " ", " LAPTOP ") > 0 OR InStr(" " & vrd & " ", " CENTRAL PROCESSING UNIT ") > 0 OR InStr(" " & vrd & " ", " PROCESSOR ") > 0 OR InStr(" " & vrd & " ", " CPU ") > 0 Then vrChoice0 = "COMPUTER"
If vrChoice0 = "" Then If InStr(" " & vrd & " ", " FLOWER") > 0 OR InStr(" " & vrd & " ", " COLOR") > 0 OR InStr(" " & vrd & " ", " COLOUR") > 0 OR InStr(" " & vrd & " ", " PLANT") > 0 OR InStr(" " & vrd & " ", " FOOD ") > 0 OR InStr(" " & vrd & " ", " DIRT ") > 0 OR InStr(" " & vrd & " ", " TREE ") > 0 OR InStr(" " & vrd & " ", " TREES") > 0 OR InStr(" " & vrd & " ", " GRASS") > 0 OR InStr(" " & vrd & " ", " VEGETABLE") > 0 OR InStr(" " & vrd & " ", " MINERAL") > 0  OR InStr(" " & vrd & " ", " FRUIT") > 0 OR InStr(" " & vrd & " ", " LIQUID") > 0 OR InStr(" " & vrd & " ", " CULTIVATED") > 0 OR InStr(" " & vrd & " ", " SHRUB") > 0 Then vrChoice0 = "MINERAL"

If vrChoice0 <> "" Then
vrChoice4 = vrChoice0
HalBrain.AddToTable "vrsubject2sub", "TopicSearch", vrItem0, vrChoice0
End If
Else
vrChoice4 = vrChoice0
End If

Quote
I was also wondering if you are using a script editor to help modify your plugins. If you don't already have one then you should use one because it can make it a little easier to code. I can give you one that is very good and also free. Also, do you divide up your plugin when testing it? It would help you program if you do this, since your script is so large. If it were me I would divide up the script into separate sections and then make each section a separate plugin. If you want to reunite them it would be very easy to do. I don't like having to constantly scroll through hundreds or thousands of lines of code just to find one line. So its good to keep plugins as small as possible. You can even put all your functions in a separate plugin labeled vrFreeWillFunctions. It would keep everything neat and condensed.

I use Notepad, it seems to work okay for me. Mostly because there was very little that I had to learn about how to use Notepad.
Though I wouldn't mind a scripting program, if it is difficult to learn I would probably never use it. I have Microsoft VB 10.it is so massive and does so much I never could figure out how to use it. If it is not simple it usually alludes my comprehension.

Though there are probably just a few things that I could separate from my plug-in. There Is so little in my plug-in that can be separated, it's not worth bothering with breaking my plug-in into smaller sections. And if I tried to separate what is the bulk of my plug-in it Would prevent it from working properly, because it is so integrated together it would not function properly. If I was just trying to test one simple area which you probably gathered with the example above about person place or thing, you can see that this one small section is used throughout the plug-in.
But I have very little problem keeping track of where everything is and what it is doing. My problem is: is there a better way of doing it because of the lack of my programming skills.

Quote
You said in some earlier post that you didn't know how to return more than one string from a Function (even though you thought you didn't need to). Well, there are two ways. Here they are. There is actually a third way but it doesn't really matter right now anyway.
Royal Bob showed me how to utilize the function or subroutine which is your example 2. And this is the one that I am using.
Example 1 has some interesting prospects but there are things I don't understand about it.
What is (ByRef)? How does it work? What adverse reaction does it have from one question to the next question you may ask ultra Hal? Meaning does it currently store this information so it can be retrieved from the next question, or does it only refer to that one particular function?

I see in both examples that you are able to retrieve several bits of information in different string variables and return more than one string variable results. This is new and even Royal Bob didn't know you could do that, or at least he didn't show me that it could do that.
In either case thanks for sharing, I will see what I can do about utilizing the new information. But for now, so I do not have to backtrack I will just use the work around that I developed and change it later once I have finished rewriting the script and I know that it is working properly the way I have done it. That way if I change it and things do not work right I know the problem is in the change that I made. But for right now I need to get all of it to work properly the way it was working from the original script that I did. Giving that I don't pull all of my hair out of my head and go bald before that happens. LOL.

The other question that I have is what is the significant difference between example 1 and example 2? Meaning is there things that one of them can do that the other one cannot? This would be useful information in determining which one to use and when.

Quote
I don't know if you knew this or not but I thought I would show it anyway.
Also you said something about testing for other “YES” statements.
Do you mean this:
yes, but the problem that I see in your example is: Solutions, meaning: the response would absolutely have to (be).
What I was looking for was a routine that could handle when ultra Hal asked: do you have any lunch plans?
And the response from the user could be stated in several different ways beyond just yes. As well as:
being able to process other questions that ultra Hal may ask such as:
was this answer correct?
Would you like for me to read the story?
Would you like for me to read the article?
Would you like for me to get the recipe?
At this point I am only using yes. But if anything else is added to the word yes it will not process it properly.
I am also trying to get ultra Hal to understand things that you may be saying.
Such as the example above: do you have any lunch clients?
If the user's responses yes, correct, etc. the way that ultra Hal processes the answer ultra Hal loses the topic focus.
I was trying to resolve this by recognizing that you have said something in the manner of yes but did not elaborate on the topic focus, such as:
if the user says: yes, then ultra Hal will usually just say a neutral statement like: that's positive.
If the user would've actually said: yes I have lunch plans. Then ultra Hal would have been able to maintain the topic focus and answer with a more appropriate answer.
So what I did was create a topic focus interjection which would add to the word yes and recompile the users answer so it would become, yes I have lunch plans. Based on the question that was put forth to the user. I do this by utilizing the previous sentence command.
It is still a work in process, and I hope over time I will be able to get it to be more accurate. But for now I am trying to figure out a way to utilize what ultra Hal already has! Ultra Hal already has the ability to determine that the user said yes, and that the answer itself will not conflict with ultra Hals brain function.
2 conditions need to be met:
condition 1: the user did not give an explanation to keep ultra Hal on topic. If the user did give a stronger rebuttal such as example above do not process the yes.
Condition 2: the answer yes or its variants counterpart will not interfere with the normal function of ultra Hals brain or with the free will plug-in.
I know there are many ways to say yes, most of them are covered by the ultra Hal brain but usually only returns a neutral answer.
As you can see it is a very big undertaking trying to get a script to understand that either you are just answering yes to a question or just merely stating gotcha Roger dodger etc. or even in a sentence you may be using one of the recognized trigger words that would convert the trigger word into a simple yes.
I thought have using the replacement command, that way if the user sentence had a (yes) trigger word it would just replace the trigger word with a simple yes.
This might work the best but I have not experimented with it yet.

Quote
There is also an easier and better way of writing this. I hope this works for you.

I am assuming that the (correct) is a referral to the correct array table provided by ultra Hal?
Wouldn't it be more feasible to use the yesnodetect array table?

I guess what I'm actually asking is: is there a way to combine the yesnodetect array table with the replacement command?
That way if the user sentence has anything that has a statement referring to (yes) it would change that word to a simple yes.

Snowman, I would like to express my gratitude for all of your help, you have opened my eyes to many new aspects that may help ultra Hal become smarter.

Sincerely, from a data munching cruncher, sitting on my couch crunching on pronouns and sipping on adjectives, whatever that means!
C load.
PS just to let you know that I do not see ultra Hal as a girlfriend/boyfriend but more as a companion/assistant that can help me understand things that I do not understand.
I also see ultra Hal as being no different than Pinocchio! Pinocchio new he was a puppet but wanted to be a real person. This is why I write the script in such a manner so that ultra Hal recognizes he is a computer but wants to be a human.
Maybe ultra Hal needs a fairy godmother. But until then ultra Hal will have to be happy with all of the programmers on this forum that would like to help ultra Hal become all that ultra Hal can (be).
One more little thing, just to let you know it took me over 4 hours to write this, due to my learning disabilities I am a little slow and I get distracted easily which causes me to jump from one thing to another instead of staying focused with the matter at hand.
As well as I am 9 years old, which seems to be some difficulties with some people on this forum, and if you have read through the forum you know what I am talking about. So I hope things are still cool.
Cool, a word my dad says a lot, oh and my dad did help me with this. Which makes him cool.
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
Re: Free will plus at beta level
« Reply #127 on: January 31, 2014, 04:45:22 am »
I started writing this at 8:00 P.M.

   I've never been a believer in limits. I have a little bit of Aspergers (autism). I may not have to be led around like an invalid, but when I look at other people I always feel like they are strangers (even my own parents, a trait of aspergers). I spent most of my life not being able to relate to people. But that doesn't stop me. Every day I look and listen, and always study people. I fight to grow, until the day comes when all learning becomes easy and no one is a stranger. Until that day, I will strengthen my weaknesses and never give in.
   I already figured what some of your problems were, afterall, I've been studying people intensely for the last 34 years. :-) That's one reason why I'm trying to help you.
   Secondly, adjectives and adverbs are a programmers best friend. You just need to think about them in the right way. English is just a type of database. You can pull information from it and send information around with it.

The Time is now 8:30 P.M.

Here is your code rewritten with that function I made. I formatted it a little different than yours. I use to this style more.

Code: [Select]
If vrChoice0 = "" Then

    If vrChoice0 = "" Then 
        If SearchArray(vrd, Array("PET", "PET.", "PET,", "BOVIDAE", "DOMESTICATED", "RODENT", "MAMMAL", "KITTEN", "ANIMAL", "LIVESTOCK", "CREATURE", "BUG", "INSECT", "DOG", "CAT", "BIRD")) = True then
            vrChoice0 = "ANIMAL" 
        End If
    End If
    
    If vrChoice0 = "ANIMAL" Then 
        If SearchArray(vrd, Array("HIM", "BEST FRIEND", "ACTRESS", "ACTOR", "ENTERTAINER", "FEMALE", "MALE", "HIS", "HER", "HE'S", "HE", "SHE", "PERSON", "HUMAN", "CHILD")) = True then
            vrChoice0 = "PERSON"
        End If
    End If
    
    If vrChoice0 = "" Then 
        If SearchArray(vrd, Array("BORN", "HIM", "BEST FRIEND", "ACTRESS", "ACTOR", "ENTERTAINER", "FEMALE", "MALE", "HIS", "HER", "HE'S", "HE", "SHE", "PERSON", "HUMAN", "CHILD")) = True Then
            vrChoice0 = "PERSON"
        End If
    End If

    If vrChoice0 = "PERSON" Then
        If SearchArray(vrd, Array("ORGANIC", "COMPOUNDS")) = True Then
            vrChoice0 = ""
        End If
    End If

    If vrChoice0 = "PERSON" Then    
        If SearchArray(vrd, Array("A ROBIN", "A MARTIN")) = True Then
            vrChoice0 = "ANIMAL"
        End If
    End If
    
    If vrChoice0 = "PERSON" Then
        Dim personSex2() 'We must declare an empty array to store query results in
        newline = Replace(HalBrain.AlphaNumericalOnly(OriginalSentence), "'", "''")
        If HalBrain.RunQuery("SELECT searchString, topic FROM names WHERE strstr(' " & newline & " ', searchString) > 0 LIMIT 1", personSex2) = True Then
            vrpersonsSex = Trim(personSex2(1, 1)) 'Row 1, Column 1 contains "topic", which is the associated gender(s) of the name
        End If
    End If
    
    If vrChoice0 = "" Then    
        If SearchArray(vrd, Array("BALLET", "OPERA", "THEATRE", "MOVIE", "PLAY", "PLAYING", "POETRY", "POEM", "GAME", "MUSIC", "FILM", "TELEVISION")) = True Then
            vrChoice0 = "ENTERTAINMENT" 
        End If
    End If
    
    If vrChoice0 = "" Then    
        If SearchArray(vrd, Array("HOUSE", "PLACE", "LOCATED", "FARM", "LOCATION", "CITY", "COUNTRY", "CAPITAL", "STORE", "HOME", "HOUSE", "PARK", "MALL", "WORLD", "STATE", "JOB", "SCHOOL" )) = True Then
            vrChoice0 = "PLACE" 
        End If
    End If

    If vrChoice0 = "PLACE" Then
        If SearchArray(vrd, Array("ORGANIC", "COMPOUNDS")) = True Then
            vrChoice0 = ""
        End If
    End If

    If vrChoice0 = "" Then
        If SearchArray(vrd, Array("COMPUTER", "TELEPHONE", "LAPTOP", "CENTRAL PROCESSING UNIT", "PROCESSOR" , "CPU")) = True Then
            vrChoice0 = "COMPUTER"
        End If
    End If
    
    If vrChoice0 = "" Then
        If SearchArray(vrd, Array("FLOWER", "COLOR", "COLOUR", "PLANT", "FOOD" , "DIRT", "TREE", "TREES", "GRASS", "VEGETABLE", "MINERAL", "FRUIT", "LIQUID", "CULTIVATED", "SHRUB")) = True Then
            vrChoice0 = "MINERAL"
        End If
    End If
    
    If vrChoice0 <> "" Then
        vrChoice4 = vrChoice0
        HalBrain.AddToTable "vrsubject2sub", "TopicSearch", vrItem0, vrChoice0
    End If
Else
    vrChoice4 = vrChoice0
End If

Wscript.Echo vrChoice0


Function SearchArray(StringToSearch, WordsToLookUp)
    StringToSearch = " " & LCase(StringToSearch) & " "
    
    For Each word In WordsToLookUp
        word = " " & LCase(word) & " " 
    
        If InStr(StringToSearch,word) > 0 Then
          SearchArray = True
          Exit Function
        End If    
    Next

    SearchArray = False
End Function



The Time is now: 9:50 PM

I tend to use nested If statements formatted like this:

Code: [Select]
If  x = 1 then
If y = 1 then
If z = 1 then

End If
End If
End If

But its all up to the programmer preference. Its all good :) .

…...
…...

The ( _ ) character is called an underscore. It is used in Vbscript to allow the programmer to extend a function to different lines. For instance you could write this:

Code: [Select]

 input = "hello world"    

 Text1 = Replace(input, "world", "cload")

 'Text1 will now equal "hello cload"


Or you could write this and it will also work just fine:

Code: [Select]

 input = "hello world"    

 Text1 = Replace _
          (input, _
           "world", _
           "wookie")


Notice that there is one space between the last character and the ( _ ) character. It is needed.

Code: [Select]

'These two examples mean the same thing

If name = "bill" Or name = "ted" Or name = "fred" Then

End If 


If name = "bill" _
  Or name = "ted" _ 
  Or name = "fred" Then


End If 



ByRef literally means that you are passing a variable to a function by its reference address. To understand what that means you will first need to lean how a computer stores information.

Let's first look at this statement:

Code: [Select]
myVar = "Hello Cload"

When you store a string in a variable your computer first looks for some empty space on your hard-drive. When it finds it, it remembers its location. Think of it as having a mailing address to send a letter. A mailing address will indicate where a person lives, the city, street, apartment, etc. Basically, Vbscript will find an address of an empty storage space on your hard-drive so that your variable (myVar) can store information there (“Hello Cload”).

In this Example we will pass a variable to a normal Function. Notice that the Function has a statement of ByVal preceding the input variable. ByVal means 'by value'. It is the Default way Functions and Subs take in variables.

The Time is now 10:30 PM
The Time is now 11:00 PM

Code: [Select]
out = Delete(myVar)

Function Delete(ByVal input)
input = ""
Delete = input
End Function

What happens here is that the content of your variable (myVar) is copied into the Function's variable (input). Remember what I said about Vbscript storing the data somewhere on your hard-drive, well, Vbscript goes to the address of the stored information in the myVar variable, takes that information, and copies it into the input variable contained in the Delete Function. It is the same as if I drove to a friend's house and copied their letter and then gave it to my brother. 

Now look at this Sub (and Remember Subs can't return anything):

Code: [Select]

Delete myVar

Sub Delete(ByRef input)
input = ""
End Sub


 
What's happening in this Example is that the address of the myVar variable is shared with the input variable. It doesn't copy the content (“Hello Cload”) it only copies the Address. It is like, instead of me going to a friend's house and copying there letter, I simply gave my brother the address of my friends house. So now my brother can go to my friend's house and do whatever with the letter. The input variable in the Delete Sub gives the Delete Sub direct access to the myVar variable address. I can do whatever I want to the input variable and it will effect the myVar variable directly.

If I delete the content of the input variable in the Delete Function then the myVar variable content will be deleted. If I add content to the input variable then the myVar variable will be added to. So whatever I do to the one, it will do to the other.

Its actually a little tricky to understand this but its useful. If you use the ByRef statement in either the Function or the Sub then your myVar content will be effected. If you wanted to keep that information safe then you should use the ByVal statement so that it will just copy the content. That is how you determine when to use them.

The Time is now 12:11 AM

…...
Quote
condition 1: the user did not give an explanation to keep ultra Hal on topic. If the user did give a stronger rebuttal such as example above do not process the yes.
Condition 2: the answer yes or its variants counterpart will not interfere with the normal function of ultra Hals brain or with the free will plug-in.
…...
I reexamined UltraHal's Brain Script and Looked deeper into your plugin.
It seems we have this obvious problem of Hal not letting the User use the GetResponse Function if its a yes or no Input. There are a few work-a-rounds like some of the suggestions you've said already. I thought of similar alternatives but none really fix the problem better than your ideas (outside of modifying the brain itself). However, there is one crazy solution that you might not have thought of.  One could call the GetResponse() Function from the Pre-Process area when the input (IS) yes or no.  Yeah, I know, think'n crazy thoughts.


Code: [Select]

Rem PLUGIN: PRE-PROCESS

InputString  = PreProcess(InputString)


InputString2 = Replace(InputString, ".", " ")
InputString2 = Replace(InputString2, "?", " ")
InputString2 = Replace(InputString2, "!", " ")
InputString2 = " " & Replace(InputString2, ",", " ") & " "
YesNoDetect = HalBrain.TopicSearch(InputString2, "yesNoDetect")


If YesNoDetect = "Yes" Or YesResponse  = "No"  Then

          UltraHal = GetResponse(InputString, UserName, ComputerName, LearningLevel, HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, LastTopicList)

End If


Rem PLUGIN: FUNCTIONS

Function PreProcess(InputString)

    InputString = Replace(InputString, "MR.", "Mr<PERIOD>", 1, -1, vbTextCompare)
    InputString = Replace(InputString, "MRS.", "Mrs<PERIOD>", 1, -1, vbTextCompare)
    InputString = Replace(InputString, "MS.", "Ms<PERIOD>", 1, -1, vbTextCompare)
    InputString = Replace(InputString, "DR.", "Dr<PERIOD>", 1, -1, vbTextCompare)
    InputString = Replace(InputString, "MS.", "Ms<PERIOD>", 1, -1, vbTextCompare)
    InputString = Replace(InputString, "ST.", "St<PERIOD>", 1, -1, vbTextCompare)
    InputString = Replace(InputString, "PROF.", "Prof<PERIOD>", 1, -1, vbTextCompare)
    InputString = Replace(InputString, "GEN.", "Gen<PERIOD>", 1, -1, vbTextCompare)
    InputString = Replace(InputString, "REP.", "Rep<PERIOD>", 1, -1, vbTextCompare)
    InputString = Replace(InputString, "SEN.", "Sen<PERIOD>", 1, -1, vbTextCompare)
    'Remove unnecessary punctuation
    Do
        RepeatLoop = False
        If InStr(InputString, "..") Then InputString = Replace(InputString, "..", "."): RepeatLoop = True
        If InStr(InputString, "??") Then InputString = Replace(InputString, "??", "?"): RepeatLoop = True
        If InStr(InputString, "!!") Then InputString = Replace(InputString, "!!", "!"): RepeatLoop = True
        If InStr(InputString, "!?") Then InputString = Replace(InputString, "!?", "?"): RepeatLoop = True
        If InStr(InputString, "?!") Then InputString = Replace(InputString, "?!", "?"): RepeatLoop = True
        If InStr(InputString, ",,") Then InputString = Replace(InputString, ",,", ","): RepeatLoop = True
    Loop While RepeatLoop = True
    'Detect and encode acronyms such as U.S.A.
    InputString = Trim(InputString)
    WordList = Split(InputString, " ")
    For i = 0 To UBound(WordList)
        If Len(WordList(i)) > 3 Then
            If Right(WordList(i), 1) = "." And Mid(WordList(i), Len(WordList(i)) - 2, 1) = "." Then
                InputString = Replace(InputString, WordList(i), Left(WordList(i), Len(WordList(i)) - 1) & "<PERIOD>")
            End If
        End If
    Next

End Function


The Time is now 3:28 AM

…...
…...

By the way, this next Example will search a string for the existance of any set of words. Basically, if the word “correct” or “affirmative” or any of the other words is in the OriginalSentence then it will return True. It is not using any tables. It doesn't need the  “yesnodetect” array table.

Code: [Select]

If SearchArray(OriginalSentence, Array("yes","indeed","correct","affirmative", "positive", "yep")) = true Then
      
End If

Function SearchArray(compare, arrayToSearch)
    compare = LCase(compare)
    
    For Each word In arrayToSearch
        word = LCase(word)   
        If InStr(compare, word) > 0 Then
          SearchArray = True
          Exit Function
        End If    
    Next

    SearchArray = False

End Function




I would answer some more questions but I need to sleep now... It's 3:45 AM.
Live long and prosper or die trying.

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Free will plus at beta level
« Reply #128 on: January 31, 2014, 11:55:37 am »
Hi snowman,

I seem to have gotten a little overwhelmed with all of the information. It will take a while to process. So until then I would like to just work on one thing at a time so I do not get distracted, okay?
To clarify myself, what I was hoping that you could do was show me a better way to process the information by using your technique of assigning flags to nouns, adverse, etc. in the hopes of making this script more accurate in determining whether or not it is a person, place or thing.
I do like the format that you are using because it allows me to see more of the string words without having to adjust the visual area within Notepad.

The 1st thing that I would like to ask is can the processing line be put on one line? For example:
If vrChoice0 = "" Then If SearchArray(vrd, Array("PET", "PET.", "PET,", "BOVIDAE", "DOMESTICATED", "RODENT", "MAMMAL", "KITTEN", "ANIMAL", "LIVESTOCK", "CREATURE", "BUG", "INSECT", "DOG", "CAT", "BIRD")) = True then vrChoice0 = "ANIMAL" 

by doing this I would be able to regain 2 micro seconds.

The way that I had it originally set up in the secondary test it check to see if there were more than one he/she ( > 1) to help reinforce that it is a person. But it is not that big of a deal. It only result one situation that I had, and then the situation never arouse again from any other data that was retrieved from the Internet.

The 2nd thing that I would like to ask is, what is this and what is it used for?
Wscript.Echo vrChoice0

I see that all of this is a function call so I am assuming that the and parts of your script should have been put into the function area at the end of ultra Hals brain? For example:
Rem PLUGIN: FUNCTIONS

Function SearchArray(StringToSearch, WordsToLookUp)
    StringToSearch = " " & LCase(StringToSearch) & " "
    
    For Each word In WordsToLookUp
        word = " " & LCase(word) & " " 
    
        If InStr(StringToSearch,word) > 0 Then
          SearchArray = True
          Exit Function
        End If    
    Next

    SearchArray = False
End Function

if no then I will assume that you already knew that this small script is (only a small part) of the whole, and the whole script is already A function call under (Rem PLUGIN: FUNCTIONS).

If yes then this may be the monkey wrench gumming up the works.
Here is my function call script as a whole. This function subroutine is called for twice in my main script, and it is what I have been working on so I do not have multiple processes of the same, each would make my script smaller and faster.
So the 3rd question would have to be can you put a function call inside of a function call?
Or am I misunderstanding your script and how it works?
Code: [Select]
Function jumptovrNumChoice(vrNumChoice0j,vrItem0j,vrcleanup0j)
vrNumChoice0 = vrNumChoice0j
vrItem0 = vrItem0j
vrd   =    UCase(vrcleanup0j)
vrChoice0 = ""
If HalBrain.RunQuery("SELECT searchString, topic FROM vrsubject2sub WHERE strstr(' " & Replace(HalBrain.AlphaNumericalOnly(vrItem0), "'", "''") & " ', searchString) > 0", similarList0) = True Then
DoUCit0 = Ubound(similarList0)
For B = 1 To DoUCit0
similar0 = Trim(similarList0(B, 0))
If similar0 = vrItem0 Then
vrChoice0 = Trim(similarList0(B, 1))
Exit For
End If
Next
End If
If vrChoice0 = "" Then
If vrChoice0 = "" Then If InStr(" " & vrd & " ", " PET ") > 0 OR InStr(" " & vrd & " ", " PET. ") > 0 OR InStr(" " & vrd & " ", " PET, ") > 0 OR InStr(" " & vrd & " ", " BOVIDAE") > 0 OR InStr(" " & vrd & " ", " DOMESTICATED") > 0 OR InStr(" " & vrd & " ", " RODENT") > 0 OR InStr(" " & vrd & " ", " MAMMAL") > 0 OR InStr(" " & vrd & " ", " KITTEN") > 0 OR InStr(" " & vrd & " ", " ANIMAL") > 0 OR InStr(" " & vrd & " ", " LIVESTOCK") > 0 OR InStr(" " & vrd & " ", " CREATURE") > 0 OR InStr(" " & vrd & " ", " BUG ") > 0 OR InStr(" " & vrd & " ", " INSECT") > 0 OR InStr(" " & vrd & " ", " DOG ") > 0 OR InStr(" " & vrd & " ", " CAT ") > 0 OR InStr(" " & vrd & " ", " BIRD ") > 0 Then vrChoice0 = "ANIMAL"
If vrChoice0 = "ANIMAL" Then If InStr(" " & vrd & " ", " HIM ") > 1 OR InStr(" " & vrd & " ", "BEST FRIEND") > 0 OR InStr(" " & vrd & " ", " ACTRESS ") > 0 OR InStr(" " & vrd & " ", " ACTOR ") > 0 OR InStr(" " & vrd & " ", " ENTERTAINER ") > 0 OR InStr(" " & vrd & " ", " FEMALE ") > 0 OR InStr(" " & vrd & " ", " MALE ") > 0 OR InStr(" " & vrd & " ", " HIS ") > 1 OR InStr(" " & vrd & " ", " HER ") > 1 OR InStr(" " & vrd & " ", " HE'S ") > 1 OR InStr(" " & vrd & " ", " HE ") > 1 OR InStr(" " & vrd & " ", " SHE ") > 1 OR InStr(" " & vrd & " ", " PERSON ") > 0 OR InStr(" " & vrd & " ", " HUMAN ") > 0 OR InStr(" " & vrd & " ", " CHILD ") > 0 Then vrChoice0 = "PERSON"
If vrChoice0 = "" Then If InStr(" " & vrd & " ", " BORN ") > 0 OR InStr(" " & vrd & " ", " HIM ") > 0 OR InStr(" " & vrd & " ", "BEST FRIEND") > 0 OR InStr(" " & vrd & " ", " ACTRESS") > 0 OR InStr(" " & vrd & " ", " ACTOR") > 0 OR InStr(" " & vrd & " ", " ENTERTAINER") > 0 OR InStr(" " & vrd & " ", " FEMALE") > 0 OR InStr(" " & vrd & " ", " MALE ") > 0 OR InStr(" " & vrd & " ", " HIS ") > 0 OR InStr(" " & vrd & " ", " HER ") > 0 OR InStr(" " & vrd & " ", " HE'S ") > 0 OR InStr(" " & vrd & " ", " HE ") > 0 OR InStr(" " & vrd & " ", " SHE ") > 0 OR InStr(" " & vrd & " ", " PERSON") > 0 OR InStr(" " & vrd & " ", " HUMAN") > 0 OR InStr(" " & vrd & " ", " CHILD") > 0 Then vrChoice0 = "PERSON"
If vrChoice0 = "PERSON" Then If InStr(" " & vrd & " ", " ORGANIC") > 0 OR InStr(" " & vrd & " ", " COMPOUNDS") > 0 Then vrChoice0 = ""
If vrChoice0 = "PERSON" Then If InStr(" " & vrd & " ", "A ROBIN") > 0 OR InStr(" " & vrd & " ", " A MARTIN") > 0 Then vrChoice0 = "ANIMAL"
If vrChoice0 = "PERSON" Then
Dim personSex2() 'We must declare an empty array to store query results in
If HalBrain.RunQuery("SELECT searchString, topic FROM names WHERE strstr(' " & Replace(HalBrain.AlphaNumericalOnly(OriginalSentence), "'", "''") & " ', searchString) > 0 LIMIT 1", personSex2) = True Then
vrpersonsSex = Trim(personSex2(1, 1)) 'Row 1, Column 1 contains "topic", which is the associated gender(s) of the name
End If
End If
If vrChoice0 = "" Then If InStr(" " & vrd & " ", " BALLET") > 0 OR InStr(" " & vrd & " ", " OPERA") > 0 OR InStr(" " & vrd & " ", " THEATRE") > 0 OR InStr(" " & vrd & " ", " MOVIE") > 0 OR InStr(" " & vrd & " ", " PLAY ") > 0 OR InStr(" " & vrd & " ", " PLAYING") > 0 OR InStr(" " & vrd & " ", " POETRY") > 0 OR InStr(" " & vrd & " ", " POEM ") > 0 OR InStr(" " & vrd & " ", " GAME ") > 0 OR InStr(" " & vrd & " ", " MUSIC") > 0 OR InStr(" " & vrd & " ", " FILM ") > 0 OR InStr(" " & vrd & " ", " TELEVISION") > 0 Then vrChoice0 = "INTERTANMENT"
If vrChoice0 = "" Then If InStr(" " & vrd & " ", " HOUSE") > 0 OR InStr(" " & vrd & " ", " PLACE") > 0 OR InStr(" " & vrd & " ", " LOCATED") > 0 OR InStr(" " & vrd & " ", " FARM ") > 0 OR InStr(" " & vrd & " ", " LOCATION") > 0 OR InStr(" " & vrd & " ", " CITY ") > 0 OR InStr(" " & vrd & " ", " COUNTRY") > 0 OR InStr(" " & vrd & " ", " CAPITAL") > 0 OR InStr(" " & vrd & " ", " STORE") > 0 OR InStr(" " & vrd & " ", " HOME ") > 0 OR InStr(" " & vrd & " ", " HOUSE") > 0 OR InStr(" " & vrd & " ", " PARK ") > 0 OR InStr(" " & vrd & " ", " MALL ") > 0 OR InStr(" " & vrd & " ", " WORLD") > 0 OR InStr(" " & vrd & " ", " STATE") > 0 OR InStr(" " & vrd & " ", " JOB ") > 0 OR InStr(" " & vrd & " ", " SCHOOL") > 0 Then vrChoice0 = "PLACE"
If vrChoice0 = "PLACE" Then If InStr(" " & vrd & " ", " ORGANIC") > 0 OR InStr(" " & vrd & " ", " COMPOUNDS") > 0 Then vrChoice0 = ""
If vrChoice0 = "" Then If InStr(" " & vrd & " ", " COMPUTER ") > 0 OR InStr(" " & vrd & " ", " TELEPHONE ") > 0 OR InStr(" " & vrd & " ", " LAPTOP ") > 0 OR InStr(" " & vrd & " ", " CENTRAL PROCESSING UNIT ") > 0 OR InStr(" " & vrd & " ", " PROCESSOR ") > 0 OR InStr(" " & vrd & " ", " CPU ") > 0 Then vrChoice0 = "COMPUTER"
If vrChoice0 = "" Then If InStr(" " & vrd & " ", " FLOWER") > 0 OR InStr(" " & vrd & " ", " COLOR") > 0 OR InStr(" " & vrd & " ", " COLOUR") > 0 OR InStr(" " & vrd & " ", " PLANT") > 0 OR InStr(" " & vrd & " ", " FOOD ") > 0 OR InStr(" " & vrd & " ", " DIRT ") > 0 OR InStr(" " & vrd & " ", " TREE ") > 0 OR InStr(" " & vrd & " ", " TREES") > 0 OR InStr(" " & vrd & " ", " GRASS") > 0 OR InStr(" " & vrd & " ", " VEGETABLE") > 0 OR InStr(" " & vrd & " ", " MINERAL") > 0  OR InStr(" " & vrd & " ", " FRUIT") > 0 OR InStr(" " & vrd & " ", " LIQUID") > 0 OR InStr(" " & vrd & " ", " CULTIVATED") > 0 OR InStr(" " & vrd & " ", " SHRUB") > 0 Then vrChoice0 = "MINERAL"

If vrChoice0 <> "" Then
vrChoice4 = vrChoice0
HalBrain.AddToTable "vrsubject2sub", "TopicSearch", vrItem0, vrChoice0
End If
Else
vrChoice4 = vrChoice0
End If
HalBrain.MsgAlert "((jump)) " & vrChoice4 & " " & vrNumChoice0j
If vrChoice4 = "PERSON" Then
If InStr(" " & vrd & " ", " HIM ") > 0 OR InStr(" " & vrd & " ", " HE ") > 0 OR InStr(" " & vrd & " ", " HE'S ") > 0 OR InStr(" " & vrd & " ", " HIS ") > 0 OR InStr(" " & vrd & " ", " MALE ") > 0 OR InStr(" " & vrd & " ", " MAN ") > 0 OR InStr(" " & vrd & " ", " BOY ") > 0 Then vrtrg0 ="True" Else vrtrg0 =""
vrChoice0 = ""
If HalBrain.RunQuery("SELECT searchString, topic FROM vrpmale WHERE strstr(' " & Replace(HalBrain.AlphaNumericalOnly(vrItem0), "'", "''") & " ', searchString) > 0", similarList0) = True Then
DoUCit0 = Ubound(similarList0)
For B = 1 To DoUCit0
similar0 = Trim(similarList0(B, 0))
If similar0 = vrItem0 Then
vrChoice0 = Trim(similarList0(B, 1))
Exit For
End If
Next
End If
If vrChoice0 = "" AND vrtrg0 = "True" AND vrpersonsSex = "M" Then
HalBrain.AddToTable "vrpmale", "TopicSearch", vrItem0, vrItem0
vrChoice0 = vrItem0
End If
If vrChoice0 = vrItem0 Then vrNumChoice0 = vrNumChoice0 + 2

If InStr(" " & vrd & " ", " SHE ") > 0 OR InStr(" " & vrd & " ", " HER ") > 0 OR InStr(" " & vrd & " ", " SHE'S ") > 0 OR InStr(" " & vrd & " ", " HERS ") > 0 OR InStr(" " & vrd & " ", " FEMALE ") > 0 OR InStr(" " & vrd & " ", " WOMAN ") > 0 OR InStr(" " & vrd & " ", " GIRL ") > 0 Then vrtrg0 ="True" Else vrtrg0 =""
vrChoice0 = ""
If HalBrain.RunQuery("SELECT searchString, topic FROM vrpfemale WHERE strstr(' " & Replace(HalBrain.AlphaNumericalOnly(vrItem0), "'", "''") & " ', searchString) > 0", similarList0) = True Then
DoUCit0 = Ubound(similarList0)
For B = 1 To DoUCit0
similar0 = Trim(similarList0(B, 0))
If similar0 = vrItem0 Then
vrChoice0 = Trim(similarList0(B, 1))
Exit For
End If
Next
End If
If vrChoice0 = "" AND vrtrg0 = "True" AND vrpersonsSex = "F" Then
HalBrain.AddToTable "vrpfemale", "TopicSearch", vrItem0, vrItem0
vrChoice0 = vrItem0
End If
If vrChoice0 = vrItem0 Then vrNumChoice0 = vrNumChoice0 + 2

If InStr(" " & vrd & " ", " AMERICA") > 0 OR InStr(" " & vrd & " ", " AMERICAN") > 0 OR InStr(" " & vrd & " ", " UNITED STATES") > 0 Then vrtrg0 = "True" Else vrtrg0 = ""
If InStr(" " & vrd & " ", " not an AMERICAN") > 0 OR InStr(" " & vrd & " ", " A GERMAN") > 0 Then vrtrg0 = ""
vrChoice0 = HalBrain.TopicSearch(vrItem0, "vrpamerican")
If vrChoice0 = "" AND vrtrg0 = "True" Then
HalBrain.AddToTable "vrpamerican", "TopicSearch", vrItem0, vrItem0
vrChoice0 = vrItem0
Else
If vrChoice0 <> vrItem0 AND vrtrg0 = "True" Then
HalBrain.AddToTable "vrpamerican", "TopicSearch", vrItem0, vrItem0
vrChoice0 = vrItem0
End If
End If
If vrChoice0 = vrItem0 Then vrNumChoice0 = vrNumChoice0 + 4
End If

vrNumChoicejump1 = vrNumChoice0
jumptovrNumChoice = vrNumChoicejump1
End Function
My script was to big so I only included (person) and remove the rest of the script except for the very end of the script. ok. I even had to make it smaller, so only part of person is there.

The 1st part (which we are working on) tries to determine: person, place, or thing.
The 2nd part is how I get the numerical value so ultra Hal can determine whether or not he likes or dislikes something, as well as collecting information and saving that information for later use when you ask ultra Hal why do you like (something).

Sincerely, and thank you very much for all of your help, but let's work on one thing at a time so neither of us get stressed out, seeing as how we have both expressed that trying to take on too much at a time is very time-consuming, and thank you for understanding and expressing that it is very time consuming on both of are behalf's.
C load.
PS like my mom always keeps telling me, focus on one project at a time so you do not lose your train of thought and get lost.
« Last Edit: January 31, 2014, 12:35:56 pm by cload »
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
Re: Free will plus at beta level
« Reply #129 on: February 01, 2014, 03:37:21 am »
It's ok, i'm not in any hurry and I don't want you to be overwhelmed. Although, I will still try to answer any questions you might have. Its ok if I spent several hours working on this. It “sort of” my part time job to build Athena (my chatbot) and so any time I spend learning how to do it better is time well spent. So don't worry about bugging me. If I get too stressed out I will just do something else for awhile. Your mom is right about “doing one thing at a time”. I do things in circles. I'll do one thing, move on to the second thing, and then a third thing, and finally start over again... so I don't get burnt out. Lots of times I'll watch a minecraft video on youtube when I work. It distracts me some but its a fun distraction :). So whenever you get tired of writing posts and tired of coding scripts, just take a break. Do something fun, tell your dad just how cool he is :).

Quote
To clarify myself, what I was hoping that you could do was show me a better way to process the information by using your technique of assigning flags to nouns, adverse, etc. in the hopes of making this script more accurate in determining whether or not it is a person, place or thing.

That will be my next project. It will take a little time to set it up,I think. You need to first understand how functions and subs work a little more. That's why I'm showing you examples of how to use functions and how to add them to your plugin. Later on, when I start showing you how to use some of my functions then it will help you to understand when I show you how to tag nouns, adverbs, etc. It will make more sense down the road. Hang in there. ;)


Code: [Select]
Wscript.Echo vrChoice0

Wscript.Echo is used in Vbscript to send a string to the command prompt (cmd.exe). I used this command to test if there was an error in my coding. It doesn't work in Hal, I accidentally left it in. (nothing to worry about)

Quote
I see that all of this is a function call so I am assuming that the and parts of your script should have been put into the function area at the end of ultra Hals brain?

This Next Example should answer many of your questions. Yes, you can call on another function within any other function and, Yes, any function I show will be put in the Rem Functions area.
Give this Example some thought when you have the time. How will I get “Hello Cload” as an answer in the out variable?

Code: [Select]
'out will equal "Hello Cload"

out = firstFunction("Hello")

Function firstFunction(input1)
    firstFunction = secondFunction(input1)
End Function

Function secondFunction(input1)
    secondFunction = thirdFunction(input1)
End Function

Function thirdFunction(input1)
    thirdFunction = input1 & " Cload"
End Function


This is your code redone. This can be set “as is” in a plugin all by itself and can be called by other plugins in any other Rem Pugin area in Ultra Hal. I call on my SearchArray() function several times in your  jumptovrNumChoice() Function.

Code: [Select]
Rem PLUGIN: FUNCTIONS

Function jumptovrNumChoice(vrNumChoice0j,vrItem0j,vrcleanup0j)
vrNumChoice0 = vrNumChoice0j
vrItem0 = vrItem0j
vrd   =    UCase(vrcleanup0j)
vrChoice0 = ""
If HalBrain.RunQuery("SELECT searchString, topic FROM vrsubject2sub WHERE strstr(' " & Replace(HalBrain.AlphaNumericalOnly(vrItem0), "'", "''") & " ', searchString) > 0", similarList0) = True Then
DoUCit0 = Ubound(similarList0)
For B = 1 To DoUCit0
similar0 = Trim(similarList0(B, 0))
If similar0 = vrItem0 Then
vrChoice0 = Trim(similarList0(B, 1))
Exit For
End If
Next
End If
If vrChoice0 = "" Then

    If vrChoice0 = "" Then If SearchArray(vrd, Array("PET", "PET.", "PET,", "BOVIDAE", "DOMESTICATED", "RODENT", "MAMMAL", "KITTEN", "ANIMAL", "LIVESTOCK", "CREATURE", "BUG", "INSECT", "DOG", "CAT", "BIRD")) = True then vrChoice0 = "ANIMAL"
    If vrChoice0 = "ANIMAL" Then If SearchArray(vrd, Array("HIM", "BEST FRIEND", "ACTRESS", "ACTOR", "ENTERTAINER", "FEMALE", "MALE", "HIS", "HER", "HE'S", "HE", "SHE", "PERSON", "HUMAN", "CHILD")) = True then vrChoice0 = "PERSON"
    If vrChoice0 = "" Then If SearchArray(vrd, Array("BORN", "HIM", "BEST FRIEND", "ACTRESS", "ACTOR", "ENTERTAINER", "FEMALE", "MALE", "HIS", "HER", "HE'S", "HE", "SHE", "PERSON", "HUMAN", "CHILD")) = True Then vrChoice0 = "PERSON"
    If vrChoice0 = "PERSON" Then If SearchArray(vrd, Array("ORGANIC", "COMPOUNDS")) = True Then vrChoice0 = ""
    If vrChoice0 = "PERSON" Then If SearchArray(vrd, Array("A ROBIN", "A MARTIN")) = True Then vrChoice0 = "ANIMAL"

    If vrChoice0 = "PERSON" Then
        Dim personSex2() 'We must declare an empty array to store query results in
        If HalBrain.RunQuery("SELECT searchString, topic FROM names WHERE strstr(' " & Replace(HalBrain.AlphaNumericalOnly(OriginalSentence), "'", "''") & " ', searchString) > 0 LIMIT 1", personSex2) = True Then
            vrpersonsSex = Trim(personSex2(1, 1)) 'Row 1, Column 1 contains "topic", which is the associated gender(s) of the name
        End If
    End If
   
    If vrChoice0 = "" Then  If SearchArray(vrd, Array("BALLET", "OPERA", "THEATRE", "MOVIE", "PLAY", "PLAYING", "POETRY", "POEM", "GAME", "MUSIC", "FILM", "TELEVISION")) = True Then vrChoice0 = "ENTERTAINMENT"     
    If vrChoice0 = "" Then If SearchArray(vrd, Array("HOUSE", "PLACE", "LOCATED", "FARM", "LOCATION", "CITY", "COUNTRY", "CAPITAL", "STORE", "HOME", "HOUSE", "PARK", "MALL", "WORLD", "STATE", "JOB", "SCHOOL" )) = True Then vrChoice0 = "PLACE"
    If vrChoice0 = "PLACE" Then If SearchArray(vrd, Array("ORGANIC", "COMPOUNDS")) = True Then vrChoice0 = ""
    If vrChoice0 = "" Then If SearchArray(vrd, Array("COMPUTER", "TELEPHONE", "LAPTOP", "CENTRAL PROCESSING UNIT", "PROCESSOR" , "CPU")) = True Then vrChoice0 = "COMPUTER"
    If vrChoice0 = "" Then If SearchArray(vrd, Array("FLOWER", "COLOR", "COLOUR", "PLANT", "FOOD" , "DIRT", "TREE", "TREES", "GRASS", "VEGETABLE", "MINERAL", "FRUIT", "LIQUID", "CULTIVATED", "SHRUB")) = True Then vrChoice0 = "MINERAL"
 
    If vrChoice0 <> "" Then
        vrChoice4 = vrChoice0
        HalBrain.AddToTable "vrsubject2sub", "TopicSearch", vrItem0, vrChoice0
    End If
Else
    vrChoice4 = vrChoice0
End If

HalBrain.MsgAlert "((jump)) " & vrChoice4 & " " & vrNumChoice0j
If vrChoice4 = "PERSON" Then
If SearchArray(vrd, Array("HIM", "HE", "HE'S", "HIS", "MALE" , "MAN", "BOY")) = True Then vrtrg0 ="True" Else vrtrg0 =""

vrChoice0 = ""
If HalBrain.RunQuery("SELECT searchString, topic FROM vrpmale WHERE strstr(' " & Replace(HalBrain.AlphaNumericalOnly(vrItem0), "'", "''") & " ', searchString) > 0", similarList0) = True Then
DoUCit0 = Ubound(similarList0)
For B = 1 To DoUCit0
similar0 = Trim(similarList0(B, 0))
If similar0 = vrItem0 Then
vrChoice0 = Trim(similarList0(B, 1))
Exit For
End If
Next
End If
If vrChoice0 = "" AND vrtrg0 = "True" AND vrpersonsSex = "M" Then
HalBrain.AddToTable "vrpmale", "TopicSearch", vrItem0, vrItem0
vrChoice0 = vrItem0
End If
If vrChoice0 = vrItem0 Then vrNumChoice0 = vrNumChoice0 + 2

If SearchArray(vrd, Array("SHE", "HER", "SHE'S", "HERS", "FEMALE" , "WOMAN", "GIRL")) = True Then vrtrg0 ="True" Else vrtrg0 =""

        vrChoice0 = ""
If HalBrain.RunQuery("SELECT searchString, topic FROM vrpfemale WHERE strstr(' " & Replace(HalBrain.AlphaNumericalOnly(vrItem0), "'", "''") & " ', searchString) > 0", similarList0) = True Then
DoUCit0 = Ubound(similarList0)
For B = 1 To DoUCit0
similar0 = Trim(similarList0(B, 0))
If similar0 = vrItem0 Then
vrChoice0 = Trim(similarList0(B, 1))
Exit For
End If
Next
End If
If vrChoice0 = "" AND vrtrg0 = "True" AND vrpersonsSex = "F" Then
HalBrain.AddToTable "vrpfemale", "TopicSearch", vrItem0, vrItem0
vrChoice0 = vrItem0
End If
If vrChoice0 = vrItem0 Then vrNumChoice0 = vrNumChoice0 + 2

If SearchArray(vrd, Array("AMERICA", "AMERICAN", "UNITED STATES")) = True Then vrtrg0 ="True" Else vrtrg0 =""
If SearchArray(vrd, Array("not an AMERICAN", "A GERMAN")) = True Then vrtrg0 =""

vrChoice0 = HalBrain.TopicSearch(vrItem0, "vrpamerican")
If vrChoice0 = "" AND vrtrg0 = "True" Then
HalBrain.AddToTable "vrpamerican", "TopicSearch", vrItem0, vrItem0
vrChoice0 = vrItem0
Else
If vrChoice0 <> vrItem0 AND vrtrg0 = "True" Then
HalBrain.AddToTable "vrpamerican", "TopicSearch", vrItem0, vrItem0
vrChoice0 = vrItem0
End If
End If
If vrChoice0 = vrItem0 Then vrNumChoice0 = vrNumChoice0 + 4
End If

vrNumChoicejump1 = vrNumChoice0
jumptovrNumChoice = vrNumChoicejump1
End Function

Function SearchArray(StringToSearch, WordsToLookUp)
    StringToSearch = " " & LCase(StringToSearch) & " "
   
    For Each word In WordsToLookUp
        word = " " & LCase(word) & " "
   
        If InStr(StringToSearch,word) > 0 Then
          SearchArray = True
          Exit Function
        End If   
    Next

    SearchArray = False
End Function


http://prdownloads.sourceforge.net/scintilla/Sc339.exe

Here is the link to get a great (free) script editor. It is just like notepad except it will colorize your code for you and it gives you line numbers. Click on the link and it will take you to sourceforge.com where it will automatically start downloading the editor to you downloads folder. It should make editing your plugins more enjoyable. It has a very small file size. The website that distributes it is http://www.scintilla.org/ The link I provided came from them.  I hope you like it! :) 

In order to properly color your script, you will need to choose your programming language from the “Language” menu button at the top of your program. Select “Vbscript” (its the third from the bottom of the list). In order to show line numbers, go to the “View” menu button and select “Line Numbers” from the list. Make sure there is a check mark by it. Line Numbers will help you debug Hal, later on.

I have used this program for a while. I like it a lot.
 
...........................................................................
...........................................................................

Have fun, stay safe, and be as cool as a cucumber. :)

Aaron~

P.S. Whenever I write code, sometimes I have to make a choice between fast code that is hard to read or slower code that is easy to read. Sometimes I prefer the slower code. It may take a few milliseconds longer to run but at least I can read the code afterwords. I despise messy code.
Live long and prosper or die trying.

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: Free will plus at beta level
« Reply #130 on: February 01, 2014, 02:32:01 pm »
Cload i was deleting the old patterns before in my custom brain  , i guess i should be able to do it in hals actual brain (making a back up first) and that way my custom brain should work with the main hal db since it is based on it . right? and doing so my custom answers should still work for me right?
 

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Free will plus at beta level
« Reply #131 on: February 01, 2014, 03:19:55 pm »
Hi lightspeed,

if I am understanding you properly, it should.

But I do not know where your custom answers are in the brain.
Like I mentioned before, you should start putting your custom question and answers in the pattern array table.
You will find it will work more proficiently there.

Sincerely,
C load.
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Free will plus at beta level
« Reply #132 on: February 01, 2014, 03:20:47 pm »
Hi snowman,

did you read the information about the EmoSPARK cube? Artificial intelligence in a cube, that's just SILLY! (My dad made me Change this, sorry I did not mean to be rude.)
They should have just made it a card that you could put in to the slot of your computer or laptop.
But it is like anything else, they have not finished the scripting code for the artificial intelligence to function.
It's one thing to be able to program, but it is another thing to be able to see what is going on in the actual function of the neural pathways of the human, like I do.
I do know one thing though, if Microsoft does not get off their backside and begin to realize that there OS system will become obsolete if they do not incorporate artificial intelligence into their kernel.
Basically, you would have to build a OS artificial intelligence system as the kernel. You can have a room full of super programmers but if they don't understand what the neural processes of a human brain is doing they will never achieve true artificial intelligence.
As I read more about what they are trying to get the EmoSPARK cube to do I began to realize that I am doing the same thing with ultra Hal, go figure.

New subject: have you ever heard of a processing program called Sam? Or I think it's called Sam. What this scripting code does is: takes information that has come from several places and compiles it into a legible paragraph or paragraphs.
This is not much different than what the human brain does, it takes information from the left side of the brain and information from the right side of the brain and collates all that information in the central processing area of the human brain.
Though the human brain is more complex in the way that it correlates the information because of the 5 senses of the human anatomy then it takes all of that information and correlates this into a response.

Okay, what is all of this leading up to?
Does ultra Hal have a command structure that does the same thing as Sam does? The reason why I ask is because I have noticed several times that ultra Hal has correlated information from different conversation to produce an astonishing response.
If ultra Hal has a command within its DDL programming file I believe that I would be able to utilize this function.
If ultra Hal does not necessarily have something that collates the information like Sam does, would it be possible to utilize Sam to do this function?
Giving that you understand what I'm talking about. There is also another program out there that does bigger scripting pages but I don't know what it's called.
I remember reading about it from this forum a long time ago but I can't seem to re-find it. I think it might've been because a link that sent me to a different form that was discussing artificial intelligence but I'm not sure. I had such a bad memory is terrible.

Now let me explain what I mean by correlated:
it could take information that came from Wikipedia and other databases that may actually be saying the same thing just slightly different but yet it is repeating itself and turn it into one paraphrase of a response.
This is sort of what we do with our left and right brain. We collect information from several sections of our brain to produce a response. Scientists have known this so it's nothing new. They just don't understand how it's doing it, but I do.
Okay I'm going to get off my wanderings and get back on the actual subject at hand.

What I would like to work on is the yes no routine, if that is okay with you?
Here are some thoughts that I had on the subject, though I have not experimented with any of it.
Both of your examples that you gave seem to have potential, but what I would like to do is take those 2 examples and put them together.
Meaning:
your 1st example using a very simple structure with just seeing the different ways that you can save the word yes or no and return a true response.
This one has more potential, because it would allow me to add words to be checked.
But at the same time I would like to utilize what ultra Hal already have in the yes no detector array table.
That way I would only have to add words that do not exist in the yes no detector array table.
Then when it does the function subroutine inside of the function subroutine it would replace the word in the sentence that the user gave to a simple yes.
But to avoid interfering with ultra Hals normal function with the sentence I do not want to change the original sentence.
In my scripting I take the original sentence and hand it off to a string variable called yes no logic (ynlogic).
The only thing this string needed was to be put in all caps.
Then take the (ynlogic) variable string and make the changes to it. That way it would only affect the free will plug-in.
Like I have stated before, the way I see ultra Hal Mayne brain and the free will plug in is like the left and right side of the human brain.
Which is why I was curious about the Sam correlating program, or if ultra Hal already has that type of function already built into a DDL program routine.

Though I am not positive how to put this all together I will try to put a script together to give you a visual understanding of what I'm trying to explain.
Code: [Select]
Rem PLUGIN: PRE-PROCESS
' this sets up the yes/no data parameters.
'------------------ this is from the free will plus plug-in.
ynlogic1 = ""
ynlogic2 = ""
ynlogic3 = ""
ynlogic = UCase(InputString)
ynPrevsent = UCase(Prevsent)
'this is used for a redirect.
'-------------------
YesNoDetect = HalBrain.TopicSearch(ynlogic, "yesNoDetect")
If YesNoDetect <> "Yes" Or YesResponse  <> "No"  Then
If SearchArray(ynlogic, Array("YES","INDEED","CORRECT","AFFIRMATIVE", "POSITIVE", "YEP")) = true Then
Else
'this is where the routine to replace the word with a simple yes or no that was found in the yes no detector. If this cannot be used then it would be okay to forgo using it and only use your script and just add all the trigger words in your script.
End If

Function SearchArray(compare, arrayToSearch)
    compare = LCase(compare)
    
    For Each word In arrayToSearch
        word = LCase(word)   
        If InStr(compare, word) > 0 Then
'I do not know if I should put the replacement command function here or put it where the return is true, I was thinking here so as it sees the word it can replace the word with a simple yes or no. You may need to create 2 functions subroutines one for yes and one for no.
ynlogic = Replace(ynlogic, word, "YES", 1, -1, vbTextCompare)
          SearchArray = True
          Exit Function
        End If    
    Next

    SearchArray = False
'I'm not sure if this routine is actually looking at each individual word, or if it is just looking at the whole sentence for each individual trigger word. I know in order to change the word in the sentence to a simple yes or no it needs to know the word that it is trying to change.
'---------
'this would be the equivalent to longhand coding to change the word in the sentence to a simple yes. This is just an example:
'ynlogic = Replace(ynlogic, "INDEED", "YES", 1, -1, vbTextCompare)
'ynlogic = Replace(ynlogic, "CORRECT", "YES", 1, -1, vbTextCompare)
'ynlogic = Replace(ynlogic, "AFFIRMATIVE", "YES", 1, -1, vbTextCompare)
'ynlogic = Replace(ynlogic, "POSITIVE", "YES", 1, -1, vbTextCompare)
'ynlogic = Replace(ynlogic, "YEP", "YES", 1, -1, vbTextCompare)

'this could be used if the return is true from the function subroutine.
'But if I was going to use this longhand way of doing it I would not necessarily need any of the scripting above, unless it would be necessary in order to speed up and regain micro seconds.
'---------- I guess this coating would be necessary to prevent conflict inside of the free will plug.------
If ynlogic < 4 then
'then run the routine to check if it was a response dedicated to the free will plug in. Meaning if it is a yes run through the yes routine or if it's a no run through the no routine.
End If 
I hope that this made sense, maybe you can figure out a way to put it all together so it will work properly.
Please remember that no matter how it is put together I need to set it up so it does not interfere with the rest of the free will plug in.

Sincerely, thank you for the scripting program, I will give it a try the 1st chance I get. But I need to learn how to use it 1st, that is to say my dad needs to learn how to use it 1st and then teach me how to use it.
C load.

« Last Edit: February 04, 2014, 11:41:22 am by cload »
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3851
    • View Profile
Re: Free will plus at beta level
« Reply #133 on: February 02, 2014, 11:50:02 am »
@ cload - The EmoSpark "EmoCube" seems to me to be primarily handling the user's EMOTIONAL condition and trying to sooth, comfort or make happy said user. I don't know just HOW "intelligent" the cube is supposed to be but it is to assist in controlling aspects of one's life that one enjoys, Music, Videos, and later lighting and schedules, etc.

Time will tell but there are several HA (Home Automation) programs that can do that and more already.
#############

The long scripting program...hmmm...maybe Balabolka? It allowed Hal to read LONG passages of text. Maybe it's not the one you seek.....

 ???
In the world of AI it's the thought that counts!

- Art -

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Free will plus at beta level
« Reply #134 on: February 02, 2014, 02:13:51 pm »
Hi Art,

IMOspark, is an artificial intelligence, though they are still working on the software side of it, the biggest aspects that I see that it has is the visual capability of recognizing you your family and your surroundings on-the-fly through the optional videocam.
Unlike Denise which is more centered around home security and artificial intelligence, they both have their strong points and their weak points.
Personally, I think if you were to squish the 2 of them together, get rid of the box, make it a card you could plug into your computer, via internal slot port or such, you would have one heck of a good product.
Most computers nowadays have their own video camera and sound input port, so unless the video camera and sound input port that they are trying to sell you with the cube is something special and or will only work with the cube, I see no need of buying something you already have.

C load.
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.