dupa

Author Topic: GRETTA PLUGINS  (Read 223756 times)

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
GRETTA PLUGINS
« Reply #30 on: March 11, 2009, 04:44:09 am »
Glad to see you apply the balabolka program to your readastory. I haven't gotten to the Journal yet. I've been too busy working out the desire vbs. I haven't done anything with Hal, while I've been working on this project.

I added a script that will probably need to work simultaneously with the desire script. There are three programs that need to work together - not in the same script. 1# a program that gathers a list of things it wants, 2# a program that gets what the list dictates, 3# a program that monitors the other programs successfulness and makes decisions to terminate if it needs to.

The desire program that I put together and placed on savefile.com is the #3 program. I just got through working through the 2# program. It searches through multiple file and collects (I say that loosly) the object it is looking for and saves it in the HavList file. This shows the desire program that it now has the object it was looking for and no longer needs to desire it.

I need to connect those two different scripts remotely. Probably will use some of your scripting to do that. All three scripts need to work together to make a proper desire that could be applied to any program.....including Hal.

Hal learns speech patterns (I think). I would need to cause Hal to say desire oriented and purposeful speech. Remember what he said and remember what you said. He would need to learn from a desire point of view. Like for instance learn instruction or imply instruction that would suit Hal's personal desires.

This is really the first time I've given that any real thought....
One step at a time. When or if that time comes I'll probably will need someone who will know enough about Hal that could properly apply my program to it. Or at least know enough to be able to get that sort of information. Oh well.

Signing Out at 3:41 A.M.,

Snowman
Live long and prosper or die trying.

jasondude7116

  • Sr. Member
  • ****
  • Posts: 475
    • View Profile
GRETTA PLUGINS
« Reply #31 on: March 12, 2009, 04:13:25 pm »
i would be glad to help you with anything i can.
i like the idea very much.
keep truckin'

-the dude
insomnia? (i do) can get WHACKY![:D][}:)][:p]
« Last Edit: March 12, 2009, 06:30:57 pm by jasondude7116 »
 

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
GRETTA PLUGINS
« Reply #32 on: March 12, 2009, 08:44:56 pm »
I compartamentalized the desire script (made a few sub-routines).

I updated The Ghost in The Machine.pdf.

I (think) I finished (this version) of the #2 Program and compartamentalized it as well.

Next thing is the #3 Script.[:)]

'insomnia' i do not like; getting a bit 'WHACKY!' i like[:p]

People can get so aggressive at things they tend to be a bit pushy towards other people.... I prefer tired and whacky over alert and pushy any day of the week.[8D]

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 #33 on: March 13, 2009, 12:57:00 am »
Hey Dude I got an idea for a pluggin.

If you've been keeping up with what has been said on
the Ultra Hal Assistant/ Word meaning vs Word purpose forum
then you might be already in the know.


I think we can make a pluggin that can give Hal the ability to understand certain sentences and phrases.

I.e. I want you to read DragonRider but if that is unavailible then read Elric.

Or perhaps if it was said in a equivilent way it would still do what you tell it to. (I think that might be what o.t.c.e. might be reffering to in that forum.)

catch you later....
Live long and prosper or die trying.

jasondude7116

  • Sr. Member
  • ****
  • Posts: 475
    • View Profile
GRETTA PLUGINS
« Reply #34 on: March 24, 2009, 11:25:47 pm »
Hey snowman-

just thought i would check to see how it's going with your "needs" program.

I have done some new plugins if you are interested?
they are available at the link provided in post #1.

-the dude
 

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
GRETTA PLUGINS
« Reply #35 on: March 25, 2009, 02:51:04 am »
I've just arrived today at a momentary stopping place with the Desire program.

I've been working on it nearly non-stop. (I took a little vacation time too[:D].

I need to reflect and see where to take it next. The program now searches in an Environment file (which could represent any environment). It attempts to find things to want, searches for what it now wants, and then attempts to get what it from the File. It places the thing in it's haveFile (so it now has the item) and then moves to the next item on its list. If it cannot find what it wants it searches a few more times before it stops wanting it. It tells you what is up to through a window and it also records its progress in a Log file. It dies when there is nothing more to want (or eat!) or when you shoot your PC with a 12 gage. Sounds like it belongs on a Terminator movie!

Now I think I'll start looking at ways to make it smarter and more functional...as apposed to its current worm-like state. To see how it could be integrated into Hal... Of course Its definitely a learning process...

There is a type of personality control involved also. Whether it spends most of it's time searching or getting what it wants. It's labeled in the first Sub-routine at the top (called Endurance 2 & Endurance 3). The first Endurance adjusts how many times it will spend looking for an object that was not there when it initially began looking.

I need to spend some more time commenting in the script file on what does what. I like to learn how to use batch files both create and modify them so maybe the Desire program can learn on-the-fly new ways of doing things. Right now its only a raging lunatic. It needs a brain....[8D] (HA HA HA, evil laughter!)

You certainly have been busy modifying and making new plugins. I especially liked the AI singing What a Wonderful World. If you wrote that yourself then you obviously have an ear for music...[;)] I haven’t given myself much time going through all of your new modifications. I been focusing on Wormy [:p]. I'll make time.

If I can get 'Wormy' to learn then 'Look out world!'.

Yes! My PC will now let me upload files. It happened just today. I tried to install the new IE and it would take. So I preformed a restore but then realized my Desire program would also be changed. So I restored the restore, got the program, then restored the restored restore....  To make a really shamefully long story short my current IE now works properly. [8]

Here is what I've done so far... its not ready to take over the world but its something you can look at.

Download Attachment: Life.zip
82.4 KB

The Environmental File has randomly placed text files in it with randomly placed words for it to search and find on its own. You can add as many files or words as you like but if you add more than one word per line then it will treat that sentence as a single item.
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 #36 on: March 25, 2009, 05:58:51 pm »
scratch the batch...

I found out how to call vbs code from another file. That way I can both write new code with a vbs file and then implement it in the same file. This can potentially allow my program to learn new ways of doing things.

 
quote:
Set fso = CreateObject("Scripting.FileSystemObject")
Set objTextFile = fso.OpenTextFile(MyDir & "sayhello.txt", 1, True)
Text = objTextFile.ReadAll
objTextFile.close
ExecuteGlobal Text


It will even call up Sub-routines if you open the text first before you actually call the script in the original vbs file.


fun! fun! (i need a life)
Live long and prosper or die trying.

jasondude7116

  • Sr. Member
  • ****
  • Posts: 475
    • View Profile
GRETTA PLUGINS
« Reply #37 on: March 25, 2009, 08:16:29 pm »
I am new to vbscript, it helps a lot to see ideas.
thanks
i have looked at your stuff. it is beyond me to look at it under 5 hours or so[:I], and get it.

i wish i could help you with it, but i think you are way ahead of me on that one.
-the dude
 

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
GRETTA PLUGINS
« Reply #38 on: March 26, 2009, 12:57:59 am »
Well, I don't really expect anybody to understand it completely; every IF Then and Do While.

The reason why I say that is because I tried to make it as concise as I could. I used allot of Subs to do this and you know how long it takes to work out the kinks.[B)] Therefore it would seem more complicated than it actually is.

By the way, you will need to open the
"Sub AILife(Hav, Life, Death, MyDir, WntList)" Sub-routine
so you can change the MyDir from "C:UsersAaronDesktopLife\" to whatever directory you have put the Life folder in. Sorry.
Just change the one variable and it will correct the whole script.
If you don't change it, it will make its own Life folder in the above directory.

+++++++++++++++++++++++++++++

If you open the Life folder you will find five separate text files. WntList.txt, MemList.txt, HavList.txt, Check.txt, and DesireLog.

Also included: A folder by the name of Environment, the Desire.vbs file, and a bonus Desire.exe file.

Don't bother using the Desire.exe file because the MyDir directory is set for my PC and not for yours....I forgot about that...remember that you'll have to change the Desire.vbs for you PC.


The WntList.txt is where the Desire script will store all the word Objects it finds in the Environment file. Then the script will actively and sequentially desire for the objects that are recorded in this text file.

The HavList.txt file shows all the word Objects the script has already found and retrieved from the Environmental file. It first loaded the WntList.txt file down with what it wanted and then ran a mini program (Sub) to actually retrieve those desired Objects. The HavList file is where it stores all the Stuff if retrieved.

The DesrireLog.txt is exactly what it sounds like....A Log of the Desires activities.....If you run the program over and over again the Log will just keep getting bigger....I need to correct that.
Just delete that file periodically or it can get to big.

The MemList.txt and the Check.txt are just momentary places where certain amount of memory is stored... basically don't worry about those for now.[:)]

To see the program at work first make sure that nothing is in the HavList.txt and that only the Word "Love" is in the WntList.txt file.
Run the Desire.vbs file and the script will search the Environment file for Objects and fill the WntList.txt and then ultimately delete all the Objects from the WntList.txt and add it to the HavList.txt file. The script will not search for what it already has.

You can also add more randomly placed words in the Environment folder's text files. Add more text files or Folders if you like. And the program will store them in its have file (not looking agian).

If you add a Word to the WntList.txt that is not located in the Environment file then the Desire.vbs script will search for (currently) four (4) times before it deletes it from the WntList.txt perminately. The amount of times it searches for the illusive Object can be adjust with the "EN" variable that will be located near the MyDir variable that I mentioned earlier needing to be changed.

If I have forgotten something or see a need to give a-little more detail specific Info then I'll add more later.... It needs documentation and questions help.

+++++++++++++++++++++++++++

I'm looking at a possible database solution to replace the text files that I've been using so often.

I found a website that deals allot with vbs and vb sample scripts. You can download sample packet that show you how to use various commands and codes in Vbscript.

In one part of their site it recommended using .msi as a database. MSI is used by windows as an installer. But basically it is a database that is completely accessible through Vbscript. You can read more about it. Here is a Link.

http://www.jsware.net/jsware/msicode.php5#med

I downloaded it earlier. It seems like a good idea. [;)] Do you know much about database manipulation? I'd like to know how to directly access Hal's database with the vbs script.

The download comes with its own graphical interface.....[:D]

Later Dude [8D]

Live long and prosper or die trying.

jasondude7116

  • Sr. Member
  • ****
  • Posts: 475
    • View Profile
GRETTA PLUGINS
« Reply #39 on: March 26, 2009, 08:00:04 pm »
what do you mean, when you say: directly access hals database?

there are functions to look through the tables.

I'm not sure exactly what you mean.[:I]
-the dude
« Last Edit: March 26, 2009, 08:01:53 pm by jasondude7116 »
 

onthecuttingedge2005

  • Guest
GRETTA PLUGINS
« Reply #40 on: March 26, 2009, 09:40:32 pm »
You can access Hal's database via com control.
I will extract it for you here and give you the COM control.

Set HalDataBase = CreateObject("HalSQL.HalDB")

'----------------------------------------
HKEY_CLASSES_ROOT\HalSQL.HalDB

Code: [Select]
//Version: 32.0
HalSQL;
GUID = {6C4D9E9E-FD6D-4A47-A6DF-630C0141321C};


Dispatch _HalDB;
GUID = {7896E345-14B0-42C7-B94F-1B6DC7662039};
  function QueryInterface(riid: ^GUID; out ppvObj: ^^VOID); stdcall;
  function AddRef: UI4; stdcall;
  function Release: UI4; stdcall;
  function GetTypeInfoCount(out pctinfo: ^UINT); stdcall;
  function GetTypeInfo(itinfo: UINT; lcid: UI4; out pptinfo: ^^VOID); stdcall;
  function GetIDsOfNames(riid: ^GUID; rgszNames: ^^I1; cNames: UINT; lcid: UI4; out rgdispid: ^I4); stdcall;
  function Invoke(dispidMember: I4; riid: ^GUID; lcid: UI4; wFlags: UI2; pdispparams: ^DISPPARAMS; out pvarResult: ^Variant; out pexcepinfo: ^EXCEPINFO; out puArgErr: ^UINT); stdcall;
  property-get DatabaseName: BSTR; stdcall;
  property-get LastError: BSTR; stdcall;
  property-get ProgressCount: I4; stdcall;
  function CancelImport; stdcall;
  function OpenDatabase(strDatabaseName: BSTR): Bool; stdcall;
  function CloseDatabase; stdcall;
  function CheckTableExistence(out strTableName: ^BSTR): Bool; stdcall;
  function GetParentTableName(out strChildTableName: ^BSTR): BSTR; stdcall;
  function GetChildTableList(out strParentTableName: ^BSTR; out aryChildTableList: ^SafeArray; out aryTableTypes: ^SafeArray): Bool; stdcall;
  function CreateTable(out strTableName: ^BSTR; out strParentTableName: ^BSTR; out ttType: ^TableType; out boolAlterTableTree: ^Bool): Bool; stdcall;
  function PrepareSQLString(out strInputString: ^BSTR): BSTR; stdcall;
  function ImportTableFromFile(out strFileName: ^BSTR; out strTableName: ^BSTR; out ttType: ^TableType): Bool; stdcall;
  function AddToBrainTable(out strTableName: ^BSTR; out strQuestionText: ^BSTR; out strAnswerText: ^BSTR): Bool; stdcall;
  function UpdateBrainTable(out strTableName: ^BSTR; out lngRecordId: ^I4; out strQuestionText: ^BSTR; out strAnswerText: ^BSTR): Bool; stdcall;
  function InsertIntoSentenceTable(out strTableName: ^BSTR; out recordId: ^I4; out strSentence: ^BSTR): Bool; stdcall;
  function DeleteSentenceTable(out strTableName: ^BSTR; out recordId: ^I4): Bool; stdcall;
  function AddToSentenceTable(out strTableName: ^BSTR; out strSentence: ^BSTR): Bool; stdcall;
  function UpdateSentenceTable(out strTableName: ^BSTR; out lngRecordId: ^I4; out strSentence: ^BSTR): Bool; stdcall;
  function AddToTopicSearchTable(out strTableName: ^BSTR; out strSearchString: ^BSTR; out strTopic: ^BSTR): Bool; stdcall;
  function UpdateTopicSearchTable(out strTableName: ^BSTR; out lngRecordId: ^I4; out strSearchString: ^BSTR; out strTopic: ^BSTR): Bool; stdcall;
  function AddToSubstitutionTable(out strTableName: ^BSTR; out strSearchString: ^BSTR; out strReplaceString: ^BSTR): Bool; stdcall;
  function UpdateSubstitutionTable(out strTableName: ^BSTR; out lngRecordId: ^I4; out strSearchString: ^BSTR; out strReplaceString: ^BSTR): Bool; stdcall;
  function AddToPatternMatchTable(out strTableName: ^BSTR; out strSearchString: ^BSTR; out strResponse: ^BSTR): Bool; stdcall;
  function UpdatePatternMatchTable(out strTableName: ^BSTR; out lngRecordId: ^I4; out strSearchString: ^BSTR; out strResponse: ^BSTR): Bool; stdcall;
  function AnswerLookup(out strTableName: ^BSTR; out strQuestionText: ^BSTR; out intWordCountList: ^SafeArray; out strQuestionList: ^SafeArray; out strAnswerList: ^SafeArray): Bool; stdcall;
  function GetSentenceCount(out strTableName: ^BSTR; out lngMin: ^I4; out lngMax: ^I4): Bool; stdcall;
  function GetSentence(out strTableName: ^BSTR; out lngRecordNumber: ^I4): BSTR; stdcall;
  function GetTopic(out strSentence: ^BSTR; out strTableName: ^BSTR): BSTR; stdcall;
  function GetAllTableList(out aryRecordIdList: ^SafeArray; out aryTableNameList: ^SafeArray; out aryParentNameList: ^SafeArray; out aryTableTypes: ^SafeArray): Bool; stdcall;
  function RunQuery(out strQuery: ^BSTR; out aryTables: ^SafeArray): Bool; stdcall;
  function GetSubstitution(out strSentence: ^BSTR; out strTableName: ^BSTR; out strResults: ^SafeArray): Bool; stdcall;
  function GetPatternMatch(out strSentence: ^BSTR; out strTableName: ^BSTR; out strResults: ^SafeArray): Bool; stdcall;
  function CheckPattern(out UserSent: ^Variant; out Pattern: ^Variant): Bool; stdcall;
  function SearchPattern(out UserSent: ^Variant; out Pattern: ^Variant; out ReturnWhichStar: ^Variant): Variant; stdcall;
  function LimitSize(out strTableName: ^BSTR; out rowCount: ^I4): Bool; stdcall;

CoClass HalDB;
GUID = {B9514005-F832-459D-BC14-E40422D5C181};

Enum TableType;
GUID = {B0E2ED03-9279-44C0-9AB5-665212985EEB};
  //Brain
  Brain = 0;
  //Sentence
  Sentence = 1;
  //topicSearch
  topicSearch = 2;
  //substitution
  substitution = 3;
  //patternMatch
  patternMatch = 4;
  //folder
  folder = 5;



Jerry[8D]
« Last Edit: March 26, 2009, 09:45:29 pm by onthecuttingedge2005 »

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
GRETTA PLUGINS
« Reply #41 on: March 26, 2009, 10:11:31 pm »
O.T.C.E.,
What is it I am forgetting about the GUID and footprints left behind...
I think this is at the server level? or does it include the host as well?[?][:D]
Today Is Yesterdays Future.

onthecuttingedge2005

  • Guest
GRETTA PLUGINS
« Reply #42 on: March 26, 2009, 11:24:42 pm »
quote:
Originally posted by One

O.T.C.E.,
What is it I am forgetting about the GUID and footprints left behind...
I think this is at the server level? or does it include the host as well?[?][:D]



GUID is short for Globally Unique Identifier.

Here is some info that may help you, if you have anyother questions just ask.

http://en.wikipedia.org/wiki/GUID

Jerry[8D]
« Last Edit: March 26, 2009, 11:25:36 pm by onthecuttingedge2005 »

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
GRETTA PLUGINS
« Reply #43 on: March 27, 2009, 12:17:05 am »
Show me a concise and complete vbs script that depicts the Opening of Hals database and perhaps an addition of a new table.

That should help me get a better grip on how these funtions are applied and how to modify them if nescessary.

Thanks for the much needed help.

Live long and prosper or die trying.

onthecuttingedge2005

  • Guest
GRETTA PLUGINS
« Reply #44 on: March 27, 2009, 01:19:26 am »
quote:
Originally posted by snowman

Show me a concise and complete vbs script that depicts the Opening of Hals database


this is already an automated procedure in the HAL database editor?
the editor should be able to see any .db file in the Ultra Hal Assistant 6 folder.

quote:

and perhaps an addition of a new table.



you can use this code to make a .db file.
Code: [Select]
Set HalDataBase = CreateObject("HalSQL.HalDB")
HalDataBase.OpenDatabase("Test.db") <-- will create a new .db file
that can be opened in the editor.

quote:

That should help me get a better grip on how these funtions are applied and how to modify them if nescessary.



if you need some help figuring it out then I'll be happy to help but I don't wish at this time to comment on how everything functions.

a little at a time is more comfortable for me because I really don't have that much time right now my friend.

quote:

Thanks for the much needed help.



your welcome
Jerry[8D]