Recurrent Neural Networks


We recently read The Unreasonable Effectiveness of Recurrent Neural Networks by Andrej Karpathy, and had to give it a try ourselves. If you saw our Markov text generation post, you can probably guess what’s coming next… we used Andrej Karpathy’s code to train a character-level recurrent neural network model on Moby-Dick.

Here’s some generated text after 10,000 training steps:

Ahab, clearing with a heart easy, seeing the three planks found impatience to the pointed tracess of the skin, Ahab strength, ships and dead.

“Stover, much the live into the chaptery or manner, Well, or day it was the forgebo, but one with replishs consternate owners an ashore I suffer the Pequod to go you complete late fell the watch, first or called it. But these I new the seas, I point out, against the simulture instantable steel years up so much all of my air, the malestic begithering captures or round–“Small incholior! mull teven, and get any awarrnatins, that, or now cutting the sabrain’t heart, when he was no small house apouth, Queequeg put into the eastic dit, and instead where all he spoke the oil as possible; leaming beneath me driven the line.

In the dinner secure her established as he would more that might sleetest the peace, and day like a hurrth at the ones to leavn de. A stranger to reday but over nightwalm. But elevatten he must into which “full there! Flask touchess!” cried were still from these the remest of wild wime, real of about white warp. But his hands in it, subtlen them blooded, they lost to thoughts of the Fishery vision. Pip, or mark at the sunger season. By Lood-knoty to the way. Look a concently lengthwere beer we warks, the fuly bows. But this matter, cloudsman to be time so soon? May Stubb his thousand jet both thunders, whether their golden passants of the English Pequod would have been hour down too, Bildad, rust periled their bottom; but, swinging the raw dulks, and betterpulate officially full from the pupping it.

The decks are fessested of his hammich where at also furnished by a queer. In resustance from the unfull of strong look–more around the cerasution night. I wearing that to something along a twindling bones of old Fore-Welmewh for in the black angeloriating, every Greenlazah! Idford-lim lances! Would velley Mrifistin; Tashtego; Tashter, burnt to his arious feeturn in a man.

Notakto Update: iOS and Android


Notakto has been updated to run on both iOS and Android (phones and tablets)!

Notakto is the original Counterwave iOS game and it was first released as an iPad-only application in 2010. This update marks our first port to Android, enabled by our switch from the cocos2d-iphone game engine to its cross-platform descendant cocos2d-x. You can expect more Android ports in the coming months.

Learn more about Notakto on the Numberphile YouTube channel:

Or read the complete mathematical theory of the game here:



Anil Gangolli writes about OMBY:

I’m not sure to whom to attribute this nicety in OMBY (Thane or Greg), but QUEEQUEG appears in one row of many of the OMBY puzzles, and the sequence of tiles forming “QUEEQUEG” has 24 (2!x2!x3!) spelling-invariant permutations, leading to little secondary puzzles in the other row. Straightening “STARBUCK”, when appearing in similar circumstances, however, reveals all.

I wish we could take credit for this, but – like so many things in this project – it just fell out. We did spend a lot of time optimizing the puzzle selections for other metrics, just not this one. We’ll have to give the credit to Melville, or maybe to Thane for suggesting Moby-Dick in the first place!

Out of curiosity, I went back and computed the spelling-invariant permutations for solved lines in all of the puzzles… QUEEQUEG is a good one, especially because it’s so likely to jump out when you see those letters, but it’s not the hardest by this metric. We also have puzzles with ACCOMMODATED (32 permutations) and INSIGNIFICANT (144 permutations) and LANDLESSNESS (192 permutations)… and, if you’re willing to consider multiple word lines, the hardest of them all is SEEM TO SEE OF (576 permutations).

Ahab vs The Whale


We’ve been thinking about different ways to visualize the 10,395 puzzles of OMBY.

We call this Ahab vs The Whale and it was constructed by searching the text of the OMBY puzzles and highlighting ocurrences of “Ahab” vs “Moby-Dick” or “White Whale” using emojis from the excellent emojione project.

Have you encountered your first Ahab puzzle yet?

OMBY Review: A Blankness Full of Meaning


Read Tim Cassedy’s superb review of OMBY on the Los Angeles Review of Books’s “Avidly” blog.

Melville, Meet Markov


We’ve been playing around with Markov text generation (again).

Here’s some generated text based on Moby-Dick, using a word-level trigram model (we call this program Drunk Melville):

Out of the herd. Though such a movement that loosed his hold for the missionary and the red flag, half-wrapping him as cool as an auxiliary material. But, besides the bedstead and centre of the bright sun’s rays like a mildewed skull. Had not the most imminent danger, as this was a little more than if he had been lost by a flood, borne back to the destruction he had ever seen. It was the sound they made a tremulous shadow cast upon his entering a boat alongside, and pushed a little as if this were otherwise, there were not enough, the whole weary thing again. Oh! my lads, DO spring – slap-jacks and quahogs for supper, you know, Rose-bud, that it’s all one, all in a most miserable plight. Too expensive and jolly, again thought I, and we felt like getting up again, captains, and let’s have that swearing. Talk to ‘em.

For comparison, here’s some generated text based on Sense and Sensibility (we’ll call this version Drunk Austen):

Surely this comparison must have involved you in the smallest wish of bringing with his family, and pressed them so cordially to dine with you about her. Ay, it is so delicate a man, with whom they were such as leaves no opening for the best; he will soon have outgrown the fancied necessity of buying a pair of scissors that lay there, and it ended too soon. My affection for herself, which she had, very early in April, and tolerably early in their faces the animating gales of a smile. “I feel no sentiment of approbation which Elinor had no such encouragement to think that three hundred and fifty pounds from the others, by any thing. Do not think it proper that Marianne should sit so composedly by, without claiming a share in that total want of thought which particularly recommended the army.

And, as our friend Bob Hearn points out, it’s mashups of multiple texts that are the most fun. So, here’s a mashup of the two:

Whale’s name to another in an even, unexhilarated voice, saying, “Dinner, Mr. Stubb,” said I, looking dubiously at the coronation procession of ships floated up to my God, His all the players. Possibly, too, Jonah might have had no hand in shipping that ivory arm (like two sword-fish blades) cried out to him, that I plainly see that. He had just quitted, where they have no taste for drawing!” replied Elinor, “I have just bethought me of it again and again; and in preparation for a few yards of Marianne, of marking his animated admiration of the eternal democracy in those black-bordered marbles which cover no ashes! What despair in those latitudes, where the monomaniac old man has to be frequented here and there are some of which almost exactly answer to a lounging circle of singed locks which grew on the part where it is – which might otherwise have entered Elinor’s head.


Craving more Markov generated text? You might also enjoy these rhyming couplets, automatically generated from the Google Books NGram data (all 1,000,000 books, not just Moby-Dick) by code I just extracted from our archives:

As if the implication is given
Of the shipowner will be driven.

Money he has participated
Honorably associated.

A warning
Every morning.

And that we evaluated the effects
Detailed and more especially in neurasthenic subjects.

That red hair that moved along the equally
Company asked their father or his family.

More here: Automatic Couplets.

OMBY Trivia


Some OMBY trivia:

135 chapters + epilogue

11,060 pages

10,395 puzzles

distribution of puzzle lengths:
4: 261
5: 319
6: 702
7: 1,838
8: 4,078
9: 1,921
10: 652
11: 328
12: 159
13: 60
14: 77

209,321 words
35,664 scrambled words (17%)
3.43 scrambled words per puzzle (avg)

1,176,358 characters
167,048 scrambled characters (14%)
16 scrambled characters per puzzle (avg)

2,432 paragraphs

7,107 periods
1,740 exclamation marks
997 question marks

18,944 commas
4,135 semicolons
1,588 em-dashes
192 colons
2 ellipses

OMBY Now Available


OMBY, the Moby-Dick unscrambling game, is now available in the iOS App Store! Here’s the solution to the first puzzle… the remaining 10,394 are up to you:

Introducing OMBY


About a year ago we had a crazy idea: take the entire text of a classic book, like Herman Melville’s Moby-Dick, and break it up sentence-by-sentence into a series of scrambled word puzzles. The puzzles would be scrambled multi-row anagrams, like our previous game Unscramble It, but lifted directly from the text and clued by the context of the surrounding, unscrambled, words.

There were a lot of questions: Would we find enough puzzles to make it interesting? Would the distribution of puzzle difficulties work? How would we render the text to preserve a book-quality reading experience?

We did some experiments to answer those questions and the answers were good! Then we started developing algorithms to automatically process the text and find the best puzzles, and we worked on typesetting the result with print-quality tools, and we kept testing and tuning… and now, finally, OMBY is done and on its way to the app store.

In it’s final form, OMBY presents a series of over 10,000 puzzles that progressively reveal the entire text of Herman Melville’s Moby-Dick! OMBY is part word puzzle and part book, and completely addictive!


subscribe via RSS