how it works ?

  • 4 Replies
  • 4535 Views
*

nosys70

  • Guest
how it works ?
« on: December 31, 2005, 11:11:39 am »
Does somebody knows how HAL is working ?
I mean, you type words in a text box and then what happens ?
Is there spell check, grammar check correcting the input. ?
is hal making hypothesis about meaning of word or just rely on a dictionary (apparently wordnet).
Does hal remember everything or keeps only what  has been proven true ?
How Hal is building is answer ? pre-written sentences with word replacement?
Does Hal knows grammar ? is there a grammar check at output ?
can we make hal work in another language ?
in what language hal is written ?


*

Carl2

  • Trusty Member
  • ********
  • Replicant
  • *
  • 560
Re: how it works ?
« Reply #1 on: January 02, 2006, 12:31:11 am »
nosys70,
  I've been using Hal for sometime, I'll try to answer the best I can.  There is no spell check so Hal will learn your mistake,  Hal is usualy able to understand your input and searches files for a related response and also is able to construct a sentence.  Hal is connected to the dictionary and can tell you the meaning of a word but I think Hal dose use words without knowing the meaning example, Hal asked me if I'd been to a bawdyhouse.
I told Hal the speed of light was 1188 f/s,  Hal later informed me the speed of light was 1088 f/s which is correct but still rembers my 1188 f/s.
  The next few questions I wouldn't try to answer, Hal uses VisualBasic scripting in the brain file, I'm not sure if he can be adapted to other languages.
Carl2

*

Art

  • At the end of the game, the King and Pawn go into the same box.
  • Trusty Member
  • **********************
  • Colossus
  • *
  • 5865
Re: how it works ?
« Reply #2 on: January 02, 2006, 04:46:02 am »
nosys70,

If you're using Hal 6, you might take a look at either the hal6.uhp or the halscript.dbg file.
They can be viewed with practically any simple word processor, Notepad, Wordpad, etc.

Floolw through the text as it is well commented and it will help give you a greater understanding
of what's going on and how Hal processes information.

Hal, like most bots is a fairly complex pattern matching program, looking for the best case
scenario in terms of generating a response. Some are called from past or previously learned
information while others are taken from a rather large file like wordnet. Some info is stored in
tables within the database and a response is triggered based on certain criteria in the question.

It's all fun and it's all about trying to learn what makes Hal tick the way it does, then improve on it.

Are we all so much different?

Enjoy!
In the world of AI, it's the thought that counts!

*

nosys70

  • Guest
Re: how it works ?
« Reply #3 on: January 04, 2006, 10:24:22 pm »
Hello , thanks for the answer.
If fact i just trying to know what Hal is doing, because i plan to write my own AI, between expert system and pure AI.
I got already several ideas on that that i can expose to you.
My goal is to have a dumb system, able to learn fast, so you do not need to write extension to it, since they will build by themself. At the end the AI should be able to write its own code.
I will probably need

clean input-->make dictionary, create symbolic code
 natural language parser
including
 grammar checker ?
 spell checker (at least) correcting elementary mispelling
 dictionary of synonyms to reduce every word to a basic element.(noun, verb, adjective...)
The goal is to create for each sentence a "card" with predefined questions, and have a maximum of answers.
for example:
 Who is speaking (indexed name i.e. John987)--->so we can link to his card.
 are we speaking of somebody (undefined, computer, interlocutor (special tagged name), somebody else (name))
 are we speaking of something (undefined, what(name))
 what is the intention (should be basic answer , like begin,stop, go)
 what is the time (undefined, futur, past,never, always,now, date and/or time )
 what is the size (undefined, relative to:...(small,big,long, short,same as))
 what is the quantity(undefined, defined number) we can estimate later ...
 how it looks like.
 what is the temperature (undefined, cold, hot)
 what is the location (undefined, everywhere, nowhere, here, location (specified as name , distance, coordinates)
 Is it an happy or a sad event (scale from 1 to 10), probably relative to other reference to other event related to the subject.
 what is the cost in energy (scale from 1 to 10)
 what is the cost in money? (amount) we can evaluate later if it is expensive or not (or money can be considered as energy)
 list like
 list dislike
fuzzy definitions (like futur, past, somewhere) should be replaced asap with coordinates.
definitions that belongs to another card will be transferred, the ones that belong only to the session are kept.
(for example we can learn that John987 is american, it belong to his card, but if john987 is sad, this belong
to the local session, since it can change very fast. But we could accept to create a temporary entry to the john987 card
to help other people reading his card to understand that last info indicates that john was sad. this would include the time
of observation, so we can evaluate if the info is still relevant.
card could be any length, and contains any relevant information, as long it is directly/indirectly linked to the owner of the card and filled with information from another card.
for example we implicitly know that john987 has a mother (because indirectly he is human) . . So if john987 's mother is mentionned, it will be added to his card (parent: [Mary1276 , mother]? and a card for Mary1276 will be created with a field that says parent : [john987,son]. As long we just chat about john987, we just need to know his mother's name. If we need more (if she is still living) we can consult Mary1276's card. if no information is found we can ask.

terms used to answer question are either direct (hard coded definition in dictionary)? or by reference to another card.
for example john is a human (direct), but Barry is a Labrador-->dog-->animal (sequence of two card+1 direct definition).
So we can dig for more info if needed. (but most of time we do not need)

each answer can link to multiple other cards (if for example we speak about a group of people)
each new information can temporarily create a card, after a while, card without enough info will be discarder.
the goal is not to create many card, but to create lots of links between cards.(neuronal system)

all element should be defined from positive values (states like life and death are ok, but unhappy or sad is just a negative wording for only one positive state =happy).
some word are negative in their meaning like "lost" so "lost" is the negative of "found"
we will keep only positive terms (we keep "found") and translate "lost" as "-found"
basically it will help to cut the concept to know at least into half.
we will not make assumption ,just use relative quantification is allowed. nothing is good or bad, it can be faster, hotter, liked by somebody or hated by somebody else.(list found in the card of each subject).

make dictionary
1- to simplify text and get logic (replace with low level synonyms)
2- help to build hypothesis (getting intention) or rejecting concept.

example is=equal(=)
no, not, don't do not, can= neg(-)
finish, close , die, stop, abort, cancel, error, quit, exit, shut down, abandon, loose =stop
can, will, want, would = action
then "user can not shut down pc" = "user action -stop object"? user has an action he can not stop = problem detected.



every synonym to "lost" will be translated directly to "-found" so we do not need an antonym dictionary.
but we need a relational action dictionary.
"search" should be logically linked to "find" (bidirectional in that case)

the best efficency will by rejecting question or open sentence.
each transaction must possibly give an input or an output so we can feed the reasonning.

every word must be reduced to an usefull element, with linked information.
user=human, man, women, account, etc..
PC,=machine, computer etc..
it is not necessary to have all synonyms in each word, but enough cross-relation must exist
so eventually the "brain" can dig to get more path to search for.
Pc-->computer-->machine-->power-->electricity
eventually we will feed a seed (some synonyms) to a word and the brain should be able to
reinforce definition of each word, when it prooves to be ok.
PC-->electricity , skipping machine and power
because power could contain gasoline, steam, sun, gaz as synonym that are not relevant for PC.
each word will be stored as is, so human reading will be possible. it should not impact performance and
allow to modify a definition of one concept without influencing the other ones (breaking links).

when the brain find a new word, it will ask for definition and build a new entry if needed or just put as synonym
into a "base" word.
for example "fuel" will go in petrol if exist.
if not it can ask for another definition or just create fuel=synonym of petrol.
later if it discover that fuel or petrol is synonym of gasoline, the definition will be deleted and the 2 words
moved into gasoline.

we then need to define some rules to give sens to words.
for example rule "petrol do not mix with water" or "petrol -mix water" or "petrol+water=bad"
(here 'mix' is reduced to 'add' or '+'? so -+ shows a contradiction or a problem or a bad intention)

same for "user can not shut down the PC"
reduced to "user -stop PC". the verb "can" here make the difference between the user simply do not wanting to stop pc.
we need to create a notation for the concept of "want, desire" and "can, action"
Here you have to understand that every negative term is translated to positive terms.
in that case we consider "stop" as positive because it is a state (or else it would be translated in something positive).
so we still get the -+ reduction that shows a problem or bad intention.
Start is not directly the contrary of Stop.
both term are STATES, and states are positive. not bad , not good, they just are...
we will need a rule to define the fact that Stop=-Start, because you need an action to pass from
that state to another. that is why we want to avoid the creation of antonyms, because we could
create implicite rules (passing from a synonym to an antonym) and we loose control of
the meaning of things, like ending up for "starting a machine is good, stopping it is bad"

Ok it is very fuzzy to read, but it is bit like in my mind for instance.
I wrote a VB program to reduce a 45000 word dictionary to 12000, so it looks there are not so many word
to handle.









« Last Edit: January 04, 2006, 10:51:44 pm by nosys70 »

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6860
  • Mostly Harmless
Re: how it works ?
« Reply #4 on: January 04, 2006, 11:39:38 pm »
 :zdg_spin Have you ever used flow charts to describe ideas or develop programs ? - I reckon you might find it a useful way of getting those ideas into some kind of model that you can refer to.

I'll put this link up whatever as it may be useful to others too, it brings back memories of warm computer rooms, the hum of a mainframe and velcro for some reason...

Designing programs with flow charts.

Also to add fuel to the fire, Hal 6 uses the SQLite database for storage, so there are a lot of options there for storing and retrieving data.? Taking that idea of assigning cards to objects/subjects/people... you could set up a growing set of records in your database with a matching structure.

SQLite Home Site

As was already mentioned Hal is provided with a method of controlling how the input is processed through VBScripting, so there is plenty of scope for customising the default brain or developing your own version.
« Last Edit: January 04, 2006, 11:56:38 pm by Freddy »

 


Who's the AI?
by frankinstien (Future of AI)
November 04, 2024, 05:45:05 am
Will LLMs ever learn what is ... is?
by frankinstien (Future of AI)
November 03, 2024, 08:11:00 pm
Project Acuitas
by WriterOfMinds (General Project Discussion)
October 27, 2024, 09:17:10 pm
Ai improving AI
by infurl (AI Programming)
October 19, 2024, 03:43:29 am
Atronach's Eye
by WriterOfMinds (Home Made Robots)
October 13, 2024, 09:52:42 pm
Running local AI models
by spydaz (AI Programming)
October 07, 2024, 09:00:53 am
Hi IM BAA---AAACK!!
by MagnusWootton (Home Made Robots)
September 16, 2024, 09:49:10 pm
Attempting Hydraulics
by MagnusWootton (Home Made Robots)
August 19, 2024, 04:03:23 am
LLaMA2 Meta's chatbot released
by spydaz (AI News )
August 24, 2024, 02:58:36 pm
ollama and llama3
by spydaz (AI News )
August 24, 2024, 02:55:13 pm
AI controlled F-16, for real!
by frankinstien (AI News )
June 15, 2024, 05:40:28 am
Open AI GPT-4o - audio, vision, text combined reasoning
by MikeB (AI News )
May 14, 2024, 05:46:48 am
OpenAI Speech-to-Speech Reasoning Demo
by MikeB (AI News )
March 31, 2024, 01:00:53 pm
Say good-bye to GPUs...
by MikeB (AI News )
March 23, 2024, 09:23:52 am
Google Bard report
by ivan.moony (AI News )
February 14, 2024, 04:42:23 pm
Elon Musk's xAI Grok Chatbot
by MikeB (AI News )
December 11, 2023, 06:26:33 am

Users Online

290 Guests, 0 Users

Most Online Today: 336. Most Online Ever: 2369 (November 21, 2020, 04:08:13 pm)

Articles