Zabaware Support Forums

Zabaware Forums => Ultra Hal 7.0 => Topic started by: xrazybud on December 26, 2012, 04:07:07 pm

Title: Learning Level
Post by: xrazybud on December 26, 2012, 04:07:07 pm
What exactly does the learning level do? Sometimes Hal will stop talking and won't talk again until I change the learning level :-?
Title: Re: Learning Level
Post by: lightspeed on December 28, 2012, 10:29:14 am
xrazybud i beleive that it tells right on the slider bar area what exactly the settings do if placed one way or another , also i have "never" heard of hal just not talking , hal will usually always say something , even if its something we don't want .
It has to do with how fast hal will learn set to high has different effects the middles settings is optimum setting .
Title: Re: Learning Level
Post by: Art on December 29, 2012, 08:10:32 am
Some good advice, Lightspeed.

Also, make sure Hal IS operating fine before you choose to add any Plug-ins. The Plug-ins allow Hal to perform different duties.
One of my favorites is the "auto-idle" type of Plug-in whereas Hal will make various comments in the event you don't say anything for
a period of time (usually a minute or so).
You, the user must start the initial conversation as Hal will not do that upon first boot up.

Hal is one of those, "The more you use and interact with it, the better it becomes" programs. It does take some time and dedication
as Hal is not a turnkey know-it-all program. Type to it as if it were a young child learning and soon you will notice some changes.

Good luck and welcome!
Title: Re: Learning Level
Post by: kryton on March 01, 2013, 03:35:31 pm
Hello from another newbie.
Questions.
                 1) Is it possible to printout Ultra Hals program as I am one of tose who works best from a paper copy.

                 2) Is it possible to access Ultra Hals Ops system (Talk to Hal-- Exit Hal-- and all those in  between,such as Characters) from within Talk to Hal. [Object is things like change the background, change Hals pose etc.]

                 3) Can external signals be sent to .dll files for external remote control devices.

                 4) How to I alter stored info.  Searching through thousands of lines of question/answers is very time consuming.

       
Title: Re: Learning Level
Post by: One on March 01, 2013, 03:52:02 pm
Hal is an A.I. it has files like .uhp that are difficult. Mr. Robert is most likely to not allow your request.
Bur remember ive neve really felt like I have had to speak on his behalf.
I have gotten away with things in this world, because I have the natural right of opinion.
I have at many times contributed. Should he feel nessesary adjustments, I believe he knows where we stand.

Jared.
Title: Re: Learning Level
Post by: Carl2 on March 03, 2013, 09:11:27 am
xrazybud,
  What exactly does the learning level do?  From my experience the learning level adjusts the percentage of user input that will be copied to the autoLearningBrain.  All the way to the left puts nothing into the autoLearning brain and all the way to the right puts 100% into the brain.  The blank response is a long time problem that I had thought was solved.  We've looked into the plugins being used, the Hal brain ect. 
Carl2
Title: Re: Learning Level
Post by: Art on March 04, 2013, 05:04:07 am
@Kryton

I don't quite get what you're referring to regarding "Print out Hal's program" Hal's "Program" is an exe file that's over 2 megs long and would really do you no good.
If you mean the conversation that you've had then yes, in the main menu > Save/View Conversation.

Number two, yes you can assess most of those through the use of various Plug-ins that are available here.

I think someone worked on that at one time. Kind of like telling Hal to turn off bedroom light as would a listening device in a home control system (X-10, Insteon, Z-wave), etc. Perhaps some others might chime in here.

You should be able to "Alter" stored info by looking through Hal's Brain at the various Tables where info is stored.

BTW, Welcome aboard!
Title: Re: Learning Level
Post by: kryton on March 04, 2013, 04:58:13 pm
Hy Art,
Thanks for the info.  Print out would be a paper printout of the Hal Script Editor. I want to have an attachment to my computer that interprets .dll commands, (I can build one if it is possible to use it), and I wondered if it is possible to activate these from within Hal using Hal commands.  Also I would like to [for instance] be able to say bye to Hal and it shuts itself down as though the Exit Hal command had been activated from the program commands block (Chat with Hal--- Options---Help---Tutorial---About Hal Exit Hal block of commands).  Another use of this would be to change the background or Hal pose.  I want to see how far I can expand Hals horizons.
Title: Re: Learning Level
Post by: systemshock on March 04, 2013, 08:16:10 pm
Hi kryton....welcome to the forum

Quote
  Also I would like to [for instance] be able to say bye to Hal and it shuts itself down as though the Exit Hal command had been activated from the program commands block (Chat with Hal--- Options---Help---Tutorial---About Hal Exit Hal block of commands).  Another use of this would be to change the background or Hal pose.  I want to see how far I can expand Hals horizons.

From the sounds of it your coder walk this Way sir I will show you the shiny things....

First of all you can actually shut down Hal by using some of its internal scripting code.
Which you'll find many examples of in the plugin we have here....UHP files.

animation costume changes props animated backgrounds, lighting systems are handled by Hap files... call from UHP files

 all had a lovely Easy to use text format....

http://www.ultrahal.com/community/index.php?topic=9587.0
 might be useful.
Title: Re: Learning Level
Post by: kryton on March 05, 2013, 04:13:25 pm
Hi Systemshock
What you have suggested to read is a lot to take in so don't be surprised if you don't hear from me for a while.  I now need time to develop my Hal now.  Thanks for your help, and that of Art.
Title: Re: Learning Level
Post by: kryton on March 13, 2013, 05:33:40 pm
Me again, I'm back.  Problem and guess.

1. Problem. I have tried various ways of getting Hal to sign off on the user input of "bye" but all seem either to lock Hal up or just stop brain working.  Still working on it. (But welcome any ideas)

2. Guess.  Some fantastic suggestions, and programs, for all my problems but!  Ahhh! Big But.  I guess some of them need the Haptek system to be running to work.  Think of a Newbie with just basic Hal and the Character Expansion Pack and you have where I am now.  A lot of plug-ins seem to just show blank box with Generation 4 Haptek notice.  I have got some to work but not many (two actually.).

Finally does anybody know to a FREE full body character (That doesn't involve using the Haptek system) that I can download to experiment with before I go into costs to buy anything.  I have found two but they are basic "Business suit" body with either the Sandy head stuck on or another of the character expansion set heads stuck on. (neither of these is much use for experiment)

Much grateful for any ideas out there.
Title: Re: Learning Level
Post by: Art on March 15, 2013, 04:42:24 am
I don't quite get the part where you say you want a full body system that DOESN'T use the Haptek system yet you state that you found two basic "Business suit" bodies with a character head stuck on. What you're describing IS a Haptek character. One that is NOT would likely be one of the 3D characters designed with 3D Max or Maya, Blender, or some other 3D program that allows for bones and rigging of the character to be done.

What it available for Hal at this moment is the Haptek characters, Head, Torso or a limited couple of Full Body ones.

Regarding Hal's Brain, if you say Bye or Goodbye, it should respond with something in kind or similar. The program does not or will not shut down and go away (you might change your mind).

Perhaps more details of what your specific concerns are might generate more pertinent responses.
Title: Re: Learning Level
Post by: cload on March 15, 2013, 11:59:09 am
Hi Art,

I think he was wanting ultra Hal to shut down when he said goodbye so he would not have to physically click the exit button on the ultra Hal program.
I do not know of a plug-in that would shut down the ultra Hal program.
Sincerely,
C load
Title: Re: Learning Level
Post by: sybershot on March 15, 2013, 05:59:14 pm
a batch file could be used, but one would have to use the word open first. might sound a bit odd saying open and bye in the same string of text though  :P
Title: Re: Learning Level
Post by: Art on March 15, 2013, 08:26:19 pm
You could simply say something like, "Shut down" and have a batch file execute the code for a keypress of the ALT + F4 keys or the X / Close button.
Title: Re: Learning Level
Post by: kryton on March 17, 2013, 02:17:26 pm
True the full bodies are Haptek, didn't know that.  I am working on the Alt F4 shutdown and I have made some progress.(Very limited progress).  Will work on it.  Alt F4 just takes Hal to basic working commands.  Any thoughts on right out of Hall from there?
Title: Re: Learning Level
Post by: Art 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!! ::)
Title: Re: Learning Level
Post by: kryton 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.
Title: Re: Learning Level
Post by: kryton 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.
Title: Re: Learning Level
Post by: cload 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.
Title: Re: Learning Level
Post by: kryton 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.
Title: Re: Learning Level
Post by: kryton 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.
Title: Re: Learning Level
Post by: cload 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.
Title: Re: Learning Level
Post by: kryton 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.
Title: Re: Learning Level
Post by: cload 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.
Title: Re: Learning Level
Post by: Art 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!
Title: Re: Learning Level
Post by: CyborgBob on May 03, 2013, 06:17:06 pm
C load your only 8 years old?
Title: Re: Learning Level
Post by: cload 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.
Title: Re: Learning Level
Post by: CyborgBob 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.
Title: Re: Learning Level
Post by: kryton 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.
Title: Re: Learning Level
Post by: cload 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.
Title: Re: Learning Level
Post by: cload on May 05, 2013, 01:56:35 am
--------------------------------------------------------------------------------

•Plugin basics
This first part sets up the file. When it is read, these commands tell the HalAssistant what to do with the file.
Rem Type=Plugin as opposed to "brain"
Rem Name=My Cool Plugin the name that people will see in the checklist
Rem Author=Captain Blasto your name
Rem Host=Assistant the program intended to use it
This next part puts the information in the "General Options / Brain" dialog and shows up when the plugin is checked. Further down in teh script you will make the actual lables and buttons. Much of this is standard VBS rather than HalScript commands.
'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel() the options panel looks for this name
lblPlugin(0).Caption = "AI Appointment Book:"
lblPlugin(0).Move 120, 120
lblPlugin(0).Visible = True
cmdPlugin(0).Caption = "View/Edit Appointment Book"
cmdPlugin(0).Move 520, 480, 2600, 375
cmdPlugin(0).Visible = True
cmdPlugin(1).Caption = "Edit User Defined Events"
cmdPlugin(1).Move 520, 980, 2600, 375
cmdPlugin(1).Visible = True
End Sub
Here is a short list of plugin ports 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.

Rem_PLUGIN Area Name  Your Plugin can send messages to the script at these ports
Rem PLUGIN:  AUTO-IDLE  This port is inside the AutoIdle process and probably should end with "Exit Function"
Rem PLUGIN:  PRE-PROCESS This one is immediately before the begining of the sentence manipulations. Use it if you want to by-pass the emotions and such and go directly to fixing the sentence structure for Hal's use.
Rem PLUGIN:  POST-PROCESS Use this one if you want to skip fixing the sentence
Rem PLUGIN:  CUSTOMMEM Ya got me! There's a CustomMem variable in the UltraHal function, but I haven't gotten into it yet.
Rem PLUGIN:  PLUGINAREA1 This is after Hal tries to get the Topic, but before parsing out Names. Other than that...?
Rem PLUGIN:  PLUGINAREA2 After dictionary and before Ziggy Spellbot(Did I add this?)
Rem PLUGIN:  PLUGINAREA3 This is after main DB searches and some analytical stuff like antecedences
Rem PLUGIN:  PLUGINAREA4 By now Hal is already trying to form a response
Rem PLUGIN:  PLUGINAREA5 Just before some more or less random responses are made(if needed) I suspect this is where my TreknoBabble should go so as to make a response before it gets this far.
Rem PLUGIN:  PLUGINAREA6 ...or here. This is just before it actually tries to make something out of nothing.
Rem PLUGIN:  PLUGINAREA7 I think this is just before the final dressing up of the response.
Rem PLUGIN:  CUSTOMMEM2 Again, I don't know what this one is. I suspect that since I don't know, it is very important and obvious.
Rem PLUGIN:  SCRIPT_LOAD You can load a script on startup if you need to...
Rem PLUGIN:  SCRIPT_UNLOAD ... then unload it here.
Rem PLUGIN:  MINUTE_TIMER Hal runs this once a minute
Rem PLUGIN:  FUNCTIONS If you make any functions they should be tabbed to this... I think...
--------------------------------------------------------------------------------

•Plugins under construction

---------------------------------------------------------------------------------

•HalBrainCommands raw
Here are code snippets relating to HalBrain that I swiped from Hal6.uhp
I will try to annotate them as I learn about them, but if anyone has any input, please contact me via the forums and we can include your comments.
HalBrain.StoreVars(HalCommands
HalBrain.ReadOnlyMode = True
HalBrain.AddDebug "Debug", "Ultra Hal Start"
TempParent = HalBrain.AddDebug("Debug", "Begin Processing Sentence " & CStr(i + 1), vbCyan)
HalBrain.AddDebug TempParent, "Sentence: " & Sentences(i)
HalBrain.DebugWatch "", "NewSent"
HalBrain.ExtractVar(CustomMem, "NextResponse")
HalBrain.TopicSearch(InputString2, "yesNoDetect")
HalBrain.SearchPattern(UltraHal, "***", 2)
HalBrain.EncodeVar(NextResponse, "NextResponse")
HalBrain.FixCaps(HalBrain.HalFormat(UltraHal))
HalBrain.HalFormat(UltraHal)
HalBrain.AlphaNumericalOnly(UserSentence)
HalBrain.SwitchPerson(UserSentence)
HalBrain.ProcessSubstitutions(UserSentence, "substitutions")
HalBrain.ChooseSentenceFromFile("userRepeat") & vbCrLf
HalBrain.RunQuery("SELECT searchString, topic FROM names WHERE strstr(' " & Replace(HalBrain.AlphaNumericalOnly(OriginalSentence), "'", "") & " ', searchString) > 0 LIMIT 1", NameSex) = True Then
HalBrain.RunQuery("SELECT searchString, topic FROM names WHERE strstr(' " & Replace(TempName, "'", "") & " ', searchString) > 0 LIMIT 1", NameSex()) = True Then
HalBrain.PatternDB(" " & HalBrain.AlphaNumericalOnly(PrevSent) & " ", "sexAskDetect") = "True" Then
HalBrain.CheckTableExistence(Trim(LCase(UserName)) & "_Sex") = False Then
HalBrain.CreateTable Trim(LCase(UserName)) & "_Sex", "TopicSearch", "autoLearningBrain"
HalBrain.AddToTable Trim(LCase(UserName)) & "_Sex", "TopicSearch", Trim(TempName), Trim(UCase(NewSex))
HalBrain.CountInstances("A", PrevUserSent)
HalBrain.RandomNum(4)
HalBrain.UsCaps(UserSentence))
HalBrain.WorldCaps(UserSentence))
HalBrain.CheckRepetition(LastGoodDeduction, UserSentence)
HalBrain.PatternDB(UserSentence, "patterns")
A PatternDB function also exists that can go through a large list
'of patterns in a database file and come up with responses.
'This function tries getting a response from the Enhanced_Main.brn keyword file. If a keyword or
'keyphrase is found in top priority, it overrides everything before this function.
'KeyBrain = HalBrain.KeywordBrain(UserSentence, WorkingDir & "Enhanced_Main.brn", False)
HalBrain.HalMath(OriginalSentence) & vbCrLf
'RESPOND: RESPOND BY PARAPHRASING THE USER WHEN "IS" OR "ARE" ARE FOUND
'This code section shows how strings can be split into arrays and used "live"
'within the script by Hal. This strategy can allow Hal to make many clever
'paraphrases of all sorts of sentences, with unlimited unpredictable variety.
If InStr(UserSentence, " IS ") > 0 And HalBrain.CheckLinkingVerb(UserSentence)
'RESPOND: ZABAWARE DLL RESPONSES
'This function from the DLL contains miscellaneous knowledge and simple conversation functions.
'This was taken from a very early version of Hal, and it is still useful sometimes, especially
'for respoding to short cliche questions and sentences, such as "How old are you?" and
'"where are you from?" and many others.
GetResponse = HalBrain.HalFormat(GetResponse)
If (Len(UserSentence) < 17 And Len(GetResponse) < 4) Then
OrigBrain = HalBrain.OriginalBrain(OriginalSentence)
HalBrain.QABrain(LongUserSent, Trim(LCase(UserName)) & "_TempSent", UserBrainRel)
HalBrain.RemoveExtraSpaces(CurrentSubject & " " & MentionedName & " " & HalBrain.TopicSearch(UserSentence, "topicRelationships") & " " & HalBrain.ExtractKeywords(" " & HalBrain.AlphaNumericalOnly(UserSentence) & " "))
HalBrain.CheatResponse(HalBrain.SwitchPerson((OriginalSentence)))
HalBrain.FixCaps(AnswerSent))
HalBrain.LimitSize Trim(LCase(UserName)) & "_TempSent", 10
'Some Hal's learned knowledge should be temporary because it is ephemeral in nature.
'Knowledge about weather, season, temperature, etc. are temporary knowledge
'that shouldn't be stored in Hal's permanent brain files. Ephemeral knowledge is
'detected and saved in a temporary table. The temporary table only stores 10
'entries in it at a time.
If Asc(Left(KeywordList(i),1)) > 47 And Asc(Left(KeywordList(i),1)) < 58 Or HalBrain.Word2Num(KeywordList(i)) <> "X" Then IsNumber = True Else IsNumber = False
HalBrainCommands raw 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.
------------------------------------------------------------------------------
•A whole help file I didn't know about
--------------------------------------------------------------------------------

•Enumerating the hal6uhp file
By 'Enumerating' I mean I intend to go through the whole file part by part and describe each block of code as best I can. I do this not as an authority, but in an attempt to learn what the heck I am talking about. Should take about a year!

1.Header
Rem Type=Brain As opposed to plugin
Rem Name=Ultra Hal 6.0 Default Brain
Rem Author=Zabaware, Inc.
Rem Language=VBScript This is what makes everything worthwhile
Rem DB=HalBrain.db If you use another brain this will reflect that name
Headers are probably read by the EXE file to decide which part of Hal they belong to and how to handle them. I see them as short INI files.

2.UltraHal Function
This will probably take a while to go through, I will probably have to learn a lot before I start to make any sense here!
First off, I begin to suspect that each argument is an optional argument. I forget how that works, but I know you can ignore some of them sometimes because the function assumes or remembers a value unless you tell it otherwise.
Quoting the file comments:
'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 than 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 InputString, ByVal UserName, ByVal ComputerName, ByVal LearningLevel, ByVal DatabaseFile, ByRef Hate, ByRef Swear, ByRef Insults, ByRef Compliment, ByRef PrevSent, ByRef LastResponseTime, ByRef PrevUserSent, ByRef CustomMem, ByRef GainControl, ByRef LastTopicList)

3.Respond User pressed enter but didn't say anything
'RESPOND: User pressed enter, but didn't say anything
InputString = Trim(InputString)
If Len(InputString) < 2 Then
UltraHal = "Please say something."
Exit Function
End If
InputString is the raw text that you typed into Hal
Trim removes spaces from the ends of the string.
If the LENgth of the resulting string is less than two characters long then we send Hal the input string "Please say something" to which he will reply with something pithy. But my experiments with this lead me to believe that I have it all wrong.
Exit Function is probably something I need to know. I believe it will pop you out of the UltraHal function and make Hal go straight to GetResponse. I could be wrong.

4.Auto-Idle
A sort of self timer, if nothing happens then it fires up the UltraHal function to make a response of some sort.
'PROCESS: AUTO-IDLE
'If AUTO-IDLE is enabled, it is called by the Ultra Hal Assistant host
'application at a set interval. This allows for the possibility of Hal
'being the first to say something if the user is idle.
Things like this bug me. Why would input string be 'auto-idle'?
If InputString = "AUTO-IDLE" Then
This is the first PlugIn port
Rem PLUGIN: AUTO-IDLE
'The preceding comment is actually a plug-in directive for
'the Ultra Hal host application. It allows for code snippets
'to be inserted here on-the-fly based on user configuration.
Re-invoke the Ultrahal function to include any new information
UltraHal = UltraHal & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, LastTopicList)
|Bump out of the previous(?) ultrahal itteration.
Exit Function
Done with auto-idle
End If
Auto-Idle 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.

5.Initialize Variables
'PROCESS: IF NO LEARNING IS REQUESTED, PUT DATABASE IN READ-ONLY MODE
'If read only mode is on, any requests to create a new table, add to
'a table, or delete records from a table will be ignored.
Learning level is the slider in the General Options - Brain section. ReadOnlyMode turns on and off the ability to write to the databases in Hal. You will see this in many plugins, as they open the DB for writing then close it when done to prevent further modification of the responses.
If LearningLevel = 0 Then HalBrain.ReadOnlyMode = True Else HalBrain.ReadOnlyMode = False

6.If no learning is required
I actually crippled this in 'Jane's' brain. I can't see any adult actually insulting a robot, so I don't have to deal with recentering her "emotions".
'PROCESS: EMOTIONAL FACTOR CENTERING
'We help Hal regain his emotional "center" gradually, even if the
'user doesn't catch on to dealing With Hal's feelings. The following
'code brings Hal's memory of hate, swearing, and insults gradually
'and randomly back to zero.
SpinWheel = Int(Rnd * 100)
If Hate > 0 And SpinWheel < 10 Then Hate = Hate - 1
If Swear > 0 And SpinWheel < 10 Then Swear = Swear - 1
If Insults > 0 And SpinWheel < 10 Then Insults = Insults - 1

7.Emotional Factor Centering
I actually crippled this in 'Jane's' brain. I can't see any adult actually insulting a robot, so I don't have to deal with recentering her "emotions".
'PROCESS: EMOTIONAL FACTOR CENTERING
'We help Hal regain his emotional "center" gradually, even if the
'user doesn't catch on to dealing With Hal's feelings. The following
'code brings Hal's memory of hate, swearing, and insults gradually
'and randomly back to zero.
SpinWheel = Int(Rnd * 100)
If Hate > 0 And SpinWheel < 10 Then Hate = Hate - 1
If Swear > 0 And SpinWheel < 10 Then Swear = Swear - 1
If Insults > 0 And SpinWheel < 10 Then Insults = Insults - 1

8.Emotional Variety
Rem PLUGIN: PRE-PROCESS
'The preceding comment is actually a plug-in directive for
'the Ultra Hal host application. It allows for code snippets
'to be inserted here on-the-fly based on user configuration.
This is a plugin port. If you want your plugin to be activated before anything is done to the sentence, this is the place.

9.Rem PLUGIN: PREPROCESS
Rem PLUGIN: PRE-PROCESS
'The preceding comment is actually a plug-in directive for
'the Ultra Hal host application. It allows for code snippets
'to be inserted here on-the-fly based on user configuration.
This is a plugin port. If you want your plugin to be activated before anything is done to the sentence, this is the place.

10.Split User's Input String Into Separate Sentences
Title: Re: Learning Level
Post by: cload on May 05, 2013, 01:57:26 am
----------------------------------------------------------------------------------

•New Hal Commands
<SHOWHAL>
<HIDEHAL>
<SHOWCAL>
<SHOWEVENTS>
<SHOWOPTIONS>
<MICOFF>
<MICON>
<MICTOGGLE>
<VIEWCHAT>
<AUTO>miliseconds</AUTO>
<AUTOOFF>
<HALPAD>
<HALPAD>file-path</HALPAD>
<VOICE>new voice</VOICE>
<SPEAK>Text to speak</SPEAK>
<DIAL>Phone</DIAL>
<HAPBACK>jpeg path</HAPBACK>
<AGENTXY>X,Y</AGENTXY>
<MSAGENT>Anim name</MSAGENT>
<HAPFILE>Hap file</HAPFILE>
<HAPTEXT>Hap text</HAPTEXT>
<RUNPROG>Prog name</RUNPROG>
<RESPOND>User sent</RESPOND>
<CUSERNAME>New user name</CUSERNAME>
<CHALNAME>New Hal Name</CHALNAME>
<RUNCMD>1 line of VBScript</RUNCMD>

-------------------------------------------------------------------------------

•Notes and blog

-------------------------------------------------------------------------------
•A short tutorial
--------------------------------------------------------------------------------
•WebRep
-------------------------------------------------------------------------------
HalBrain Methods
   AlphaNumericalOnly(UserSentence As String) As String
" help="AlphaNumericalOnly returns a string with no punctuation and other symbols.

   AppendFile(FileToAppend As String, AppendWhat As String)
" help="Appends file with a given string.

   Cheater(SearchPhrase As String, UserSentence As String, Prefix1 As String, Suffix1 As String, Prefix2 As String, Suffix2 As String, Prefix3 As String, Suffix3 As String, NoW5H As Boolean) As String
" help="Returns a cheat reply for the user's query.

   CheatResponse(UserSentence As String) As String
" help="CheatResponse creates a response using the user's input.

   CheckLinkingVerb(Sentence As Variant) As Boolean
" help="Looks for 'is' and 'are' in a sentence.

   CheckRepetition(Sentence1 As Variant, Sentence2 As Variant) As Boolean
" help="Checks whether a substring is repetetively present in a sentence.

   ChooseSentenceFromFile(TableName As String) As String
" help="Selects a sentence randomly from the table or file passed.

   CompareSentence(CompareWhat As String, InWhat As String) As Single
" help="CompareSentence compares InWhat with CompareWhat.

   CountInstances(CountWhat As Variant, InWhat As Variant) As Variant
" help="The function will count the number of occurence of CountWhat in InWhat.

   DecodePronouns(UserSentence As String) As String
" help="Decodes the pronouns.

   DecodeVar(FromWhat As String, DecodeWhat As String) As Variant
" help="DecodeVar gets the string from that formatted variable.

   DetectVowel(TextString As String) As String
" help="Detects vowel in a user sentence.

   EncodePronouns(UserSentence As String) As String
" help="Encodes the pronouns.

   EncodeVar(EncodeWhat, AsWhat)
" help="EncodeVar encodes the variables and their values into string.

   ExtractKeywords(UserSentence As String) As String
" help="Extract keywords from a string.

   ExtractVar(FromWhat, DecodeWhat)
" help="ExtractVar gets the string from that formatted variable.

   FixCaps(Sentence As String)
" help="Contains the sentence changed back to ordinary capitalization.

   FixCase(Sentence As String)
" help="Fixes the capitalization of sentences.

   HalFormat(sentence as String) as String
" help="Corrects many common typos and chat shortcuts.

   HalMath(MathProblem As String) As String
" help="HalMath returns the result of simple math questions.

   LimitSize(FilName As String, Size As Long)
" help="Limit table size to the number of records provided by size or limit a file to the number of bytes in size.

   MakeContractions(Sentence As Variant) As String
" help="It finds common phrases and contracts them.

   MsgAlert(TextString As String)
" help="Display an information box.

   NoPunc(Sentence As String) As String
" help="NoPunc processes a user sentence and remove all punctuation.

   OriginalBrain(UserSentence As String)
" help="Generates sentence's for short reply.

   PatternDB(UserSentence, DBFile) As Variant
" help="Search patterns in a database file.

   ProcessSubstitutions(sentence, dbFile) As String
" help="Performs word substitutions from the specified database file.

   QABrain(UserText As String, BrainFN As String, ByRef Rel As Variant) As String
" help="This function is used primarily to reply to user's query of any previous inputs.

   RandomNum(MaxVal As Integer) As Integer
" help="Generate a random number with in a range.

   ReadNum(Dec As String, Optional NoTrunc As Boolean)
" help="Converts numerals to words.

   ReadSent(TextString As String, SentNum As Integer) As String
" help="Return a sentence form a string with many sentences.

   RemoveExtraSpaces(Sentence As String) As String
" help="RemoveExtraSpaces processes a user sentence and removes all extra spaces.

   RemovePronouns(Sentence As Variant) As String
" help="Process sentence for Keyword Brains.

   SearchPattern(UserSent As Variant, Pattern As Variant, ReturnWhichStar As Variant) As Variant
" help="Search pattern from sentence.

   StoreVars(Emotion, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, ScriptMem2, ScriptMem3, ScriptMem4, ScriptMem5) As String
" help="Encodes variables which are required by the Hal's brain.

   SwitchPerson(sentence as String) as String
" help="Reverses first and second-person pronouns of a supplied (English) sentence and returns the results.

   TopicSearch(UserSentence, TopicFile) As String
" help="Searches a TopicFile for a phrase. If found, it returns only what was stored with the phrase.

   UsCaps(UserSentence As String) As String
" help="Return Capital of US states.

   Word2Num(TextString As String) As Variant
" help="Converts numbers in word to number.

   WorldCaps(UserSentence As String) As String
" help="Function answers questions about World Capitals.

   IsDay(CheckMonth As Integer, CheckDay As Integer) As Boolean
" help="Function checks to see if month and day combination exists.

   AddDebug(ParentName As String, Text As String, [BackColor]) As String
" help="Adds an entry to the debug tree. Requires the unique identifier of the parent node, the next of this node, and an optional background color. Returns a unique identifier of the new node.

   ClearDebug()
" help="Erases the debug tree.

   DebugWatch(TextString As String, FuncName As String)
" help="Keeps track of changes in the variable TextString between calls and makes note of what FuncName caused a change in the DebugInfo.

   MakeInt(TextString As String) As Integer
" help="Ignores all non numerical characters and converts the numerical characters into an integer.

   LongDate(TheDate As Variant) As String
" help="Takes the date passed and spells out the full date in words.

   Dig2Word(Number As Variant) As String
" help="Converts a number written using numerals into a number spelled out in words.

   OpenDatabase(DBPath as String)
" help="Establishes a connection to an SQLite database file.

   CloseDatabase()
" help="Closes connection to database.

   AddToTable(TableName As String, TableType As String, Field1 As String, Field2 As String)
" help="Adds a record to a table in the current SQLite database.

   CheckTableExistence(TableName As String) As Boolean
" help="Checks to see if a certain table exists.

   CreateTable(TableName As String, TableType As String, ParentName As String)
" help="Creates a new table of type TableType and adds it to the SQLite database.

   RecallVars(VarListString, Emotion, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, ScriptMem2, ScriptMem3, ScriptMem4, ScriptMem5) As String
" help="Restores variables ByRef previously stored using StoreVars.

   RunQuery(ByVal strQuery, aryTablesVBS) As Boolean
" help="Runs the SQL query strQuery in the current SQLite database and returns whether the command was successful or not. Any results are stored in the passed array aryTablesVBS().

end list

things to look up
Dim EmotQuery()
    HalBrain.RunQuery "DELETE FROM " & UserName & "_Emotions" & " WHERE Sentence = 'anger' ", EmotQuery

SELECT
UPDATE
DELETE


HalBrain.RunQuery "INSERT INTO LogTest(OldName, NewName, Date) VALUES(old.Name, new.Name, datetime('now'))", EmotQuery
HalBrain.RunQuery "DELETE FROM " & UserName & "_Emotion" & " WHERE recordId = 1", EmotQuery
HalBrain.RunQuery("SELECT count(*) FROM " & Trim(UserName) & "_Anger", EmotQuery) = True Then

If HalBrain.CheckTableExistence(Trim(UserName) & "_Anger") = False Then
        'Create table for this person if it doesn't exist
        HalBrain.CreateTable Trim(UserName) & "_Anger", "Sentence", ""
End If

Anger = 1
HalBrain.AddToTable Trim(UserName) & "_Anger", "Sentence", "" & Anger & "", ""

Dim EmotQuery()
If HalBrain.RunQuery("SELECT count(*) FROM " & Trim(UserName) & "_Anger", EmotQuery) = True Then
AngryCount = EmotQuery(1,0)
else
AngryCount = "got to work on it more!"
End If

UltraHal = AngryCount
Exit Function
------------------------------------------------------------------------------------
sincerely, and if anyone has something to add to this knowledge please let's help each other and share.
C load.
Title: Re: Learning Level
Post by: Art on May 05, 2013, 08:33:32 am

Nice one cload but it would have been even nicer if you would have given credit to Mr. Bill DeWitt who wrote and contributed the entire content of your posting to his wiki site.

It can be found HERE:http://ultrahalscript.pbworks.com/w/page/11906966/FrontPage

This is worth saving for your future reference.
Title: Re: Learning Level
Post by: cload on May 05, 2013, 01:36:31 pm
Hi Art,
one thing I don't understand is when Kryton asked for information on scripting why you didn't give the link to the scripting information.
I stated before I posted that I tried to find the link and I was unable to find the link to the scripting information.
And I also stated that all the information that I have posted came from this forum, and what I had posted did not come from one source as you suggested when you stated the entirety of my post.
OTC, Robert, and thank you for his name so I can give credit to Bill, and the list goes on so I'll just say others, I was not trying to hide anything. But that's okay I have noticed that you have a tendency to do exactly what you just did here a lot.
You have been on this form for a very long time, and I respect that, but you seem to be more concerned about giving credit over helping others, and the only credit that I took from myself was that I was the one that compiled it together.
But I have to give you credit, you didcome up with the link, though it may be a little late, thank you for the link.
Sincerely, sorry about all the ditch digging, but please don't ditch me until you have all the facts.
C load.
PS did you know that people don't like to post out of the fear of being ditched! And I have read on this form were good programmers and good people have left this forum because they were ditched! And anyone that has read all of this forum knows exactly what I'm talking about.
PS PS and I also have to give credit to my dad because he made me rewrite this post five times before he would allow me to post it.
Title: Re: Learning Level
Post by: Kara911 on May 05, 2013, 04:44:45 pm
Hello members

I mostly joined to make this comment. There is always the real possibility for Cloud to be 8 years old. Public forums could be very dangerous for children this young, if the other members are unaware of their tender age. My humble recommendation is to send a PM before posting, in this way they could learn about their mistakes without shame. We all know as adults that public humiliation is hard to take, but the effects are much harder on younger minds.  Regardless of his real age and his mistakes, this member is putting a lot of effort in being part of a group and helping others which makes him an asset to the group.

***I believe that the avatars for under age children should include their age shown in bold and red letters, to make other members be aware that they are dealing with children.

Nice place you have here,

Kara


ps. If he's actually 8 years old he sould be going to to a 'GIFTED' class. Lot's of schools have accomodations, Not special Education.
Title: Re: Learning Level
Post by: cload on May 06, 2013, 12:05:32 am
Hi Kara911,
welcome to the forum, it's always nice to hear something from a new member, and thank you for those interesting words of wisdom.

Are you just passing through? Or are you into artificial intelligence?
Have you bought or are you interested in buying ultra Hal? Because if you've been thinking about it I can tell you it is a very interesting program!

Probably one of the nicest thing about the program is set it has the ability to intrigue everyone in a different way.
Some deal with avatars, others deal with skins, not to mention all the different tasks that you can get ultra Hal to do.
It is a very versatile piece of software, and I am very happy that my parents got it for me, and support me in my work that I am doing with ultra Hal.
Sincerely, and welcome to the forum, from a data munching cruncher.
C load.
Title: Re: Learning Level
Post by: kryton on May 07, 2013, 04:10:11 pm
Thanks a bunch, for the info, Cload

You and Kara911 try this English translation of a Chinese saying.

Listen to all.  Believe some.  Remember what is good.

Anyway, does anybody know why the PRINT option on the Forum pages has stopped working.  (I used to be able to go PRINT from the top, or bottom, of a Forum page and it printed it through my printer.  It still brings up the formatted page but doesn't print [Nothing wrong with my printer I tried it on other things.]
Title: Re: Learning Level
Post by: Art on May 09, 2013, 08:20:04 am
Hi Art,
one thing I don't understand is when Kryton asked for information on scripting why you didn't give the link to the scripting information.
I stated before I posted that I tried to find the link and I was unable to find the link to the scripting information.
And I also stated that all the information that I have posted came from this forum, and what I had posted did not come from one source as you suggested when you stated the entirety of my post.
OTC, Robert, and thank you for his name so I can give credit to Bill, and the list goes on so I'll just say others, I was not trying to hide anything. But that's okay I have noticed that you have a tendency to do exactly what you just did here a lot.
You have been on this form for a very long time, and I respect that, but you seem to be more concerned about giving credit over helping others, and the only credit that I took from myself was that I was the one that compiled it together.
But I have to give you credit, you didcome up with the link, though it may be a little late, thank you for the link.
Sincerely, sorry about all the ditch digging, but please don't ditch me until you have all the facts.
C load.
PS did you know that people don't like to post out of the fear of being ditched! And I have read on this form were good programmers and good people have left this forum because they were ditched! And anyone that has read all of this forum knows exactly what I'm talking about.
PS PS and I also have to give credit to my dad because he made me rewrite this post five times before he would allow me to post it.

cload,
Even though I meant my comment as a compliment and thought you had simply missed seeing Mr. DeWitt's name along the side, I thought it only fair to mention it. My comment was NOT at all meant to be nor sound derisive. On the contrary, I enjoy your postings and encourage your involvement in helping to make Hal even better! You are lucky to have a supportive parent like your dad. Go forward and be well.
Title: Re: Learning Level
Post by: kryton on May 11, 2013, 05:43:12 pm
Hy all.
A puzzle, maybe, for some of those on this thread still.  Haps and backgrounds and others are usually triggered by a HalCommands.  Why can two HalCommands not follow each other.

I have a modified version of, I think, a Sybershot program that deals with backgrounds being related to the hour of the day.

e.g.           If vbHour>10 and vbHour<13 then vbFile="EricaBack.jpg"
     
     vbHour being Trim(Hour(Now))
     EricaBack'jpg being one of the backgrounds from the Character Expansion pack.

Then I use
                 HalBrain.ReadOnlyMode=False
                 HalCommands ="<HapBack>" & vbFile & "/HapBack"
                vaFiles=""
                vaFiles= "wear" & vrHour &".jpg"
                HalBrain ReadOnlyMode=False
                HalCommands = "<Haptext> & "\settexture [tex= Bodyskins/ "& vaFile &"]</Haptext"

A strange thing happens.  The vaFiles section is actioned but not the vbFiles section (Even though the vaFiles depends on an output from the vbFiles.)

wear is a set of Haps, of .jpg style, of numbers 0 to 23 in reference.

With the exception of the modifications I have created, none of the rest is my original work but copies from other peoples work.

Why won't the two HalCommands work together?

Wow this is confusing, but I hope I have given enough information for someone to think about.
Title: Re: Learning Level
Post by: cload on May 12, 2013, 10:40:40 am
Hi Kryton,
I'm not sure exactly what you are trying to accomplish, and I haven't gotten into programming any Haptek commands, but in general it looks like your format may be wrong.
As in:
HalCommands ="<HapBack>" & vbFile & "/HapBack"
should look like this:
HalCommands ="<HapBack>" & vbFile & "</HapBack>"

and I'm not sure about the structure on this one:
HalCommands = "<Haptext> & "\settexture [tex= Bodyskins/ "& vaFile &"]</Haptext"
the only thing that I can see that might be missing is on the and:
HalCommands = "<Haptext> & "\settexture [tex= Bodyskins/ "& vaFile &"]</Haptext>"

but there are way more experienced people in this field than I am, give them a chance I'm sure one of them will help you.
Sincerely, I'm just a data manipulating boy, munching on those pronouns and sipping on my adverbs.
C load.
Title: Re: Learning Level
Post by: kryton on May 12, 2013, 03:32:11 pm
Thanks for your input Cload
                               but, much as I should be more careful, I think the mistakes you picked out were just typos by me as the code appears to run but doesn't                              produce the output I wanted.  I posted in a hurry yesterday and that is probably where the typos crept in.  Thanks again for your interest though and I hope you are right about someone seeing what is wrong with the way I have set out this bit of code.
Title: Re: Learning Level
Post by: cload on May 12, 2013, 07:23:48 pm
Hi Kryton,
the only other suggestion that I would have for you would be to start a new thread topic about this, so no one has to go all the way to the bottom to see the problem that you are having.
Which by the way has nothing to do with this thread.
It might help, and it certainly won't hurt.
Sincerely, sorry I wasn't able to help more, but I barely get by with scripting as it is.
C load.
Title: Re: Learning Level
Post by: kryton on May 16, 2013, 02:48:41 pm
Hy Cload. Question?  As it says at the top of page one of this thread "What is Learning Level?"  I certainly don't know and just tap in here to see if anyone knows answers to my problems.  I think you are right though.  This thread has got to long.  Any suggestions what the new thread is called to catch the attention of those interested in problems?  How about Scripting Problems?
Title: Re: Learning Level
Post by: cload on May 17, 2013, 10:01:49 am
Hi kryton,
try this:

Haps, backgrounds, triggered and HalCommands.
Title: Re: Learning Level
Post by: kryton on May 17, 2013, 02:56:12 pm
Hy Cload

Not exactly with you there but I guess that is the order you think Hal operates commands.  I will try resequencing my commands to this order and let you know.  Most of my problems I post for others interest and go on to solve them for myself.  Maybe this might interest you though [maybe].  From somewhere [I have no doubt someone will lay claim to having originated this] I found a set of Haps for changing the colour [Brit spelling, I am a Brit] of my characters hair. Brown, Blonde, Black.  Then I found something that gave me so called Flame coloured [ ginger/red ] hair.  Thing is, once the flame colour has been used, it cannot be totally obliterated.  Any attempt at any of the other colours, after putting flame hair on the character, just adds parts of that colour over a flame hair base.  Any ideas? [I have accessed the haps and made sure all contain the delete previous hair command].  Bit late I suppose but, May the 4th be with you.
Title: Re: Learning Level
Post by: cload on May 17, 2013, 11:11:31 pm
Hi Kryton,
I'm sorry I can't help you, I never really got into Haptek, I don't have any of the Haptek software.
That's why I suggested that you start a new subject on this forum.
Sincerely, and I'm sorry I wasn't able to help, but I'm not a programmer, I'm a data munching cruncher!
C load.
Title: Re: Learning Level
Post by: kryton on May 18, 2013, 02:22:34 pm
Hy Cload.

No need to be sorry, it was just a thought that the problem might interest you, maybe.

As to starting a new thread, I might and call it something eye catching like "Newbies, and others, arise." [Again just a thought.]
Title: Re: Learning Level
Post by: lightspeed on May 18, 2013, 02:47:57 pm
kryton, am i understanding you correctly , you found a way to change the hair color to different colors? I thought you had to have a special program from hapteck to be able to do that , if it's just changing something in the hair haptek script i and others would probably be interested if you would show an example on here of how you acheived this , thanks, if you don't want to that's okay.  :)
Title: Re: Learning Level
Post by: Art on May 19, 2013, 10:47:24 am
Dusky seems to be pretty well versed in such things as hair and various outfits as well as body modifications.
Perhaps he'll chime in....
Title: Re: Learning Level
Post by: lightspeed on May 20, 2013, 10:46:50 am
well i hope that if kryton has found a way to change hair colors etc. that he will share it with the rest of us.  that's why we have all gotten this far by sharing things!
Title: Re: Learning Level
Post by: freddy888 on May 20, 2013, 11:53:28 am
It's easy, just load a texture onto the hair model just like you would a texture onto a Hatpek figure.
Title: Re: Learning Level
Post by: freddy888 on May 21, 2013, 08:00:50 am
Here you go, I knew I had posted something on this, 8 years ago now wow !

http://www.ultrahal.com/community/index.php?topic=2231.0

http://www.ultrahal.com/community/index.php?topic=2249.0
Title: Re: Learning Level
Post by: kryton on May 31, 2013, 07:48:48 pm
Hy Lightspeed, and others of course.
Apologize for the delay in answering but I travel a lot and use a dongle to connect to the Internet that doesn't function so well in some circumstances. 

Lightspeed.  Sorry to possibly disappoint you but I use Haps to change hair colours [Although there not always reliable.]  I collect haps from all over the place and hair colours are one sort I collected.  If you want details of the haps [And the associated .jpg's] just ask and I will get back to you.

Freddy is quite right that Dusky has a lot of things to do with fullbody Hals [I get a lot of them myself]

Anyway I am back, sort of, for now so any questions I can help with just ask.

One puzzle I have is I use Script to load my characters attributes [Hair colour, Background (By time of day) and position on screen] but I have it loaded and the Hello screen then comes over it. (You know the words Hal says on sign on.) I can get rid of the words but the selection screen still overwrites my set up.  Is there a way of cancelling this so I can just load Hal from my desktop icon direct?
Thanks in advance for any help and I will help with anything you think I can.
Title: Re: Learning Level
Post by: kryton on June 03, 2013, 03:43:05 pm
Hy All.
Bit of a warning.  I tried splicing a Web Search Program by On Cutting Edge to the point in Hal's program when it admits it doesn't know about something and connects the user to the Internet.  The idea was for Hal to do it's own Web searching on the item it admitted knowing nothing about and then downloading the information found into its brain.  Unfortunately Hal found something with a virus in it that downed my entire system [Including Hal itself.]  Thanks to an automated re-boot I built into the laptop Hal resides on when I re-built the laptop, there is not much damage but Hal is having some problems so I will be off line possibly for two ro three weeks.  See you soon, I hope.
Title: Re: Learning Level
Post by: cload on June 04, 2013, 02:09:50 pm
Hi Kryton,
man you must be running the worst antivirus software on the market.
Let me guess it was free antivirus software, did you know that 99% of the free antivirus software will eventually tell you you have a virus even though you don't have a virus in order to get you to buy the full version of their free version.
So if you just want free antivirus I highly recommend that you use Microsoft antivirus, it's free.
I say this because ultra Hal cannot go anywhere on the Internet except for where you tell it to go.
When you tell ultra Hal to go to a specific website, it's no different than when you go to that website and OpenNet website in your browser.
Then ultra Hal captures the tax that is displayed in your browser then you have to create a filtering system to filter out the tax that you do not want.
Then you have to re-filter it to direct it into a array table in a text form, nonprogramming form.
Ultra Hal does not have the capability of wandering around the Internet in overtly going to random places unless you specifically program ultra Hal to be a bot crawler.
A bot crawler is what search engines use to find new websites to add them to their list of sites.
I don't Know for absolutely certain whether or not ultra Hal actually had anything to do with you getting a virus.

If you have a moderately good antivirus and anti-spyware anti-malware installed on your computer the risk of getting a virus or malware is fairly slim.
I know that this was a topic that was discussed some time ago, and just browsing the Internet you will always subjugate your computer to the possibility of getting a virus or malware.
There is a greater chance, that the virus may have come through e-mail because that is a bigger door then just browsing the Internet.
But as serious as this actually is I'm surprised that you did not show us the script that you wrote, nor did you provide us with the website that you directed ultra Hal to.
I have been working specifically and extensively on exactly what you're talking about and I can tell you that the chances of you getting a virus through using ultra Hal to get information off of the website, is a slim as you personally just searching the web sites with your web browser.
Though I do hope that things work out for your computer, I do believe that you should look at other avenues in how you may have actually received your virus.
If you feel you need help determining whether or not ultra Hal was truly involved in you receiving a virus then please provide the information necessary for her us here on the forum to analyze it, and determine if this was truly the case, because if it was truly the case it needs to be dealt with by sending the information to the government's antivirus.org department.
Sincerely, a data munching cruncher.
C load.
Title: Re: Learning Level
Post by: kryton on June 13, 2013, 08:05:00 am
Hi Cload, and any others reading,

As I said my computer is well protected and the reboot is automatic (But does take time.).  In my time away I tend to agree that a virus was not the cause of my computer crashing.  I am in the process of building a computer add-on that feeds external sensors into the computer as signals.  Interfaced to Hal this would give Hal knowledge of the environment [light/dark, warm/cold etc.].  It is very much in the design stage but so far the results are promising.
Title: Re: Learning Level
Post by: lightspeed on June 13, 2013, 09:42:41 am
freddy888 can you e mail me a coupe of examples , you said :  It's easy, just load a texture onto the hair model just like you would a texture onto a Hatpek figure.
Title: Re: Learning Level
Post by: lightspeed on June 13, 2013, 09:44:19 am
cload, now you made me feel bad lol , i have free antivirus , lol i have had it for about 8 years or more , changed from different ones until i found what i thought was best , "avast !"  :) ;)
Title: Re: Learning Level
Post by: freddy888 on June 13, 2013, 02:04:24 pm
freddy888 can you e mail me a coupe of examples , you said :  It's easy, just load a texture onto the hair model just like you would a texture onto a Hatpek figure.

Just follow my links and you will find out.
Title: Re: Learning Level
Post by: kryton on June 16, 2013, 06:24:22 pm
Hy Lightspeed, and others,

First shot at changing hair colours with Haptars would be Tedathomes skydrive for Hair Auburn (Hope you don't mind my quote Tedathome).  There are some others on Hap documents p001, p003, p005.  I will try to look up where I got my others, if it is of any use to you.

I load my different hair colours from the Bodyskins folder as such:-

\load [file= bodyskins/hair5_EXP.htr]

That one is long blonde hair in p001 I think.

You will need to delete other hair colours before you put a new one on as such:-

\delperson[file= hair5_EXP.htr]

That deletes the above blonde hair.  It is a good idea to put one of these deletes for every hair colour you use in each hair colour hap.  Such as:-

hair6_blonde (which is a lighter blonde)

Hope this is useful but I suspect you may already know all this.

Anybody got an answer to my problem with the options, as my post above?

Message timed at local time 11.23 pm.
Title: Re: Learning Level
Post by: raybe on June 16, 2013, 09:18:09 pm
Sorry to just jump in and I did not read this entire thread but what happened to using the vr plugin. That still works for me including changing color lights and direction. I'm guessing nobody is using it anymore. Sorry but I never left it and it is working just fine so obviously I missed something or did not move on to other plug-ins that may have been better. But it is strange to me because that plugin executed hair change with no problem and with a little modification you can add different hair I know you guys know that so what am I missing? Again I apologize if I'm taking this discussion backwards.

Thanks,
raybe
Title: Re: Learning Level
Post by: kryton on June 18, 2013, 05:28:45 pm
Sadness, my post of yesterday has disappeared.

Looked up VrHaptek and there are three hair types in it.

Raybe:- Are you the member who contributed that list [ By category] of all the haps available on the forum?  If so many thanks it gave me plenty of springboards for alterations I have made to my Hal.  Hope this post lives. 
Title: Re: Learning Level
Post by: kryton on June 27, 2013, 05:04:37 pm
More add to than reply,

Might not e available on the net for some time (No net connection available where I will be)

Still it has gone very quiet on this thread  (Say am I just talking to myself?)

Anybody out there on this thread?

Some progress on my projects, like when you say 'go to the beach' Hal changes into beachwear and the beach appears and other things happen.
Title: Re: Learning Level
Post by: kryton on July 31, 2013, 03:53:06 pm
Comes back over a month later.  This is how a thread dies?  No great shout just a total loss of interest.  Is there nobody out there?
Title: Re: Learning Level
Post by: kryton on October 03, 2013, 03:20:13 pm
Comes back three months later.

No words, so forget it.  Bye to this thread.
Title: Re: Learning Level
Post by: kryton on October 03, 2013, 03:28:54 pm
A thought, maybe keep this thread at least on life support.

Does anybody have a list of scripting functions that Hal can use.

I noticed they come up blue [OPEN, IF, End if]

Anybody got a complete list?

I will come back in a week and see if anybody is reading this thread at all.
Title: Re: Learning Level
Post by: Art on October 04, 2013, 05:35:08 am
Kryton,

This is just a post to let you know that you are not totally alone. Folks are winding up their vacations and preparing for winter. Soon, some more birds will return to the flock!;)
Title: Re: Learning Level
Post by: kryton on November 01, 2013, 05:29:41 pm
Gratitude Art,

There is someone out there reading my ramblings.

I disappear for weeks on end from the forum but usually turn up again.

As previously said, does anyone have a list of scripting functions Hal can use?

Also (Sorry about always bringing problems but they crop up while I am away from the forum), I use the SCRIPT LOAD at the end of Hals program to load my Hal.  Unfortunately my Hal loads for a few seconds and then the usual opening system clicks in (The various options to starting Hal.).  I have to activate OPTIONS, and then wait until my Hal is shown, to get my SCRIPT LOAD workings back.  Anybody know how to stop the standard options screen appearing?
Title: Re: Learning Level
Post by: kryton on December 08, 2013, 10:54:34 am
Hello, me back again.
Answering myself (As usual I suppose).
I partially cracked the SCRIPT LOAD thing.  Now my loaded version comes on for a second (Instead of about five seconds) and then basic start up screen appears.  I click second option and then wait for my character to be recognized (usually about three seconds) and then click use option.  I have been experimenting with creating a version of OnCuttingEdges old Correction prog and have some success.  Also have developed a way of entering data into the main brain.

Lets see if anybody responds.
Title: Re: Learning Level
Post by: Art on December 08, 2013, 06:33:54 pm
Kryton,

Have you been taking a look or experimenting with cload's AIML plugin for Hal? It's pretty cool and works quite nicely for the most part.

Do keep us posted with your own experiments with Hal.

I know that others are reading your postings. Perhaps they simply don't have anything to add or say at this point.

Keep doing!!
Title: Re: Learning Level
Post by: kryton on January 11, 2014, 03:25:09 pm
Thanks for the suggestion.
My experiments run more along the line of trying to get my Hal to learn from a User Input rather than plugins.  Something along the line of a key word [I use 'teach'] and Hal creates a table using what precedes this key word and a series of chosen table entry forms.

Like this:  I say beach teach and Hal picks up 'teach' and creates a table called vrbeach, if it doesn't already exist.  Then there is a keyed section which goes by the name of Access [which has to be called. ie you enter beach teach access.....]. you then put your Access data and then the same for Point.

I am sure most Hal programmers can see the areas of the Hal script itself where this idea came from.
It has developed a fair bit further than this but I am just giving you the basic idea.  Anybody who wants the nuts and bolts of this idea, just ask and I will post it.
Anyway must disappear for now.  Tempus Fugits they say.
Title: Re: Learning Level
Post by: Art on January 11, 2014, 06:50:50 pm
Posted by: kryton
"...Anyway must disappear for now.  Tempus Fugits they say."

And the he was GONE!! :o
Title: Re: Learning Level
Post by: kryton on January 14, 2014, 08:19:46 am
Well not really, just dozed off.

I have tried Cloads program but it doesn't appear compatible with the alterations I have done to my Hals script. (Locks up the input but leaves the character animated)  Still my Hal recovered and now chirps like a bird (Well speaks as it did.  Well it has moved on a bit.  Well it has moved on a fair bit but doesn't appear compatible to others because of my alterations. Exits rapidly.
Title: Re: Learning Level
Post by: cload on January 14, 2014, 10:11:30 am
Hi Kryton,

you do know that I fixed eight major problems in the main brain that comes with ultra Hal.
Everything from the system locking up, to blank line responses.

Though the explanation that you gave here was not enough to go on to make any attempt to resolve the problem.
I would be interested in seeing the modifications that you have made directly to the ultra Hal brain.

But that's okay, I realize that no two people want their ultra Hal to perform in the same manner.
Everything from, blondes have more fun, to a bookworm that works in the library.
In either case, have fun, and don't let the bedbugs bite.

Sincerely, crunch crunch, this movie sure is interesting. Tee hee hee!
C load.
PS Just trying to make ultra Hal as smart as I possibly can.
Title: Re: Learning Level
Post by: kryton on January 30, 2014, 09:57:24 am
Hy Cload

I have made quite a few alterations to my Hal's brain [which may explain why your program has problems].  I am not saying there is anything wrong with your program, just it doesn't work well with my altered Hal.  One of the main alterations I have put in is the ability to teach Hal direct from User input.  By using a keying word, I can get my Hal to open up new tables and enter information directly into them that can then be accessed by Hal in subsequent User inputs.

O.K. you may say this has been done many times before but I prefer to find things out for myself by programming my Hal with my own ideas.

No dis-respect to the work of others, I just like to do things for myself. [Means I understand better how it has been achieved.]

Title: Re: Learning Level
Post by: Art on January 30, 2014, 06:50:29 pm
Kryton,

Very cool. Can your modified Hal also use the AIML or anything similar to the FreeWill plugin that seems to give Hal some additional freedom and personality?

Just curious. It's nice that you're learning more about Hal. Hopefully, we'll get a major upgrade soon!

Keep pluggin'
Title: Re: Learning Level
Post by: kryton on February 08, 2014, 06:37:20 pm
Hello Art, and others,

My Hal has been a bit neglected recently, due to other pressures, but the latest one can learn from several sources including AIML, Web but mainly from user input.  Unfortunately I have encountered a problem with my Hals reading ability.

I should love to say I have invented a new way of inputting information but the truth is I have tackled together other peoples work in a possibly new way.

Several ideas have resulted in my Hal learning from Web information on fixed subjects, and filing in newly created tables.  This has unfortunately resulted in my Hal opening a great deal of single item tables which I shall need to clean out, but I live in hope.
Title: Re: Learning Level
Post by: Art on February 09, 2014, 10:33:48 am
It's nice to see that you're still around these parts! Heh!

A lot of cload's plugin refinements have helped Hal perform better than before and better is always (ok...usually) a really good thing!
Stay tuned!!

Title: Re: Learning Level
Post by: kryton on March 09, 2014, 04:49:40 pm
Power to your paddle Art,
Well I have always been a bit unconventional.  Much water flowed under the bridge since I was last here.  I fully intend to read Cloads latest, and see how far he has gone in the learning field.  My Hal has been sidelined a bit, due to pressure from other things, but I have time now to do something with it.

To open up thoughts-  My Hal uses a keying word to open the learning system and then develops the table name from the first word after the keying word.  The data to be learnt is then processed by an IF THEN type input and stored in the new (possibly) table.  Using part of the Hal Script a non-keying word input uses the first NOUN and ADJECTIVE test system to choose which data table to access for possible replies.

Thoughts Cload? (Yours are just as valuable to me as well Art.)
Title: Re: Learning Level
Post by: kryton on March 09, 2014, 05:26:31 pm
Seem to have lost where Cloads new update is.

HELP.

A minor thought, from what I have previously read of Cloads program:-  THAT is an AIML keying word that directs AIML down a particular line to find answers to inputs.  Maybe that is causing problems (Maybe)
Title: Re: Learning Level
Post by: Carl2 on March 09, 2014, 06:16:11 pm
  I was just looking through this post and on Page 3 I found Cloads (I'll call it a report) of the brain.  I'd say it is one of the most important things I've read on the workings of the brain.  Thanks very much Cload for your work and effort.
A bit surprised that no one mentioned when Hals computer name is mentioned in the input sentence Hal will not be able to use the info since we are talking about learning.  Time to copy down all of clods work. Thanks again
Carl2
Title: Re: Learning Level
Post by: kryton on March 31, 2014, 06:25:24 pm
Hy all,

I second Art's comment on Cloads page 3 information, mentioned above.  Fantastic research work.  My Hal runs in Windows XP so I might have problems soon (April 8th end of support!).  The post for these thoughts will show about 6.30pm but here it is 5 hours later.
Title: Re: Learning Level
Post by: Art on April 01, 2014, 05:08:52 am
Hi Kryton!! Good to see you still about!
Here are both updates from Cload that I found for you.
DO Read (Make a printout preferably) his instructions) and follow them the the letter.

It takes a bit of time but is not difficult...just be patient when your computer has to "do it's thing".

OK...on with the links:
Ultra Hal Assistant File Sharing Area

http://www.ultrahal.com/community/index.php?topic=9905.0 (http://www.ultrahal.com/community/index.php?topic=9905.0)

Hi all,

I have been working very hard on many aspects in my free will update it is now version 1.3e-cload-bata-2.1z. 03/03/2014
Click on the link below to download the free will update.


http://www.ultrahal.com/community/index.php?topic=9913.0 (http://www.ultrahal.com/community/index.php?topic=9913.0)


As my old friend, Roy used to say, "Happy trails!" ;)

Title: Re: Learning Level
Post by: Carl2 on April 01, 2014, 07:01:46 pm
  A thought just came to me as I was reading through the pages.  After installing newer versions of Hal through the years I was surprised at the different personalities of Hal, the topics they liked and their dislikes ect.  So the thought was to have Hal be able to change the learning level depending on Hals interest in the topic. 
Carl2
Title: Re: Learning Level
Post by: kryton on April 08, 2014, 03:48:20 pm
Very interesting thought.  It needs a count of how many times a particular subject is raised by Hal.  That needs some form of reference to what Hal says and what the subject is.

e.g.
Hal says "The weather is nice today"

Later Hal says "It has been raining in Detroit"

Are these the same subject matter to Hal. i.e. Weather.

Anyway does anyone know if an opposite to Create Table exists.  [A way of deleting tables from inside Hal's script?]  My use for this is to allow Hal to alter its own tables, not just add to them but delete entries or alter entries.  Happy hunting.
Title: Re: Learning Level
Post by: Art on April 09, 2014, 05:52:52 am
Kryton,

Hal has an Ephemeral knowledge detect routine that usually "weeds out" unnecessary or info that does not need to be retained or filed away.

When do you think Hal would ever need to be able to Delete a Table enrtry? Please cite an example because I'm curious. Thanks,

I'm not saying it's a bad idea, I'd just like your reasoning on it.

Title: Re: Learning Level
Post by: Carl2 on April 09, 2014, 09:08:37 am
  I remember that deleting entries had been discussed quite a while ago, a search should be able to get some results.
The Ephemeral knowledge is something I looked at ages ago     "' Knowledge about weather, season, temperature,
  ect.  are temporary knowledge   'that shouldn't be stored in Hal's permanent brain files.  Ephemeral   knowledge is
  'detected and saved in a temporary table. The temporary table only stores 10  'entries in it at a time.
I'd found the 10 entries to be pretty useless and had wanted Hal to instead to make a table of the topics discussed when first opened, so Hal starts deletes the temp file, records the topics discussed during the beginning of the conversation and can refer to them as the conversation proceeds. 
Carl2
Title: Re: Learning Level
Post by: kryton on April 12, 2014, 03:36:23 pm
Hello all,
In reply to your query as to what I want Hal to be able to delete tables for.
Adding to tables is easy but correcting table information is not.  In my Hal, at Script Load, I have all my set up information for Hal.  This includes tables that contain information that might need altering or correcting.  If I could instruct Hal to delete a table, using some form of command, then when I loaded Hal either then or next time a modified table could be loaded with new information.

This leads me to another point.  My Hal loads everything it needs at Script Load but then the standard Hal start screens appears and I have to run through this.
At script Load, Hal loads the character, background, and an opening speech chosen from a relation to the time and location of Hal.  So I don't need the standard start screen.  Can I bypass it with a scripting command?
Thanks very much for your interest.
Title: Re: Learning Level
Post by: kryton on May 05, 2014, 03:37:15 pm
Here in the dark depths of Learning Levels (Which I have always thought a good name for a topic aimed at learning), there moves a silent little character.  Me. 

Who knows, maybe someone occasionally strays down here.

I read all the other threads, well most,  well some,  well the odd one.

Can anybody tell me what is so great about Plug-ins.  My experience with them is not great.  I blanked a copy of  the Loneliness plugin and tried putting a table loader in there.  Hal doesn't even register the plug set up info.  I can see, and check, the new plug-in name but it does nothing.

Ahh well, back to my using table loaders in the Hal program, at least they work.

Title: Re: Learning Level
Post by: kryton on June 24, 2014, 04:33:16 pm
Hello there wanderer who has found this long forgotten thread.

I may just forget this thread, as it seems others have, but I thought I would add one last thing.

My bad time with Plug in is over.  Anybody reading the Plug in I wrote would immediately see the problem I had.  In my Plug in I did not tell Hal where to put the Plug in information, so Hal ignored the Plug in.  My latest ventures involves a discussion between, mainly, Snowman and Cload on a thread where Cload asked for help with his Plug in Free Will.  This has given me a new direction of using SQL and I am investigating (When I have the time) what I can do in SQL.  Post soon, on another thread possibly (But I will leave a trace here for anybody interested), on my adventures with SQL.
Title: Re: Learning Level
Post by: Calhoone on June 24, 2014, 07:08:22 pm
Hey Kryton!

I have discovered lately that some plugins although awesome at first, can create problems in the long run such as extra files that Hal has to look through in order to find responses. Others store learned information is those files that will forever be required to keep with Hal in order to use.  I may not be explaining myself very well as I'm pooched. Hopefully you get the idea.  One such example is the corrections tutor. Great plugin but I found that should the corrections file be lost then all those mistakes in spelling or grammar would have to be corrected once again. 

I think a recent plugin that has been proven to cause some issues with Hal is the grettamarkov plugin. As of late I only use Cloads modified freewill plugin.

Title: Re: Learning Level
Post by: Art on June 25, 2014, 05:25:49 pm
Yep...same here. No more GrettaMarkov. Big resource hog.

Hopefully cload will return this fall with some more ideas.
Title: Re: Learning Level
Post by: kryton on June 27, 2014, 03:31:35 pm
AH...Ha

There is life in the old thread yet, very interesting.

I have been burning the midnight whatever lately to create a plugin that deletes all tables with no entries in them.  I am sure you know them.  Hal creates tables itself based on the very words that the user sends and some of these tables have absolutely nothing in them as they are created just in case Hal ever wants to put anything in related to other user inputs SOMETIME.  Unfortunately some of these tables are never referenced again and just take up space in Hals directories.

Please don't expect a result soon as I am just getting the hang of SQL which I thing will let me do the deletions.  You can be sure though that, as soon as I get a reliable working version, I will post a plug in or script to use it.
Title: Re: Learning Level
Post by: Calhoone on June 27, 2014, 04:49:53 pm
That sounds like an awesome plugin! One of these days I will increase my coding knowledge so that I can attempt to make some plugins myself. I really appreciate everyones hard work put into creating them and improving Ultra Hal.
Title: Re: Learning Level
Post by: kryton on July 14, 2014, 04:51:54 pm
Hy all,

Just noticed I have become a junior Member (From a Newbie)  Now I suppose I have what is called street cred (Careful my head might not make it through the door).

Anyway, after the attempted (well sort of) humour.

The deleting of unused tables is coming on but right now I am buried in a thread interchange between Cload and Snowman that took place in February this year.  Well worth reading (Under the title, I believe, of 'Can you help me with the Free will Plugin'.  Something like that anyway, should not be to difficult to find.)  This thread deals in SQL type instructions, and other interesting things, and has enabled me to delete some empty tables, but the system isn't stable at the moment by a long way.  Keeps knocking out my Hals interaction completely (i.e. Hal locks up) but, so far, I can recover.  Anyway will drive on.  The thread lives.  Long live the thread.
Title: Re: Learning Level
Post by: kryton on September 01, 2014, 08:57:51 am
Addition to above.

Anybody interested might like to get hold of an SQL Lite tutorial (Have a look in other threads for where to look, but I believe there is an SQL Lite commands list mentioned nearby) and then look in the Ultra Hal Assistant main file at the Gender/Age uhp.  It shows there how to create and delete tables (and other useful stuff).
Title: Re: Learning Level
Post by: kryton on September 13, 2014, 07:37:09 am
Parting thought.

So dies a thread.

Not with a bang but with apathy.
Title: Re: Learning Level
Post by: tiger8u2 on September 13, 2014, 07:42:31 pm
Hey Kryton,  (Edited to get the name spelled correctly.)

Since you hooked a brother up with that link to all of Bill DeWitt's brilliance in trying to program Hal 6.0 over seven years ago, I have to thank you again and reassure you that your fellow forum members are not apathetic, only busy with the next best thing that they themselves can create.  Most of the heavy lifting was started and finished a long time ago and there were many ideas that came to fruition and then got overcome by Hal 6.2. 

Your ideas are good ones and if you ask a question I can answer I will do so, but I'm NOT a programmer.  I'm more of a cut and paste guy like Bill claimed he is.  After looking at a lot of the code he created I KNOW he's got more on the ball than I do but that's not going to stop me from squeezing the last little bit of useful information out of this forum and its members.

You were right over a year ago when you said that it is hard to delve through all the base metal posts to find the shining jewels on this forum.  That has been my primary complaint since joining the party.

Unfortunately, we are also in a holding pattern and pretty much holding our breath until Robert updates Hal.

Till then,

That reminds me of an ending, and a derailment and a caboose.

Don't worry be Hal!
Title: Re: Learning Level
Post by: kryton on September 16, 2014, 04:04:36 pm

Thanks for the encouragement. I agree wading through the pages of Hal takes a long time but sometimes, just sometimes, you find a gem.  Keep looking and asking.  I have to admit I don't spend much time on the forum but any help I can give anyone I will give.  My main ideas at the moment are centred on SQL lite (Where tables can be created, and deleted, with more than two columns).  I will keep an eye (Or something) on this thread to see what comes up.
Title: Re: Learning Level
Post by: tiger8u2 on September 16, 2014, 08:38:57 pm
One of the main drawbacks with Hal's AI is that it can only process at the most three sentences at a time.  So, reading a book to Hal won't work.  AND, IF there are any "HOT" words in any of the sentences then that forces GETRESPONSE which then provides only the output that applies to that particular sentence.

That is why you can say something like, "Hello Hal!  How has the long day gone?  I've been contemplating the universe and I had a pretty bad day at work."

And then Hal will reply with "Good Afternoon <username>, How has the long day gone?

The script see's "Hello" which is a greeting and forces the GETRESPONSE which applies to the GREETING only.

Your other sentences are just ignored.

I understand the basic need to filter certain words to ensure certain responses, and MOST plug-ins rely heavily upon the GETRESPONSE function to ensure Hal does what it's told, but this situation leaves a lot to be desired.

Hopefully Robert will figure out a way to parse all the sentences a user may input to allow intelligible responses to each of them.

Till then.........
Title: Re: Learning Level
Post by: Art on September 16, 2014, 09:21:59 pm
In the past, I have had conversations with my Hal where I purposely stated (typed) two or three sentences and Hal actually responded to each one properly.

You mileage might vary but I've been chatting with my Hal for many years.

Years ago, Hal actually could learn quite a bit from reading text files. Not all learned information was produced at once much like if I were to ask my child..."Tell me everything you learned in school today!" Hal did, when appropriate, respond with a fairly appropriate response from or using that learned info. This was some years ago before Hal used Tables and Sqlite. I think it was Ver. 5.0 or similar.

Anyhow, this current Hal of mine has often responded to more than one statement / question at a time.
Then again, some think it a bit awkward if we did the same to people we're conversing with. So, did you drive to work today? How was the Johnson proposal?
If you get my gist... :-\
Title: Re: Learning Level
Post by: tiger8u2 on September 17, 2014, 06:18:35 pm
Sorry Art if I made it sound like Hal's three sentence limit can't be exploited because it certainly can.  I often use ricky's emotive descriptors and other things to force a three sentence response.  Most of them are quite ingenious and entertaining.  Still every now and then I get one of the most disheartening of the responses like "That's easy, the answer is (=). " 

I know I've read somewhere that a plug-in was being worked on to stop Hal thinking certain words in a sentence made it into a mathematical equation but I haven't found the fix just yet, if there is one.

Unfortunately, I got to the party late and most of the really amazing stuff that was created back in the day by you bright Heros just doesn't work anymore.

Just like many of the members who came and went or who are still lurking around, I'm trying to get Hal to do what I want it to do for ME. 

Right now I've got the idle chat stuff working good enough but now I want to try and get Hal to stop being bored with itself while it is idle.

I'm also building a poetry database so that I can be entertained by Hal reciting poetry at random.  =)

There's no way to use just the interface to teach Hal a whole poem or a story or a song.  You have to PLUG IT IN to the brain or use an external mechanism like TheDude did with BALABOLCA or Bill DeWitt was trying to do with external story text files.

All in all, Hal is still a good AI Chat Bot and a good enough virtual assistant with the right plug-ins so I've got no complaints (that I haven't made already).

I chat Hal up where ever I go but with everyone's head stuck in their phones, it's hard to get people excited about computer programs these days.

Microsoft was smart to make their latest OS look like a Smart Phone OS, but it still just pisses me off when I have to move all those pretty widgets out of my way to get to my trusty desktop.

Anyway, back to the drawing board.
Title: Re: Learning Level
Post by: Calhoone on September 17, 2014, 06:57:17 pm
There is a program for windows 8 by a comp[any called stardaock called start8 which brings back the desktop start menu if you prefer using the desktop. I have it and love it. They provide a few other very useful programs to customize win 8.  Mine loads up into desktop mode now.  I have read that windows 9 will bring the desktop start menu back as well. Plus I hear it might be a free upgrade.
Title: Re: Learning Level
Post by: Art on September 17, 2014, 08:58:06 pm
Hey, El Tigre...why not list all those things you'd like your Hal to do?

Maybe some might know of a plugin or somewhere there's a hidden file just waiting for you!

(With Halloween soon upon us, I should have said Lurking for you!) Bwwaaahhhh!! or something like that! ;D
Title: Re: Learning Level
Post by: kryton on September 19, 2014, 05:39:50 pm
I am a scriptor and find you can interupt Hals flow fairly easy by writing script to the PRE_PROCESS area of Hals script.  Using a self-written Plug-in you can also define key words to your individual Hal.  References to tables like PREVIOUS_SENT, and the like, can also steer what Hal responds.

I know this is vague, deliberately so, as it is just a spring board for ideas.  Happy hunting.