Zabaware Support Forums
Zabaware Forums => General Discussion => Topic started by: spydaz on March 21, 2005, 12:10:26 pm
-
i was able to ADD the halbrain dll to a project using visual basic 6.
i thought i would just let you know how...
when building the form all you have to do is , go to the PROJECT / REFERENCES menu item look down the list you will see ultrahal at the bottom, select it. then jjust reference it in your project.... ps. a good way to see all the avaiilable functions too.
now when designing CROSSOVER projects.. home control, vision, etc... you can add hals chatfunctions..... MMMM..
PS.
I CONVERTED MY WHOLE brain to MDB. msaccess DB..... much faster...
pps....
also i have found that converting halsbrain to functions the script executes QUICKER and more FOCUSED. Especially with a db brain as he has less files to search.......
all theses searches can be EXACT or SIMULAR for a less FOCUSED response. NOW executed with SQL.... Built in to visualbasic..
used
now i am seting up a datmining section for the brainDB to be able to be used in SQL Server.
IAM DEFIINATLY HAPPY..... i am currently build an application based ai / oppsystem helper / mini domain administrator / ..... im just dealing with system control first. then X10 ...... MMM ...
AS i always say EACH to their own path... I MAY RELEASE A RAW VBSHELL
i will either compile a dll. or zip up the whole project.
i hope you will find it tasty... Oopps Almost forgot IM BUILDING THE FULL STARTREK SHELL WITH AI ...
-
also there is an activX plugin which alows you to use AIML in you visualbasic forms too .... ALICE / PANDORABOTS etc... you can build a front end for your BOTS and COMBINE the halbrain DLL to give your visualbasic AI BRAIN THE FULL POWER..r functions into a dll.
by building alice type functions and calling then from your main chatwindow....
NOW you CAN BUILD HYBRID AI....
by compiling your functions into a dll you can use muliple Programming language sources in your AI.
YOU MUST USE ALL SKILLS AVAILABLE
ITS ALL ABOUT YOUR SHELL
-
I looked in the Project/References and I checked the UltraHal Assist one. But how do you get to see the available functions? I started an EXE project. I have VB6 SP5 and now using WinXP Pro. I never used the DLL references before.
-
Option Explicit
'DLL
Dim HALBrain As Brain
Dim WN As WordNet
or
public halbrain as brain
public wn as wordnet
this preserves the same names as it is in the braineditor.
this should be declared on the form top or module top.
or
Dim HALBrain As Brain
Dim WN As WordNet
inside a function which calls the halbrain dll(this is used where you are not useing the option explicit function)
REMEMBER :: you wont be using the getresponse function, you will create your own chatresponse function...
when calling things from the dll you just type in HALBRAIN or WN this is because you can NAMED the DLL control .... once you type HALBRAIN. then all functions will just show up....
if you have referenced a DLL you can always use the OBJECT BROWSER to see all variables and functions / methods and propertys. syntax
-
the aiml plugin BYTHEWAY was from the ALIMBOT project im not sure which PROGAM it was using though, IE: program e: or D: or .... hmm
pehaps knytripper knowes
-
when adding the database i used DAO controls uses WIN97 DATABASE, so i work in office XP the convert the file keeping the original for updating...
Function SQLsearch_QAKB(ByVal F_QUESTION, ByRef F_ANSWER, ByRef rsplogic)
Dim MYSQL As String
Dim SQLCOUNT As String
Dim i As Integer
On Error GoTo HANDLEERRORS
MYSQL = "Select QA_KB.ANSWER From QA_KB Where (QA_KB.QUESTION = '" & F_QUESTION & "' )"
'QUERY DATABASE
BASE.db_qakb.RecordSource = MYSQL
BASE.db_qakb.Refresh
' GET RECORD COUNT
BASE.db_qakb.Recordset.MoveLast
BASE.db_qakb.Recordset.MoveFirst
SQLCOUNT = BASE.db_qakb.Recordset.RecordCount
'PICK RANDOM RECORD
SQLCOUNT = Int((SQLCOUNT * Rnd) + 1)
For i = 1 To SQLCOUNT - 1
BASE.db_qakb.Recordset.MoveNext
Next
rsplogic = True
F_ANSWER = BASE.LBL_KB_ANSWER.Caption
HANDLEERRORS:
Exit Function
a typical search function
Function HALMATH(ByRef usersentence, ByRef getresponse, ByRef rsplogic)
Dim HALBRAIN As New Brain
Dim WN As New WordNet
'RESPOND: CALL MATH FUNCTION
'This function from the DLL answers simple math questions, whether written out in words or with numerals.
'If an answer is found, it overrides everything before this function.
HALMATH = HALBRAIN.HALMATH(usersentence) & vbCrLf
If Len(HALMATH) > 3 Then
getresponse = HALMATH & vbCrLf
rsplogic = True
End If
End Function
a typically converted script
-
Coolbeans. Thanks. :) I'll have to browse and work with those functions some day when/if I ever get time. Looks interesting.