Author Topic: the halBRAIN.DLL  (Read 6377 times)

spydaz

  • Hero Member
  • *****
  • Posts: 670
    • View Profile
    • http://www.spydazweb.co.uk/
the halBRAIN.DLL
« 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 ...



spydaz

  • Hero Member
  • *****
  • Posts: 670
    • View Profile
    • http://www.spydazweb.co.uk/
the halBRAIN.DLL
« Reply #1 on: March 21, 2005, 12:17:10 pm »
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

FuzzieDice

  • Guest
the halBRAIN.DLL
« Reply #2 on: March 21, 2005, 06:45:59 pm »
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.


spydaz

  • Hero Member
  • *****
  • Posts: 670
    • View Profile
    • http://www.spydazweb.co.uk/
the halBRAIN.DLL
« Reply #3 on: March 22, 2005, 09:54:43 am »
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

spydaz

  • Hero Member
  • *****
  • Posts: 670
    • View Profile
    • http://www.spydazweb.co.uk/
the halBRAIN.DLL
« Reply #4 on: March 22, 2005, 09:57:52 am »
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

spydaz

  • Hero Member
  • *****
  • Posts: 670
    • View Profile
    • http://www.spydazweb.co.uk/
the halBRAIN.DLL
« Reply #5 on: March 22, 2005, 10:05:49 am »
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




FuzzieDice

  • Guest
the halBRAIN.DLL
« Reply #6 on: March 22, 2005, 06:43:19 pm »
Coolbeans. Thanks. :) I'll have to browse and work with those functions some day when/if I ever get time. Looks interesting.