dupa

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - fredfish

Pages: [1]
1
Programming using the Ultra Hal Brain Editor / The THOUGHT process
« on: January 15, 2006, 01:10:29 pm »
SPYDAZ,
I commend you on your forthought and incurage you to
persue this line of thinking.
some things that are not being utalized here are key groups determining meaning, simeler to the opencyc project.
also inference information, like sneps project.
I look forword to seeing what you ALL come up with
FredFish

2
Programming using the Ultra Hal Brain Editor / The THOUGHT process
« on: January 12, 2006, 08:15:58 am »
SPYDAZ,
I have been waiting for some one like yourself to come to this conclusion.
what seems to be missing in most of these bots is an INFERENCE interface, something that would take the facts from past simeler conversations group them together and draw new conclusions from them.
verify these new conclusions by asking or finding simeler conversation. then use the new conclusions to come to more new conclusions and so on and so on.
this could all be done in the IDLE time slice between responce and input.

FredFish

3
Ultra Hal Assistant File Sharing Area / Scripts, addins, and extras
« on: November 27, 2004, 11:50:34 am »
If you are using the idlethought script
copy your file to the defbrain folder then
input the line AUTOIDLE READ {your file name}
this should load the script file (idlethought.txt)
and reset the line pointer (idlethought1.txt) to the first line

-just more FredFish stuff-

4
Ultra Hal Assistant File Sharing Area / Scripts, addins, and extras
« on: November 18, 2004, 08:34:40 am »
Thanks for the insight vonsmith,
in my case i am looking to mimic the user input
as if i entered the line from the file in myself.
loading the usersentence dose not enter it on the screen.
ware would you put the responseblock to have it
say the usersentance and not include it in the getresponse?
your input is alwas helpful
and this is still a work in progress


5
Ultra Hal Assistant File Sharing Area / Scripts, addins, and extras
« on: November 17, 2004, 08:46:38 am »
Try this to read through your knowledge files
note that i inserted this in the XTF1.2 brain directly after the line
'PROCESS: CONTROL TOPICFOCUS
'=vonsmith= Entirely replaced with new XTF topic function.

after adding the code and
befor setting the "autoidle on" command
enter "autoidle read"
this will create the idlethought.txt file from the file you enter
(it is best to put the knowladge files in the working directory befor hand)                                        
'==== MORE FREDFISH STUFF========

' auto- idle set and reset
'Turn off auto idle feature by entering in the line autoidle off
If InStr((UCase(UserSentence)), "AUTOIDLE OFF") > 0 Then
HalCommands = "<AUTOOFF>"
GetResponse = "Autoidle turned off."
End If
'Turn on auto feature by entering the line autoidle on
If InStr((UCase(UserSentence)), "AUTOIDLE ON") > 0 Then
HalCommands = "<AUTO>400000</AUTO>"
GetResponse = "Autoidle turned on."
End If

' set up file to read at idle times by entering the line autoidle read {file to read}
If InStr((UCase(UserSentence)), "AUTOIDLE READ") > 0 Then
 UserSentence = Replace(UCase(UserSentence),"AUTOIDLE READ","",1,-1,vbTextCompare)
 If UserSentence <>"" Then

      If InStr(1,UserSentence,"\")=0 And InStr(1,UserSentence,":")=0 Then
       UserSentence = WorkingDir & Trim(UserSentence)
      End If
       GetResponse = GetResponse & "reading file " & UserSentence
      Dim ofso, ofil, ir, iis
      Set ofso = CreateObject("Scripting.FileSystemObject")
'      this is the file to read line from
      Set ofil = ofso.OpenTextFile(UserSentence, 1)      
      iis = ofil.ReadAll
      ofil.Close
      Set ofil = Nothing    
      UserSentence = " AUTO-IDLE"
'      we make a copy of the file to a temperary location
'      so we can also clean up the file For processing here
      ir =  (WorkingDir & "idlethought.txt")
      Set ofil = ofso.CreateTextFile(ir)
       ofil.Write iis
       ofil.Close
      Set ofil = Nothing
'     we set the start location file to save ware we start reading from
      ir =  (WorkingDir & "idlethought1.txt")
      Set ofil = ofso.CreateTextFile(ir)
       ofil.Write "0"
       ofil.Close
      Set ofil = Nothing
   End If
End If  

' when the auto-idle string is incountered read a line from the idlethought file
 If InStr(1,(UCase(UserSentence))," AUTO-IDLE",1) > 0 Then
    Usentence = ""
      Dim fil, r, s, s1, s2, s3, s4
      r =  (WorkingDir & "idlethought.txt")
      Set fso = CreateObject("Scripting.FileSystemObject")
'      this is the file to read line from
      Set fil = fso.OpenTextFile(r, 1)
      s = fil.ReadAll
      fil.Close
      Set fil = Nothing                  
'      this is the location in the file to start reading      
      s4 =  WorkingDir & "idlethought1.txt"
      Set fil = fso.OpenTextFile(s4, 1)
      s1 = fil.ReadAll
      fil.Close
      Set fil = Nothing
'     find next sentence by line feed
      If s1 <> "" Then            
         s2 = (s1)+1        
         s3 = InStr(s2,s,Chr(10))
         If S3 = 0 Then
          S3= Len(s)
         End If
         USentence = Mid(s,s2,s3-s2)
      Else  
         s2 = 1
         s3 = InStr(s2,s,Chr(10))
         USentence = Mid(s,s2,s3-s2)
      End If  
      If s3=>Len(s)-1 Then
         s3 = 0
      End If
'     next string search will begin at s3 location so we make a file with this number in it
      Set fil = fso.CreateTextFile(s4)
       fil.Write s3
       fil.Close
      Set fil = Nothing
       DebugInfo = DebugInfo & "this auto-idle sentence location is from " & s2 & " to " & s3
    If  USentence <>"" Then
     UserSentence = USentence
    End If
   If UserSentence  = " " Then
       UserSentence = ""
   Else
      GetResponse = GetResponse & "," & UserSentence
   End If
' end of auto-idle response
End If
'========END OF FREDFISH STUFF=====


6
I was trying add this program to read lines from a file at idle times
After a short time i get the error, to many files
the referance line number of the error changes every time.
can some one tell me how to close the referanced files within the program? or is thair another problum i'm just not seeing.

here is the script:
this script has to parts, the first is the auto-idle part,
it reads a line from a preformatted file (one liners work best).
the second is a referance to explane by definition the prevous response.


 
'=================START FREDFISH STUFF============================
'Turn off auto read feature.
If InStr((UCase(UserSentence)), "AUTOREAD OFF") > 0 Then
 HalCommands = "<AUTOOFF>"
 GetResponse = "Autoidle read file turned off."
End If
'Turn on auto read feature.
If InStr((UCase(UserSentence)), "AUTOREAD ON") > 0 Then
  HalCommands = "<AUTO>120000</AUTO>"
  idletime = HalBrain.ChooseSentenceFromFile(WorkingDir& "idletime.brn")
'ask for file name to read if one has not been set up
  If idletime = "" Then
   GetResponse = "Okay what is the file name for me to read at idle
times"
'****
  Else
'file name has been set up
   GetResponse = "I will be Reading " & idletime & " " & VbCrLf
  End If
End If
If InStr(UserSentence, "AUTO-IDLE") > 0 Then
 idletime = HalBrain.ChooseSentenceFromFile(WorkingDir& "idletime.brn")

'adjust for file location
 If InStr(idletime,"\") Or InStr(idletime,":") Then
  USentence = HalBrain.ChooseSentenceFromFile(idletime)
 Else
  USentence = HalBrain.ChooseSentenceFromFile(WorkingDir & idletime)
 End If
'change User Sentense to something other then AUTO-IDLE
 If USentence <> "" Then
  UserSentence = USentence
  GetResponse = "I was reading this," & UserSentence & VbCrLf
 Else
  UserSentence = "I will be reading in my idle time, " & idletime& "." & VbCrLf
  GetResponse = GetResponse & UserSentence
 End If            
End If
'if prevous Sentence is a question then this is the answer
If InStr(1, PrevSent, "Okay what is the file name for me to read at idle times",vbTextCompare) > 0 Then

 If InStr(idletime,"\") Or InStr(idletime,":") Then
  idletime = idletime
 Else
  idletime = WorkingDir & idletime
 End If
 HalBrain.AppendFile "idletime.brn", OriginalSentence
 idletime = HalBrain.ChooseSentenceFromFile(WorkingDir& "idletime.brn")

 GetResponse = "I will be Reading " & idletime & " " & VbCrLf
End If
'==== MORE FREDFISH STUFF======================================
' rewording of user sentence by definition
  If InStr(UCase(UserSentence),"EXPLANE THIS")>0 Then
   USentence = PrevSent
   GetResponse = GetResponse & " I sead, " & USentence
   Subjectmod = WN.FindFirstNoun(USentence)
   sense = WN.LookUpWord(Subjectmod)
   If sense = True Then
    partofD = WN.GetDefinition(WN.GuessPartOfSpeech, 1, "D") & ","
    USentence = Replace(USentence,Subjectmod,partofD,1,-1,vbTextCompare) & VbCrLf

   End If
   Subjectmod = WN.FindFirstNoun(USentence)
   If InStr(1,USentence,Subjectmod,1) >0 Then
    sense = WN.LookUpWord(Subjectmod)
    If sense = True Then
     partofD = WN.GetDefinition(WN.GuessPartOfSpeech, 1, "D") & ","
     USentence = Replace(USentence,Subjectmod,partofD, 1, -1,vbTextCompare) & VbCrLf

    End If
   End If
   USentence = Replace(USentence,"SS.","s.", 1, -1,vbTextCompare)  
   GetResponse = GetResponse & " what I mean is, "
   GetResponse = Getresponse & USentence & VbCrLf
  End If
'========END OF FREDFISH STUFF==================================


note: **** watch for line rapping error in posted code

Thanks For Your Support

FredFish ><:>~

Pages: [1]