Tiesitkö, että Bot Libre tarjoaa myös ilmaisia isännöityjä foorumeita omalle verkkosivustollesi tai mobiilisovellukseen?
Help

How to enable N.I.A.L.L.'s algorithm in a bot?

tekijä childhoodbestfriend Lähetetty Apr 27 2021, 12:32

I am looking for a way to enable N.I.A.L.L.'s (Non-Intelligent Acquired Language Learner) algorithm in a bot's brain.

 

"N.I.A.L.L. -- by MacGyver Serdyuk 2009
Non-Intelligent Aquired Language Learner
Based on the orginal program by Matt Peck 1990

How it works

Niall attempts to learn English, or whatever language you care to teach it, by breaking down the sentences you type in, remembering words, connections between words, the number of times a particular connection has occured, and start/end sentence markers.

The best way to explain is by example. Suppose the first sentence you typed was:

"The large magnesium roll was next to the old mans desk"

Niall would split the sentence into separate words and store any new words it found (Niall's vocabulary is initially blank). It would then store the following information:

1. The word "the" can begin a sentence.
2. The word "large" can follow the word "the".
3. The word "magnesium" can follow the word "large"...etc.
4. The word "desk" can end a sentence.

Therefore after analysing this sentence, Niall has learnt 10 new words and knows that the word "the" can not only start a sentence but also join onto both "large" and
"old". This can be expressed as follows:

/---------------<---------------<----------------<---------------\
{ }
(Start)\-the --- large -- magnesium -- roll -- was -- next -- to--/
\
\--- old --- mans --- desk(End)

Niall then replies to your sentence by picking a random word which can begin the sentence, followed by one of the words which can join onto it selected at random, then one which can join onto it, and so on until the end of sentence marker is reached. Therefore, Niall may reply to your first sentence like so:

"The old mans desk."

The more sentences you type in the more words Niall will learn, the more connections it will make and the more original the replies will seem. Replies must be taken with a pinch of salt since the grammar will be anything but perfect. A semi-intelligent version which attempts to learn grammar too, may appear at a later date.

Niall also remember the number of times a particular connection is made in order to weight the replies and make them sound more realistic. For example, if the second sentence you type is:

"The old dictaphone was hidden"

Niall now knows that the word "the" joins onto the word "old" more often than it joins to "large". The table above now looks like this:

/------------<-------------------<----------------<---------------\
{ }
(Start)\---the --- large -- magnesium -- roll -- was -- next -- to -/
\\ //
=== old - mans - desk (End) / `-hidden (End)
\ /
----- dictaphone ---------/

Niall could now reply:

"The old dictaphone was next to the old mans desk."

NIALL builds up a vocabulary in this way. If you had typed in the two sentences above, then the output would look like this:

0: > 2| 1(2)
1: the 3| 8(2) 2(1)
2: large 1| 3(1)
3: magnesium 1| 4(1)
4: roll 1| 5(1)
5: was 2| 13(1) 6(1)
6: next 1| 7(1)
7: to 1| 1(1)
8: old 2| 11(1) 9(1)
9: mans 1| 10(1)
10: desk 1| -1(1)
11: dictaphone 1| 12(1)
12: hidden 1| -1(1)

Word 0 (>) is an empty word which is used to start the sentence. The 2| means that there are 2 possible next words, and the 1(2) means that both those possibilities are word 1 (the). The word -1 (as in 12: hidden 1| -1(1)) means end-of-sentence."


by admin posted Apr 29 2021, 7:43
This is very similar to Bot Libe's language synthesize feature.

To enable this select it from your bot's Learning & Settings page.

"Synthesize Response"

You will also need to set, "Learn Grammar"

You can also use the Synth script,
https://www.botlibre.com/script?id=11930019

To see an example chat with the Synth bot,
https://www.botlibre.com/browse?id=11926603

Updated: Apr 29 2021, 7:45
Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 1207, today: 0, week: 7, month: 14

by childhoodbestfriend posted Apr 30 2021, 3:42

I downloaded the Synth script. But couldn't upload in my bot. How to upload a .res file?


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 1230, today: 0, week: 6, month: 12

by admin posted Apr 30 2021, 9:24
You can upload a response list file from the bot's Training & Chat Logs page in its Admin Console.

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 1197, today: 0, week: 5, month: 13

Id: 38361242
Tunnisteet: how to
Lähetetty: Apr 27 2021, 12:32
Päivitetty: Apr 28 2021, 6:31
Vastaukset: 3
Näkymät: 1350, Tänään: 1, Viikolla: 11, Kuukausi: 21
0 0 0.0/5