Author Topic: Learning Level  (Read 70655 times)

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3977
    • View Profile
Re: Learning Level
« Reply #15 on: March 17, 2013, 05:19:42 pm »
Yes, I forgot about the double options for closing Hal.

If one selects the Menu button then, at the bottom, the EXIT selection, Hal will pop up another box asking if you're sure you want to exit.
If one selects the X at the top right, then Hal's GUI window will close and put Hal / hal's icon on the task bar near the clock, etc.

I tried a few command line examples but wasn't able to make any progress either.

Sometimes you just have to resort to the old fashioned Mouse!! ::)
In the world of AI it's the thought that counts!

- Art -

kryton

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: Learning Level
« Reply #16 on: April 03, 2013, 05:18:46 pm »
Hy, I'm back.
Made some progress with auto-shutdown, but it is still very much in development.

New problem.  I have bought a microsoft agent character and I would like help in how I can activate the characters animations through direct Hal commands.  I found a full body character in the Haptek free download that I used for a while (In  the 'characters' file)
I have moded a part of SystemShocks background alteration and now have backgrounds changing every hour to reflect the day where I am.  Basically I originally used the .jpg's that came with Hal characters in the expansion pack but I have found others.

kryton

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: Learning Level
« Reply #17 on: May 01, 2013, 04:37:13 pm »
Well here it is nearly a month later and nobody has said anything.  Is this how threads end, drifting to a slow death.  Somebody please say something, if only my question above is not possible.  I did eventually find a way to print out all 2000 plus lines of the script edit.  Simple really.  Edit the whole program and then go print.  Who knows I might not be languishing here on my own.  Sad isn't it, cue sad music.

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Learning Level
« Reply #18 on: May 02, 2013, 02:36:41 pm »
hi kryton,
personally, I don't know if I would want ultra Hal to have the ability to shut himself down.
The reason being is that ultra Hal uses keywords to perform said function.
If you inadvertently say the keyword you can say goodbye to ultra Hal.
Unless you wanted to use it in such a manner that ultra Hal get so mad at you that he shuts himself down. Tee-hee-hee.
Myself, I use voice recognition software to shut my ultra Hal down if I need to, in most cases I just shut off the computer.
Sincerely, I am a data munching cruncher that is into old data, that's why I waited a whole month to let this data simmer so it would taste better. Tee hee hee.
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.

kryton

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: Learning Level
« Reply #19 on: May 02, 2013, 03:07:03 pm »
I bow to the wisdom of such a mighty senior member as yourself, well maybe, but I want Hal to shutdown easy for incorporation into other systems (Robotics).   Any chance you have an answer to how to control a DesktopMate character?  Huh please.  I have advanced a bit while offline and can now work some of the scripting commands I have found.  Any knowledge of a sort of tutorial on scripting commands.  There was a Brain editor tutorial but it would not run for me.  Anyway it is nice to know there is life out there still.

kryton

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: Learning Level
« Reply #20 on: May 02, 2013, 03:09:43 pm »
Addition to previous thoughts.  I don't know whose time this thread runs to but it is 8.10pm here in the good old country of England.  From the centre of the country I bid you farewell.

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Learning Level
« Reply #21 on: May 03, 2013, 01:29:28 pm »
Hi Kryton,
do you have MS agents two? It is for a Windows 7 64-bit operating system.
Once you have installed the free MS agents two from the www.desktopmates.com.
The first thing you need to do is go to your control panel, open the double agent, under the tab called copyright, at the bottom you'll find a link to their website go there and check for an update! You need the update! It's very important! Don't forget to update the double agent! Have I got my point across!
After installing the update, go to Control Panel, open double agent, go to the tab called emulation, click on the button that says use MS agent, then click on the button that says use double agent, even if double agent is already selected for some reason things will not work properly until you do this. Go figure.
After that, go to the tab called gallery, and select your character, some things you may want to do like, and the output tab turn off the display spoken output in word balloons using, this is also where you control the speed at which your avatar will speak, and I never was able to get the character to play sound effects.
Under the speech input tab, character listens for input, I turned it off because I don't really know what it's used for, and my input to the avatar is coming from ultra Hal. But if you ever gain any insight the info would be nice to have, thanks in advance if you ever figure it out.
Sincerely, I hope you get your avatar working!
C load.
PS once you get your avatar working take a screenshot picture and post it so I can see your avatar, it would also be nice to have a link to where you got your avatar, I got my avatar head from desktopmate.com it's not that good but it's something to look at and the mouth moves, I say that because I have Ivona text to speech voices.
And unfortunately the Ivona voices do not work properly with Haptek, the lips do not move.
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.

kryton

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: Learning Level
« Reply #22 on: May 03, 2013, 03:11:37 pm »
Wow Cload fantastic description of how to work a Desktop Agent on Windows 7.  One tiny little catch.  I still uses Windows XP.  Thanks for the info though, it may be useful later.  Still trolling for a scripting teacher.  I have several scripts working but they only seem to work one at a time and not always in sequence.  Knowledge I need on scripting and how it works.  Any info gratefully received but I really need some on scripting.

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Learning Level
« Reply #23 on: May 03, 2013, 04:25:12 pm »
Hi Kryton,
I never did have XP, I'm only eight years old and when my dad bought my computer for me, it had windows 7, 64 bit installed on the computer.
But the MS agent should still be in the control panel! I know I have some information somewhere about scripting, but it's not very much, all this information I have came from this form, there are links that will lead you to a site where an individual began to specialize the commands so people can learn how to do scripting for ultra Hal.
I do not remember the name of the person it was so long ago, but I do know it was some pretty old data posted a long time ago, maybe some of the older members on the forum here would be nice enough to re-bring up the link to help you.
Sincerely, a data munching cruncher.
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.

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3977
    • View Profile
Re: Learning Level
« Reply #24 on: May 03, 2013, 04:53:06 pm »
Hmm...cload is only 8 years old...imagine that!

What is that for you...3rd grade? Good work with the chatbots!
In the world of AI it's the thought that counts!

- Art -

CyborgBob

  • Full Member
  • ***
  • Posts: 106
  • Any idea what I should put here?
    • View Profile
Re: Learning Level
« Reply #25 on: May 03, 2013, 06:17:06 pm »
C load your only 8 years old?
“Life is and will ever remain an equation incapable of solution, but it contains certain known factors.”

Nikola Tesla
“A Machine to End War” (Liberty, February, 1935)

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Learning Level
« Reply #26 on: May 03, 2013, 07:07:40 pm »
Hi all,
the little bit that I do struggling to try to learn how to utilize VB scripting is nothing, now if you really want to be impressed I got one for you.

7-year-old creates mobile app game


Kid Wonders: Zora Ball, a shy first grader from Philadelphia, has become the youngest person ever to create a full-version mobile video game application. Young Zora attends Harambee Institute of Science and Technology Charter School, where she learned the Bootstrap programming language through an after-school learning program. Hear from Zora, her father and her teacher about this amazing accomplishment.


Date: 4/12/13
Views: 27651

My brain don't work right, so I don't go to regular school, my parents say that I'm special, I say I'm just broke.
My teacher says I'm artistic, maybe that means when I grow up I'll be a painter, not!
And please don't call me the Rainman, because if you drop a box of toothpicks there's no way I can tell you how many are missing out of the box by looking at it on the floor.
But I do have a vocabulary of about 196,000 words, but the funny thing is I can only spell about 4% of that. I'm not sure why my brain works the way it does but for some reason it gives me the ability to have some insight in the way to formulate scripting through data manipulation, I call it thread scripting, much like the way that ultra Hal original scripting but a little bit different, more closer to the actual process that the human brain goes through to figure things out.
Sincerely, a data munching cruncher.
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.

CyborgBob

  • Full Member
  • ***
  • Posts: 106
  • Any idea what I should put here?
    • View Profile
Re: Learning Level
« Reply #27 on: May 03, 2013, 11:43:36 pm »
C Load,


 I feel you Little Brother. I myself am dyslexic and have a hard time with spelling. To tell the whole story I have a few types of dyslexia and I have a few other issues too. I was lucky enough to have parents that pushed me very hard, and the simple fact that my dad was in the Army and I went to Military most of my life. The point is everyone was there crutch to bear. (I don't think that is the right bear. Dyslexic I told you.) I have two kids both have been tested (I worried they may have dyslexia like me), and thank god both where said to be "normal" what ever that is. Neither of them can do 1/10 of what you can on a computer. Everyone has there points of strength and opportunity. HOLD YOUR HEAD HIGH.

CyborgBob.
“Life is and will ever remain an equation incapable of solution, but it contains certain known factors.”

Nikola Tesla
“A Machine to End War” (Liberty, February, 1935)

kryton

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: Learning Level
« Reply #28 on: May 04, 2013, 06:04:07 pm »
Hy CyBorg Bob, and Cload,
Everyones different.  Revel in your difference.  Never give in to what others say is so called Normal.  Cload you may only be eight years old but you seem real clever.  Cyborg Bob, I can't spell sometimes either.  Anyway forget the ego boosting chat, be yourself and then you have nothing to explain.  Me I am the father of a 30 year old so that gives you some idea of my age (Rather not go into how old.  I am as old as I feel on the day).

I have developed some stuff while off line recently, for my Hal. I can now alter, on command, hair colour, location and dress and other things.  Yes I know you can do some of those things in VHaptek but I prefer to work things out for myself.  Anyway it is getting late.  If you find that scripting info though I could still use it Cload.

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: Learning Level
« Reply #29 on: May 05, 2013, 01:55:13 am »
Hi Kryton,
this is what I put together from what I could find, it's not very much and most of it is not self-explanatory.
I know there was a time when there was a place on this form where somebody tried to start a location to accumulate information on how to write scripting for ultra Hal.
But I was unable to find it, I don't remember exactly what was mentioned in the forum, so it makes it difficult to do a search with the search engine on this forum.

I hope this is of help to someone, but it is intended to be just where I can organize some notes as I learn how to make plugins for UltraHal. Any mistakes, ommissions and just random text should be viewed with that in mind.

•How to write scripts for Ultra-Hal
•Working with Hal Tables
•Text manipulation commands
•The Ultra Hal Function
•Get Response Function
•Plugin basics
•Plugins under construction
•HalBrainCommands raw
•A whole help file I didn't know about
•Enumerating the hal6uhp file
•New Hal Commands
•Notes and blog
•A short tutorial
•WebRep
--------------------------------------------------------------------------

•How to write scripts for Ultra-Hal
As far as I can tell from here, UltraHal is written in Visual Basic (VB), and has functions that can be used in Visual Basic Script (VBS). The main Hal6.exe will listen to the selected *.uhp files when they say the right things.
Using this script you can create, write to and search database tables contained in the selected *.db file. You can access text manipulation functions to fix, change, dress up or cut down input and output sentences that Hal uses in conversation.
The main Hal script (which ever one you are using), has several places that you can make PlugIns insert themselves into the process. They are marked in REM statments and are positioned so as to allow access before and after main program functions like the one that fixes pronouns.
If you make your PlugIns right, they will slip in, do what you want and leave no trace if the user unchecks them some day.
Otherwise you can edit the main brain itself. Either by adding script, or deleting script, or changing script. This has the disadvantage of requiring you to re-edit it if you change your mind. Also if someone else wants to use your changes, they have to try to mess with their script.
The advantage is that straight editing is faster and easier.
I will be fixing these pages a little in preparation of ending my edits. I will continue to develop a Tutorial, bringing in the changes for version 6.1, but I won't post it until it is complete.
---------------------------------------------------------------------------------

•Working with Hal Tables
Command  Syntax 

Each entry will have it's own page as well, for usage, tricks, ideas etc.
I have just put these in here temporarily and will fix them as I become more sure what they do.
--------------------------------------------------------------------------------

CheckTableExistence  HalBrain.CheckTableExistence("Tablename")=True/False
CheckTableExistence
This command is similar to SQL and just returns a true or false depending on if it can find the table you specify.
The specified table can be anywhere in the table folder structure, there is no need to define a path for it. For instance, if you make a table under autoLearningBrain called _stuff (it seems to be a tradition to prefix an underscore), you don't have to write "autoLearningBrain/_stuff", just use the table name in the function.
'Check to see if table exists
Bob = HalBrain.CheckTableExistence("_stuff")
'If the table exists, then variable "Bob" should now = 1
Ususally this would be used in a conditional statement like:
'Check to see if table exists
'Your function "LoadTable()" is called if table exists,
'but "MakeTable()" is called if not.
If (HalBrain.CheckTableExistence("_stuff")) Then
LoadTable(_stuff)
Else
MakeTable(_stuff)
End If
CheckTableExistence Page ToolsInsert linksInsert links to other pages or uploaded files.
Pages Images and files Insert a link to a new pageLoading...No images or files uploaded yet.Insert image from URLTip: To turn text into a link, highlight the text, then click on a page or file from the list above.
----------------------------------------------------------------------------------

ReadOnlyMode  HalBrain.ReadOnlyMode = True/False 
ReadOnlyMode turns on and off your ability to create or edit tables in the database. You want to make it false (so it's NOT read only) before you change things, then perhaps change it back when you are done. You might want to leave it open, but not usually.
----------------------------------------------------------------------------------

CreateTable  HalBrain.CreateTable "TableName", "TableType", "Where it's at(miscData)"
CreateTable
HalBrain.CreateTable "TableName", "TableType", "Unclear (subset?)"
HalBrain is set by your options to refer to the DB you want to use with this Hal personality.(?)
CreateTable makes a new table in the current database.
'Make a new Table called "_stuff"
'The type is "TopicSearch" (one of the types)
'create it under "autoLearningBrain"
HalBrain.CreateTable "_stuff", "TopicSearch", "autoLearningBrain
Usually you would double check to make sure the table does not already exist. I usually make a small function which takes the three parameters and does all that.
Function MakeTable(Name,Type,Location)
If (HalBrain.CheckTableExistence(Name))= 0 Then
HalBrain.CreateTable(Name,Type,Location)
Else
MsgBox "Table "&Name&" already exists"
End If
CreateTable Page ToolsInsert linksInsert links to other pages or uploaded files.
Pages Images and files Insert a link to a new pageLoading...No images or files uploaded yet.Insert image from URLTip: To turn text into a link, highlight the text, then click on a page or file from the list above.
---------------------------------------------------------------------------------

AddToTable  HalBrain.AddToTable "TableName", "TableType", "Unclear (mask?)", Source 
--------------------------------------------------------------------------------

SearchPattern  HalBrain.SearchPattern(EmailBook, "*<RUN>*</RUN>", 1) 
SearchPattern
SearchPattern(Input String, * Search * Pattern *, Asterisk) searches your Input String for words in a certain pattern and returns the string represented by the asterisk you set numerically.
Str1 = SearchPattern("This is a test", "This * * Test, 1)
Str2 = SearchPattern("This is a test", "This * * Test, 2)
Result:
Str1 = "is"
Str2 = "a"
You can see that by asking for the first asterisk, you get the word "is", and by asking for the second you get the word "a".
This can be used to provide a parameter for functions when you are fairly certain that a phrase will be structured in a certain way.
Name = SearchPattern(OriginalSentence, "My name is *",1)
Often you will want to search a few patterns which are similar. OriginalSentence is the user supplied sentence, so you check to see if the pattern has already been found and if not, you try another pattern.
If Name = "" Then Name = SearchPattern(OriginalSentence, "My name is *",1)
If Name = "" Then Name = SearchPattern(OriginalSentence, "* is my Name",1)
If Name = "" Then Name = SearchPattern(OriginalSentence, "Call me *",1)
Use this instead of InStr if you know the pattern of the sentence, but cannot guess what the target word might be.
SearchPattern Page ToolsInsert linksInsert links to other pages or uploaded files.
Pages Images and files Insert a link to a new pageLoading...No images or files uploaded yet.Insert image from URLTip: To turn text into a link, highlight the text, then click on a page or file from the list above.
--------------------------------------------------------------------------------------

PatternDb  PhoneBook = HalBrain.PatternDB(UserSentence, "PhoneBook") 
---------------------------------------------------------------------------------------

TopicSearch  AddressBook = HalBrain.TopicSearch(UserSentence, "AddressBook") 
--------------------------------------------------------------------------------------

Types of Tables

•Brain
•Sentence
•Topic Search
•Substitution
•Patternmatch
If I understand it correctly, almost everything in Hal is databases. "Pattern Match" finds things like "Open Notebook" in the user sentence, matches it to the pattern in the halCommands table, "Open *", then runs the attendant command <runprog><1></runprog>, this finds the program (1==notebook) in the startmenu index and sends the command to Windows.
To account for variables in how you may phrase it, if you look at the table you will see several methods you could use, and you can add your own if you want. I rewrote most of them to use the word "Please" in the sentence. So I have "Open *" and "Please open *"
There are more complex ones, that find more involved patterns, but it's all in the database. There's "Who* program* me*" which would find, after switching "you" to "me" earlier in the script, "Who was the first person to write the programming that led to you?"
Very clearcut way of going around the barn, the barn being "Having Hal actually understand words". With pattern match, he doesn't need to understand the words, Robert already did the understanding. Hal just needs to apply patterns of text and wildcards to an incoming sentence, then reply as Robert (or someone else) told him to...
See, this is why I have the wiki. Explaining that made me understand it much more completely. (Unless I have it wrong, in which case it just ingrained my mistakes deeper into my brain)8-(
Patternmatch Page ToolsInsert linksInsert links to other pages or uploaded files.
Pages Images and files Insert a link to a new pageLoading...No images or files uploaded yet.Insert image from URLTip: To turn text into a link, highlight the text, then click on a page or file from the list above.

•Folder
-----------------------------------------------------------------------------------

•Text manipulation commands
How to change the sentences as they are used.
Trim(LCase(UserName))  Trim(LCase(UserName)) 
Replace(String?,string,string,1,-1,vbTextCompare
---------------------------------------------------------------------------------

•The Ultra Hal Function
From the Hal6.uhp, I quote:
"The UltraHal function is called by Ultra Hal Assistant 6.0 or a compatible host application. It passes an unformated string of the user's input as well as all remembered variables. The UltraHal function splits the user's input into seperate sentences and then calls GetResponse to get a response for each user sentence. The UltraHal function performs all the initialization functions required for GetResponse so that GetResponse doesn't have to initialize several times if a user inputs more than 1 sentence."

Function UltraHal   
ByVal sets the type of connection Hal makes to the variable.
When you use ByVal, the procedure is passed a copy of the argument variable and not a reference to the argument variable itself. Code in the procedure cannot change the variable's value.
The default in VB is ByRef, IIRC.

ByRef When an argument is passed by reference, the procedure is passed the address of the argument variable (in other words, a reference to the variable) so that the procedure can make changes in the value of the variable.
VB's default is to pass arguments by reference. You can include the ByRef keyword in an argument list if desired but, because this is the default, it has no effect. ByVal must be invoked to be used.

 ByVal  InputString 
InputString is the raw text from the input box on the Hal application GUI. This is what I messed with to make the spellchecker work. By the time the first plugin area is reached, this string is already partially parsed and cleaned up. It is then transfered into "OriginalSentence" at a point I have not yet reached.
I am concerned that this description is wrong. When I got to the auto-idle process and found that InputString was set to "Auto-Idle" I began to have doubts. I don't want to go forward in the file to see what happens to it yet, because I will get distracted, but check back with this subject for updates...
 ByVal  UserName 
UserName is the name you specified in the setup or the General Options menu dialog.
 ByVal  ComputerName 

 ByVal  LearningLevel 
LearningLevel is the slider control in General Options - Brain. If all the way off, the DB is closed. Otherwise there is a variable that changes to reflect the amount the db is consulted.
 ByVal  DatabaseFile 

 ByRef  Hate 

 ByRef  Swear 

 ByRef  Insults 

 ByRef  Compliment 

 ByRef  PrevSent 

 ByRef  LastResponseTime 

 ByRef  PrevUserSent 

 ByRef  CustomMem 

 ByRef  GainControl 

 ByRef  LastTopicList 


The Ultra Hal Function Page ToolsInsert linksInsert links to other pages or uploaded files.
Pages Images and files Insert a link to a new pageLoading...No images or files uploaded yet.Insert image from URLTip: To turn text into a link, highlight the text, then click on a page or file from the list above.
------------------------------------------------------------------------------

•Get Response Function
I quote from hal6.uhp:
RESPOND: GETRESPONSE
Get a response from Hal's brain for each sentence individually.
If a response from a sentence indicates a special flag, then Hal
will give only the response to that sentence, and not process
any other sentences. Otherwise Hal will respond to each sentence.
Hal will respond to a max of 3 sentences at once.
I'll fix this later.
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.