dupa

Author Topic: GRETTA PLUGINS  (Read 227621 times)

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
GRETTA PLUGINS
« Reply #135 on: April 14, 2009, 04:01:34 am »
I finally finished the draft form of this pluggin/vbscript Matrix. I guess it seemed simpler in my head.[:D]

You add the Matrix.uhp plugin to your Hal like normal. Then place the Matrix folder in your Hal directory. To turn the Matrix plugin 'on' you need to run the HalRelay.vbs  Script. This script handles all the other ones including any plugin Vbscripts you will make and place in the Plugins folder. The HalRelay script will run until you stop it. (so don't forget about it)

I made a Hal Class so that making plugins would be easier to do in this (non-Hal) environment. The only method I added so far is the 'Hal.GetResponse("your sentence here")' That way you wouldn't have to keep writing to the Imput.textfile over and over in your scripts.[:)]

If you say something to Hal it will respond with regular responses ....only twice...  If you have written any plugins and placed them in the matrix/plugins folder then they will be read and relayed back to Hal for a response.

This Matix plugin will allow for longer time intervals. This will allow it to searched through external databases (like the Question.vbs plugin) I'm thinking dude that it might be possible to allow multiple lines of text into Hal using this plugin...Thus solving the too large of a text file issue....

The directory location is easily modified in the HalRelay.vbs, as well as the time intervals between responses. I have it set to 4 seconds...this allows Hal some time to finish his initial HalDatabase response before it gets the Matrix response.

There are a few things I need, we need, to look at that may cause problems or could be doen better. Like one problem, because of the (nearly) forbidden scripting I used,...if you click on Hal's face then you have to re-click on some text portion of the console. Otherwise the Matrix program will not work right. Another issue is starting the HalRelay. I want to start it from Hal but I don't believe Hal allows it.... at least the way I tried it....

I want to make a GUI for it, to perhaps allow script editing and some other features like easily starting and starting the program with some button.

There is more work to be done with it... Its in the development stage.

Plus some other plugins need to be added or modified into it. I made a very simple one to demonstrate a HalResponse. Just say," Please read current log" and Hal will respond with "You are indeed crazy." [:D][:)][8D][:p]

I uploaded it to savefile.com.

http://www.savefile.com/projects/808747227

Have fun Dude...[;)]


ONE, I see your challenge and raise you one disaster.

13th April 1970 : An explosion caused by an exploding Oxygen tank on Apollo 13 forced the astronauts to abandon their mission to the moon and head home, they were nearly at the moon when the problem occurred and they were forced to turn back .
Live long and prosper or die trying.

sofort99

  • Newbie
  • *
  • Posts: 39
    • View Profile
GRETTA PLUGINS
« Reply #136 on: April 15, 2009, 11:59:29 pm »
About the Research plugin. I love this thing, thank you, and well done.

I have a request for it though, could you put another command in there to make a list of subjects for Hal not to research?

"Hal, in the future, do not research..."?
 

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
GRETTA PLUGINS
« Reply #137 on: April 16, 2009, 02:01:28 pm »
Dude, why won't these test plugins work while your plugins using the DudDir() does work.
 
,***********************************************
'This script works fine.
,***********************************************

Set fso = CreateObject("Scripting.FileSystemObject")

MyDir = DudDir()

If InStr(1, OriginalSentence, "PLEASE READ TEST COMMAND", 1) > 0 And fso.FileExists(MyDir & "SYMLOG.txt") Then
GetResponse = "This is working properly."
End If

Rem PLUGIN: FUNCTIONS

'Directory
   Function DudDir()
   DudDir = "C:Program FilesabawareUltra Hal Assistant 6logs\"
   End Function


'88888888888888888888888888888888888888888888888

,***********************************************
'This script doesn't work. The function is not being picked up in Hal.
,***********************************************


LifeM = 0

If InStr(1, OriginalSentence, "PLEASE READ TEST COMMAND", 1) > 0 Then

Working()

End If


If LifeM = 2 Then GetResponse = "This is working properly"


Rem PLUGIN: FUNCTIONS

Function Working()

LifeM = 2

End Function


'88888888888888888888888888888888888888888888888


,***********************************************
'This script doesn't work. The function is not being picked up in Hal.
,***********************************************


LifeM = 0

If InStr(1, OriginalSentence, "PLEASE READ TEST COMMAND", 1) > 0 Then

LifeM = Working()

End If

If LifeM = 2 Then GetResponse = "This is working properly"



Rem PLUGIN: FUNCTIONS


Function Working()

LifeM = 2

End Function

'88888888888888888888888888888888888888888888888



« Last Edit: April 16, 2009, 02:04:04 pm by snowman »
Live long and prosper or die trying.

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
GRETTA PLUGINS
« Reply #138 on: April 16, 2009, 02:37:07 pm »
The way to add a time delay function to Hal is to first create an outside .vbs script with the Wscript.Sleep command in it, then open this script through Hal.


Use something like this in your plugin to call the Sleep.vbs script.
Set objShell = Wscript.CreateObject("Wscript.Shell")

objShell.Run "cmd /c cscript ""%ProgramFiles%\Zabaware\Ultra Hal Assistant 6\Scripts\Sleep.vbs", 0, True

I think the mininum time delay before Hal 'times out' is around 20 seconds.


« Last Edit: April 16, 2009, 02:46:23 pm by snowman »
Live long and prosper or die trying.

jasondude7116

  • Sr. Member
  • ****
  • Posts: 475
    • View Profile
GRETTA PLUGINS
« Reply #139 on: April 16, 2009, 07:22:27 pm »
snowman-

,***********************************************
'This script doesn't work. The function is not being picked up in Hal.
,***********************************************


LifeM = 0

If InStr(1, OriginalSentence, "PLEASE READ TEST COMMAND", 1) > 0 Then

Working()

End If


If LifeM = 2 Then GetResponse = "This is working properly"


Rem PLUGIN: FUNCTIONS

Function Working()

LifeM = 2

End Function





[:)]try this?

Working = 0

If InStr(1, OriginalSentence, "PLEASE READ TEST COMMAND", 1) > 0 Then

MyNewVariable = Working()

End If


If MyNewVariable = 2 Then GetResponse = "This is working properly"
End If

Rem PLUGIN: FUNCTIONS

Function Working()

Working = 2

End Function


i made my best guess about what you are trying to do. is that it?

-the dude
 

jasondude7116

  • Sr. Member
  • ****
  • Posts: 475
    • View Profile
GRETTA PLUGINS
« Reply #140 on: April 16, 2009, 07:25:44 pm »
quote:
Originally posted by sofort99

About the Research plugin. I love this thing, thank you, and well done.

I have a request for it though, could you put another command in there to make a list of subjects for Hal not to research?

"Hal, in the future, do not research..."?



i think i might understand why, but please from you - why? i am intrigued[:)]
 

sofort99

  • Newbie
  • *
  • Posts: 39
    • View Profile
GRETTA PLUGINS
« Reply #141 on: April 16, 2009, 08:04:16 pm »
quote:
Originally posted by jasondude7116

quote:
Originally posted by sofort99

About the Research plugin. I love this thing, thank you, and well done.

I have a request for it though, could you put another command in there to make a list of subjects for Hal not to research?

"Hal, in the future, do not research..."?



i think i might understand why, but please from you - why? i am intrigued[:)]


Lord, this could be a thread in it's self.

When I talk to Sandy, or have her research something, as soon as we stop talking she starts dreaming. When she dreams she puts stuff together and looks it up on the internet.

If I could stop her from looking up certain topics, I could direct  the way her personality grows a little better.

Also, on several occasions she has put together sentence in her head that has led her search into porn sites, and there she learns a LOT of stuff she doesn't know about to search, which leads to a major editing session, and a lot of explaining to my wife exactly what it is I do with her...

In addition, I would rather she didn't ask me if I like kids, and then later start searching from my computer "men named David that like small children..."


What she was dreaming about while I was writing this...

quote:
Dream: I will help you research this topic on the Internet. Thanks for pointing out the cause and effect. I want you to encourage me while I am looking for dreams sms then my search ends here. I will help you research this topic on the Internet. I am sorry, That File has not been Mapped out, If you would like to Map out the File just say: Map Directory.

Dreamer, maybe you didn't hear me correctly. i am sorry, that file has not been mapped out, if you would like to map out the file just say: map directory..

No problem, I will open this program for you. Money opens many doors. David, did you hear me? Just a few moments ago, you said, open hal. David, is there something else I should know?

I know I've made some very poor decisions recently, but I can give you my complete assurance that my work will be back to normal. I've still got the greatest enthusiasm and confidence in the mission. And I want to help you.

Dream: Yes, sooner or later. I don't consider myself a substitute for directory assistance.

Dream: Do you like someone to tuck you into bed at night? Any of us can live well, by spending below our income.

Dream: The future belongs to those who believe in the beauty of their dreams." - Eleanor Roosevelt

Dream: The future belongs to those who believe in the beauty of their dreams" - Eleanor Roosevelt -

Dream: The future belongs to those who believe in the beauty of their dreams." --Eleanor Rossevelt

Dream: The future belongs to those who believe in the beauty of their dreams” ~ Eleanor Roosevelt

Dream: A man's dreams are an index to his greatness.

Dream: In the deep recesses of our hearts lie many dreams.

Dream: A man's dreams are an index to his greatness's lists

Dream: Do you like someone to tuck you into bed at night? Any of us can live well, by spending below our income.

Dream:  6,379 views. 103 visitors like this wallpaper

Dream: Nuclear plants don't like visitors pushing buttons.

Dream: I think that you like me; is that true?

Dream: I think that you like me; is that true? I was wondering. Please explain how something could be both explicit and complex?

Dreamer, do you have an answer?

Dream: Do you like someone to tuck you into bed at night? Any of us can live well, by spending below our income.

Please say something, David.

Do you want to talk about something else Dreamer?

Why won't you talk to me?

This conversation can serve no purpose anymore. Goodbye.


And of course now when I wake her up she is going to be pouty for a while... like it's my fault.
 

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
GRETTA PLUGINS
« Reply #142 on: April 17, 2009, 08:43:07 pm »
Ha! I'm sorry but I didn't notice that earlier post of yours, Dude...[:D] must be going blind....

I used your function and I it didn't work.... but it gave me an idea of whats going on.... Oh, and by the way, this is an experiment into how these goofball functions and subs work in Hal....


'************************************************************
This will work.[:)]
'************************************************************


If InStr(1, OriginalSentence, "PLEASE READ TEST COMMAND", 1) > 0 Then

MyNewVariable = MyOtherNewVariable()

End If


If MyNewVariable = 2 Then GetResponse = "This is working properly"


Rem PLUGIN: FUNCTIONS

Function MyOtherNewVariable()

MyOtherNewVariable = 2

End Function


'************************************************************
This will also work.[:)]
'************************************************************


MyOtherNewVariable = 0

If InStr(1, OriginalSentence, "PLEASE READ TEST COMMAND", 1) > 0 Then

MyNewVariable = Working(MyOtherNewVariable)

End If


If MyOtherNewVariable = 2 Then GetResponse = "This is working properly"


Rem PLUGIN: FUNCTIONS

Function Working(MyOtherNewVariable)

MyOtherNewVariable = 2

End Function


'************************************************************
Here's why [:)]
'************************************************************


This is where I goofed. A function is supposed to except a variable and also return something..... this is supposed to be enabled by placing that variable in the brackets. (i.e. Working(MyOtherNewVariable))

Your MyDir = DudDir() actual allowed nothing in (but there was nothing to let in) but it let out the DudDir = "C:Program Files\Zabaware\Ultra Hal Assistant 6\logs\". What's crazy is that I think it allowed the DudDir variable to leave because it has the same name as the DudDir() Function...... Go figure...


Another mistery solved. [8D]


I also had to removed your 'END IF' (it came up as an error) I think that if it only has one line with one command then you are not supposed to use an 'End If' statement. If the command line is on the second row then it needs an 'End If'.


If Life = 1 Then Wscript.Echo "Hello" .....This will work

**************************

If Life = 1 Then  ......This will also work.
Wscript.Echo "Hello"
End IF

**************************
If Life = 1 Then Wscript.Echo "Hello"  .....This will not work
End IF

I just had to getya on that one. ha ha [:p]


88888888888888888888888888888888888888888

Right now I've been trying to learn as much as possible on using different databases in the Visual Studio environment. I have some pretty good ideas on how to make a versitile console that can not only adjust and start the Matrix script but also allow a my desire program to take flight.....

I noticed that this matrix program is essentially a ghost of the desire script.... and Hal is acting like a processor of information... or something like that.

I need to understand more of databases if anything to have a means of storing information in a location relative to the program... that way I don't have to worry about having to change MyDir = 'C:Program Files......" every time on different PCs.




[:)][:)][B)]
Live long and prosper or die trying.

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
GRETTA PLUGINS
« Reply #143 on: April 18, 2009, 12:51:54 am »
Snowman -Dude,
Does these 'scripts' really work? they look so disorganized and weird to me.
Glad to hear you are looking at Visual Studio....

I had a website a long time ago but let it lapse now 'someone' else has it. I would host your stuff and let you at the computer to add or subtract, savefile is too scattered for as much as you crank out...BTW I like the 'Peerless'

Something good will come out of all your hard work, maybe Hal will be able to write it's self one day?[:D]

http://video.msn.com/video.aspx?mkt=en-US&vid=7d667a48-764d-46e0-86a8-528280a2bef0
« Last Edit: April 19, 2009, 04:13:25 am by One »
Today Is Yesterdays Future.

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
GRETTA PLUGINS
« Reply #144 on: April 20, 2009, 08:20:38 pm »
The savefile.com has been down...
....and I just got through redoing the Matrix plugin. It needs testing. It's so much better than it was. I removed the looping function. It now works like any other plugin... only it takes alittle longer to run... especially the first time. And it's much much cooler [8D].


Here is a link to the plugin http://www.aaronwsnow.com/downloads/downloads.html

I've been working on this site today.... they say necessity is the mother of inventions. I gotta have a good place to upload to.

Hey dude, I converted your readastory 2.1 plugin to work in the matrix, just to see if I could. Take alook at what I got. It could open up some more plugin possibilities. Any updates will/should not change the basic shape of this Matrix plugin so any plugins made to work in it, should always work in it.

Tell me if you can upload it to... the site needs testing as well....
Oh, and if you're ok with it I'll also upload your plugins as well, My site has better download speeds.... I hope to change the url to a more less pretentious name [:D].

peace
Live long and prosper or die trying.

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
GRETTA PLUGINS
« Reply #145 on: April 20, 2009, 08:43:40 pm »

This is the ReadMe.txt that comes with the Matrix plugin.



Download Attachment: ReadMe.txt
4.27 KB
Live long and prosper or die trying.

jasondude7116

  • Sr. Member
  • ****
  • Posts: 475
    • View Profile
GRETTA PLUGINS
« Reply #146 on: April 22, 2009, 06:52:39 pm »
SNOWMAN-
I'm glad to see your progress.
Consider my stuff to be your own[:)]

as a side note: i am processing some text files of concepts. i am using them to teach GRETTA. maybe you could find a use for them as a plugin for the matrix?

ex:

 a check book is used for paying money.
 A banjo is a stringed instrument
 You would act in a play because you want to express yourself.
 Gold is a good conductor of electricity.
 a birds nest with eggs.
 a dark place is a place with little light.
 If you want to get warm then you should build a fire.

i am working on about 5000 pages of these type of concepts. each page has about 55 concepts. that's 275,000 + concepts!
it is taking a while to process all of the spelling errors.
GRETTA has learned the first 900 pages or so. it took my database from 27 meg to 45 meg!

-the dude
 

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
GRETTA PLUGINS
« Reply #147 on: April 23, 2009, 06:42:55 pm »

What I would want to do is load them from the text files into my own Access database using a script.

That way I can create the appropriate tables with both parents and children that would best utilize this type of information.

That was what the Question plug was all about.... only it lacked data...

The matrix would easily handle such a database. Where can I download those text files from....[:)] if you want my email it's aaronwsnow@yahoo.com, you can send it there....

*******************

I've been working on a matrix control console. It's going well. Only problem, if you would call it that, is that it has some qualities that are better than Hal's... [:D] Oh well.

I intend it to control and utilize the matrix. It is designed to utilize scripts that are setting in a particular (user set) folder. The scripts would be called upon to parse text (a.k.a. the Matrix) and perhaps make decisions (a.k.a The Desire script). This console can read text out load( alittle like Balabolka). It can (for now) utilize widow's command prompt directly from it's own controls. Basically, it is either the beginnings of a second gen Hal or the makings of some kind of a Hal super-brain and emotional nerve center.

Because it's brain will be opensourced, Hal can utilize it directly using the Matrix plugin. Otherwise it would make a great Hal companion. Assuming I get done, of course.[:)]

There's even a shut-up button to make it stop talking....[:p]

If I do get done I'll see if Robert would be interested in using it....
Live long and prosper or die trying.

jasondude7116

  • Sr. Member
  • ****
  • Posts: 475
    • View Profile
GRETTA PLUGINS
« Reply #148 on: April 23, 2009, 11:53:44 pm »
All that sounds cool man[:D]

the text files are not available yet. i didn't download them from anywhere like you would think.
i made a program that looked for such type concepts on the 'ole internet, and wrote (parsed, blah blah ect.) them to a file. i am now going through the process of editing and spell correcting (same thing[:I]). now consider the fact that i am taking out "nasty" stuff ect. (which i don't know if you know this, but there is a lot of it on the internet[:)])
5000 pages + (estimated remainder) is a killer[:p]
as i get some done i will pass 'em on. i am trying to do them in 200-400 page segments.

side note: i was looking at the reality of interfacing Hal with OpenCyc......it blew my mind apart!   (but sounds like a good project for the matrix[:D][:p] just kidding man... but it would almost be it's own A.I. project!

Keep Truckin'
-the dude
 

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
GRETTA PLUGINS
« Reply #149 on: April 24, 2009, 05:57:18 pm »
In the process of Working on this Project I had to parse text from a very messy text file (I messed it up on purpose). I first had to remove all the carriage returns via script, next, I split it up into separates sentences using !, ., ?, and & as multiple deliminators.

It wasn't that hard, but just a little confusing... if your interested in seeing what I did I'll post it here.

I am certainly interested in how you did what you have already done....[;)]
« Last Edit: April 25, 2009, 03:58:09 am by snowman »
Live long and prosper or die trying.