Machine Essays

Machine Essays

Download Machine Essays 2.1 back to Software

Release Notes V 2.1 May 2016
- Re-wrote the word searcher. It was originally the generic one intended to simply match words from my text cataloging subsystem, instead of detect words in a random byte stream, so it was slow and not always correct for Machine Essays. Re-wrote to be very specific for this use, now much faster and will correctly find longer forms of words (i.e., will find "intently" and not just stop at "intent". Significant enough change to bump the minor version number, much richer output.
- Added a timeout for longer word searching. If some minutes go by without finding, say, an 8 letter word then the machine will re-set word length and go again. Variable time based on your CPU use setting.
- Added auto-saving code to insure an essay isn't lost in a power outage, which happened to me
- Increased the size of the characters seen to a really really big number.
- Reduced the maximum CPU utilization. With the new scanner the fans were spinning up because things were happening too fast. Now low medium and high are respectively 25%,50%,75% on a dual core machine.
- took out random word generation. Didn't make sense to the project in the end.
- Added a "Pause and save" feature when an essay gets longer than 10 meg. A dialog will appear at this point asking you to save.
- fixed some UI issues. Not style, but functionality.

Release Notes V 2.0.2 Jan 2016
- Added a option to make the minimum word length variable. NOTE: May be extremely slow.
- Words after a period (etc.) are now capitalized
- Spent some time optimizing the word scanner so it's a good bit faster
- Made the self-editing probability much lower


What Is It

This is a weird one, weirder than my other apps, believe it or not. Or, it may be great art.
This started back in 1981 when I bought an Epson MX-80 printer for my Apple ][+. Good printer, fun to play.
I got thinking about the old bromide of "an infinite number of monkeys typing on an infinite number of typewriters for an infinite time will write Shakespeare". Conceptually that made sense to me, but I was interested in even a small proof of the idea. So I wrote a little BASIC program to print random characters to the MX-80. I let it slowly churn until I had two pages worth of printing (slooooowly, this was 1981 remember). Took a yellow highlighter and started marking words I found. I was surprised to find that there were quite a few American English words in those two pages. "Interesting" thought I,"I would like to explore this further."
The press of time, the limited power of the computer available to me, and actual, money-making products to write shelved the idea. Always been simmering, but didn't take any more steps.
For some reason or other the idea resurfaced strongly here in 2013, and coupled with a my personal idea that these machines are fast approaching sentience,Machine Essays came to be.

What it does

Simply, Machine Essays asks the computer to generate blocks of random characters. The blocks are scanned for American English words, and if any words are found they are added to the output text block.
No gramatic or parts of speech rules are applied. The goal of Machine Essays is not to created automatic natural language output from input data and AI. There are many folks working on that, and doing a great job.
Instead, this is the raw, unfiltered, thoughts of your machine. I do "ask" the machine if it wants to apply punctuation after each word it generates, this is one area where there is a "rule", I bias this based on the length of an average American English sentence.

Weird, huh?
But maybe not. We'll see.

Version 2

This is a major revision to Machine Essays. I’ve been thinking a lot about what this does (yes, I have, I think about this way too much) and I added two new generation modes.
The first came from thinking about how I write. I don’t generate a bunch of letters, then pick out english words from them, then write them down. I go through the list of words I’ve learned, pick one, and then write it down.
So the first new Essay generation, pick from list,mode does the same thing. When you configure the Essay, click the ‘Pick from word list’ tab to set that mode and choose the options available.
When you hit ‘Start’, your machine will then randomly pick words from the word list you selected. Basically it’s picking from a vocabulary it already has and outputs the result, similar to what I’m doing right now in my brain.
As you can imagine, this is a much faster process than scanning millions of characters for words, so I’ve throttled it quite severely, at its fastest it will choose one word every 1/3 of a second, at slow one per second.
May 2016 And I don't like it and am planning to take it out. If you do like it let me know. I might not care anyway.

The second, Both, mode runs these two concurrently, with a bias between one or the other that you can set.

Took all this out. Didn't like it.
Another thing I added in version 2 is editing. Your machine can now choose to edit its essay, delete words & phrases, add words and phrases, modify words and prhases. Effectively letting your machine go back and correct what it would like.

This is pretty seamless to you, the observer, with exceptions. When your machine chooses to edit by changing or adding words, then it of course has to generate those words that it wants to replace or add. Those words are gathered offscreen, then applied when the edited section is ready to be changed. That means your machine may appear to pause without any visible output for a period of time. I put a red blnking "Editing in progress" label in the header of the window to let you know that editing is happening, just be patient.

BTW, if your machine is speaking when an edit session starts, speech will stop and re-start after the editing session is over.

Version 2.0.1 allows you to turn off machine editing in the Configuration sheet if you'd like.

The details

Machine Essays works this way for generating words from random characters.
A random block of 1,000,000 characters is generated.
The block is filtered for ASCII (oh, UTF8 for you kids) characters. Interestingly, that's about 1/2 of the block. You can see this raw buffer in the Raw Buffer tab.
Then the block is walked for American English words. When it finds one it puts it in the output window. Then punctuation may or may not be added.
When the block has been scanned, another one is asked for.

And on and on it goes.

The scanning happens in a background thread that you can set the priority you want, from about 25% of your computers processor resources to 75% during the scan. I have Machine Essays running on 3 machines, and it never gets in the way.

The pick from list method is clearly simpler, and you've probably figured it out on your own. It picks a random word from the word list.

Both does both at the same time.

Natural runs the random character scanner, adds words to it's vocabulary, then runs a slow pick from list to generate

Making it go

Click Start, and a sheet will drop down to configure the essay session. New options here in version 2.0.

Some options are for any of the three selection methods.

Options for picking words from the random buffer
Minimum word length sets, uhhh, the minimum leght of the word ME will pick from the buffer. I default this to 4, since a smaller number means a whole lot of 'a','it','of' and so on, not really interesting. 4 or higher is interesting. 1-3 letter words are managed by the short word manager

in version 2.0.2 is an option to have the machine pick the minimum length of the next word it wants to speak. I got tired of seeing thousands of four letter words, so decided to let the machine decide what length word it would look for next. Click the "variable min word length" checkbox and your machine will decide on the minimum length of the next word, from 4 to 10 letters, As always, the word may be longer than that, but it will be that minimum. NOTE This can slow down word generation. Like it took 32 hours and 200 million random characters to generate an 8 letter word. But then again, it just took 3 minutes to find a 9 letter word, so that's kinda the fun of it. But we're not in a rush in any of this are we? And the output is richer.

use file for input checkbox does something, I'm not really sure what and why it's here.lets you look at any file and pick the words from it. Might be interesting if you're searching for ASCII hidden in a picture file, for example (you'd be surprised) Click it then select a file by clicking the select file button. When the scan starts this file will be opened and loaded, and one pass will be made through this file for expressions. Please note that large files with many non-words can take a very long time to process. Once the file has been scanned the process will stop. Note: because of the way I pre-process the text buffer for scanning some words may not be found, and some words may be created by pre-processing, this is NOT a comprehensive list of words in a non-ascii file, just the ones I can find.Again, not really sure why I put that in here.

Options for word list picking

Only one. Since the word list ME is picking from has (or should have) all the short words that the Short Word Manager uses, this gives you the option to turn off generating short words. I keep it on because it seems to generate more natural sentences.

Options for Both

Again, only one. Lets you choose whether picking from a buffer gets more time, or picking from a list.

Short Words
Machine Essays has an internal "random short word" function that will, after every word is found, see if the Machine would like to add a short word (a, an, it, ah, and so on) to insure those exist, but not have too many of them. Early experimentation showed that allowing the machine to get short words from the word list resulted in way too many short words, so I made this change. The machine still has the option to add a short word (it's the machines randomness that decides), but you're not overwhelmed with short words.
You can see the list, and modify it, by selecting the Short word manager menu item.

You can also change the probability value, but that's currently unused in version 1.0


Hit Start and away you go. The status bar on the bottom

keeps you updated. This thing can take a while to process a buffer, so don't expect the progress bar to move quickly. Hit stop to stop, of course. A word or two might pop out after you've stopped.

If you want to change your current configuration, select Reconfigure under the Edit menu and the config sheet will appear again. You can save the current essay and reopen it later, of course, look under the File menu. And you can export the text into a text file also.

Machine Essays creates 3 files in the /Application Support/Machine Essays folder. CurrentEssay.MEESSAY, the current essay, LastWordList.gwcache, which contains the word lists you're using, and MEsmallWords.gwcache which contains the current short word lists. It also moves the two included word lists, EOWL list.RWTLIB and ESL List.RWTLIB from the application bundle to /Application Support/Machine Essays.

Letter Distribution

In 1.4.2 I added a letter distribution drawer. Click the Letter Distribution button and you'll see the number of each letter that has been generated so far. Could be interesting, my experience so far is that the letters are so equally generated that nothing interesting has come up there yet. Note that the letter distribution drawer is not available during the word picking option, since a buffer is not being used. Interestingly enough, and good, the letter distribution is pretty even. If one letter gets too far from the rest of the herd (one standard deviation away) it will be written in red.


Brigham had a good idea. He wanted to hear his machine thoughts, so he selected text and used the "speak text" menu item in the Edit menu. Good, but could be better. So I added the Speak item under the Tools menu. When you select this, Machine Essays will wait to collect 100 words or so, and then speak them, automatically while a session is going. This is a great way to find real content too, you can hear a "real" phrase easier than scanning the text output. Use the same menu item to stop speaking, of course. Brig wanted to see the words being spoken, so I added highlighting words as they're spoken, follow the bouncing ball. Note that if you edit the text (you can) the bouncing ball will get out of sync for a bit.

BTW, it goes in bunches of about 100 words because speech synthsis sounds more natural the more words it gets. It also generally speaks faster than it finds, so there will be gaps between paragraphs spoken.

He also wanted to go to sleep listening to his machine, so I added a timer to turn off speaking after the time set in the Stop speaking after submenu.

What's going to happen? What's the point?

I dunno. I just want to see. I want to see what the machine wants to say, even if it's gibberish. Am I hopeful I'll find something meaningful? Yes I am, or I wouldn't have written this. But realistically waiting for a sonnet? No. But we'll see.

And actually running it for a while, particulalry with Speech turned on, this turns out to be really interesting art. Very happy with it.

And finally, let me know if your machine says interesting things. I will be posting interesting things our machines say to us on the My Machine Told Me page, email the output to Please note I will probably not reply to any emails, but the output will go up sometime.

Copyright @2013 C.K. Haun & Ravenware Software, all rights reserved
Output intellectual property is whatever arrangement you and your machine have.

Release notes

Release Notes V 2.0.1 Feb 2014
- Added a checkbox to the configuration sheet to turn on or off self-editing. It's on by default, but you can now tell your machine not to edit its' results.

Release Notes V 2.0 Jan 2014
- Added Pick from List and Both generation modes
- Added the ability for your machine to edit its previous writing
- Removed dock icon badging, really doesn't make any sense
- Added a few more short words
- Moved the "Reconfigure" menu item to the Tools menu, because I couldn't even remember it was in the Edit menu.

Version 1.4.1,1.4.2
Added full screen mode
- Added letter distribution drawer
Version 1.4 Aug 15 2013
- Added the random word probablity slider, again, for Brig.
Version 1.3 Aug 14 2013
- Added moving selection during speech for Brig
Version 1.2 Aug 13 2013
- Added speech for Brig
Version 1.1 Aug 12 2013
-Added the ability to do a one-shot scan of a file