Random Word Generator (Markov Chain)

Here it is: Snap! 7.2.2 - Build Your Own Blocks

It may look that it's all completely random, but if you run this for a long time, it could create some actual words.

How it works:
This uses a Markov Chain to generate a sequence of two letters per item of a word. For example, joecooldoo would become a list of jo, oe, ec, co, oo, ol, ld, do, and oo. Then it finds how many times each sequence is found in the Markov chain. After that, it finds the average of all of the amounts, then picks random items out of a list of sequences that are the most found in the Markov chain. Then it joins them all together! Sorry if this doesn't make sense, I don't really know how to describe it better.


@slate_technologies, I think you will be interested in this. It has to do with machine learning.

Hi, thanks for reaching out to me!

I like it! It's showing potential!

Thanks!

How do you reset the AI?

Just set all the variables to 0.

What's the reasoning behind using sequences of 2 letters instead of entire words?

As a note, he could use it in his ai guessing game

I'm making a project that shows how many words the AI got correct out of all the words/attempts it made to form words.

It's called a Markov Chain. Read here:

I know, but markov chains for text generation usually use entire words

It will take a while before it can form actual words. Just make sure turbo mode is on.

It helps the AI create words.

https://snap.berkeley.edu/project?user=slate%20technologies&project=Random%20Word%20Generator

Only run start learning once. And you only need to set the learning text once.

Um, that detect gibberish block doesn't work very well, just letting you know.

Oh hey, I made a project just like this once. The results weren't great though.

Can I see your project? What went wrong?

I got "pradwe" with a bunch of other nonsense at length ~1000 markov chain.

I just updated it. And it just called me a baby lol. It's an AI. It takes a while for it to learn.

This is my current progress:


It's actually starting to say some actual sense. But not all the time.

I want to wait for it to process the whole text first, then see what it makes. BTW "th" "he" and "e " being the most common two-letter combinations doesn't surprise me. "the" is the most common word in the English language. Plus, word-final "e" is also really common.

BTW "cormsmam"?