The Infinite Monkey Theorem:
It states that a monkey randomly hitting keys on a typewriter for an infinite amount of time would almost certainly eventually produce any particular text, even Shakespeare's complete works.
This theory is basically saying that random generation, given enough time, can produce anything which is possible to produce with its basic parts combinations.
It is also reason why endless random generator with no intelligence whatsoever could eventually produce universe with intelligence and perfect design.
So I thought, why not make a chatbot based on that theorem?
Obviously, making a program which just creates random combinations of letters would take quite a long time to produce anything coherent.
So using letters as basic parts is pretty much not practical.
However, using words instantly boosts coherence because at least the program is writing coherent words, irrelevant of if their combination is incoherent.
Further, those words would of course have to be on topic of input, so randomness further must be bound to generate only words found in sentences relevant to input.
After applying this, chatbot became more coherent, tho it's flow of words was still more or less bad.
Then I got another idea. Why use words as basic parts? Better to use groups of words.
So I tested a program which takes all 5 word combinations from text, and then does random generation of series of 5 word combinations it learned.
This has improved coherence, but sometimes the flow from one 5 word group to another wasn't good.
To improve the flow, I decided to bound randomness further.
So I set it to only use next 5 word group which has same first word as last word of previous group.
So if two groups are:
"cat plays and drinks milk"
"milk while thinking of mouse"
The chatbot combines these word groups into one, while avoiding to repeat "milk" twice, so final output becomes:
"cat plays and drinks milk while thinking of mouse"
This greatly improved flow of text in a random generation.
Of course, one can improve it even more by using 2 or 3 shared words instead of one.
This basically guaranteed that bound randomness generation produces coherent text.
Bound randomness is of course superior to complete randomness, because bound randomness follows rules and goals to produce more of desirable results.
It is true that full randomness eventually does produce a desirable output. Bound randomness just makes it quicker.
Of course, this chatbot has no intelligence. It is merely a bound randomness generator. It's answers may seem smart sometimes, but it doesn't "think". It merely does random generation according to rules.