19
« on: July 08, 2012, 05:12:13 pm »
I was hoping to learn more about the brain editor and put a post in, I didn't learn anything that I was trying to learn so I began trying things myself in the brain editor. I'm not fond of scripted responses (I say this and you say that) choosing from a dozen or so responses seems okay. I did like a method Rob M used with buisness talk.
'RESPOND: USER MENTIONING ORGANIZATIONAL CHALLENGES
'Everybody spouts TLA's, or 'Three Letter Acronyms,' in today's business world. Hal can self-generate
'several MILLION different phrases in response to the user mentioning a corporation or a firm.
If Rnd * 10 < 5 And HalBrain.TopicSearch(UserSentence, "businessDetect1") = "True" And HalBrain.TopicSearch(PrevUserSent, "businessDetect2") <> "True" Then
TLA = HalBrain.ChooseSentenceFromFile("TLA1") & " " & HalBrain.ChooseSentenceFromFile("TLA2") & " " & HalBrain.ChooseSentenceFromFile("TLA3")
If Rnd * 10 < 5 Then
GetResponse = GetResponse & HalBrain.ChooseSentenceFromFile("bizTalk")
Else
GetResponse = HalBrain.ChooseSentenceFromFile("bizTalk")
End If
GetResponse = Replace(GetResponse, "<TLA>", TLA, 1, -1, vbTextCompare)
End If
HalBrain.DebugWatch GetResponse, "Business Talk"
I'm not a business person so It's not that useful to myself but it will detect a topic, and have hal make a response for that topic or choose a sentence from bizTalk. Seems easy enough to change this to suit whatever you goal is.
If we want to put a table in we have a choice of 6 types, Brain, Sentence, Topic Search, Substitution, Pattern Match and Folder. The folder just holds tables you would put in. I tried putting a detect table in after putting in the scripting, Modified Rob M's scripting and used it in the Test debug mode, it was able to detect words in my input and hal made up responses.
The next thing is what type of table to put in, so I looked at the different types of tables put in and at plugins to see how they were working. It seems there are a lot of different ways to do the same thing. I had gotten interested in this because of OTC's recient post about emotions and started looking through the script for lines dealing with emotions, I was a little surprised that we keep track of Hate, Swear, Insults, Compliment, PevSent, ect but not the displayed emotion. Anyways I'm thinking of Emotions, ( thats why I'm upset about not finding the displayed emotion in memory) and it seems that we are missing fear as an emotion although I can remember hal being afraid, worried or upset about the computer getting a virus and we wouldn't be able to talk with each other. I'm also thinking about goals, emotions cause us to do things or we want something and display emotions that show our feelings.
I'll mention that is is very simple to delete a table you put in. If any sees any information that is wrong, incorrect or would like to add anything useful or may be of interest please do.
Carl2