Friday 16 July 2010

In the spirit of last year’s prophetic birthday dream I deliberately nudged this year’s “random chapter” in the direction of Vashmalaina prophecy.

Shaping a prophecy

In the first place, I limited the source text to chapters that contained at least one of a particular list of characters, such as Vash, Iylaine, and Malcolm, along with Alred, Egelric, and a few other currently-​living people who may be important in the Vashmalaina storyline. Of course, nearly every chapter includes at least one of these people (Alred and Egelric alone account for a huge number of them), but it does exclude the occasional odd chapter with no one but Oswald and young Matilda, say, or some old chapters including only people who are now dead.

The second thing I did was use a third-​order Markov chain, rather than second-​order like I did last year, meaning that I used three words of “history” when building sentences, rather than only two words. This tends to produce sentences that make more grammatical sense, but unless you have a huge source text, you’re likely to run into whole phrases or even sentences that are copied directly from the source text.

Here’s how it works.

In which the computer scientist takes us on a diversion…

Let’s say the program is chugging along and has produced the random sentence:

Eithne looked down at

What it does next is take the last three words:

Eithne looked down at

and searches the story for every word that has ever followed the exact phrase “looked down at.” There are a quite a few, such as “the,” “her,” “Gwynn,” “Kuntigern’s,” “Colban,” “his,” “him,” etc. It will pick one of these at random, let’s say “her,” and put it at the end of what it has so far:

Eithne looked down at her

Now it will look at the last three words again:

Eithne looked down at her

and find all the words that have ever followed “down at her,” such as “lap,” “at,” “a,” “chest,” etc. Let’s say it picks “at.” Then it has:

Eithne looked down at her at

Well guess what? “at her at” only ever appears in the phrase “at her at last” or “at her at first,” so it will pick either “last” or “first,” and continue on with

Eithne looked down at her at first,

and so on forever. Or until 1100 words, which is where I told it to stop. :-) 

I hope that makes sense. That’s how semi-​sensical spam is generated too.

By choosing a 3-​word string of words, the resulting sentences usually make more grammatical sense, because it means that any chunk of four words you find will have appeared at least once, in that exact order, within the story. It only gets weird when it comes to matching pronouns with subjects, verb tenses in two halves of a compound sentence and so on.

Therefore this year’s birthday dream is slightly less surreal.

But this means you can also find phrases that might ring a bell. For example, consider this passage from the dream-​text below:

He cleared his throat and wiped his runny nose on his sleeve and whirled around at the speed of gossip today! And do just as well.

which contains a shadow of this paragraph from “Matthew has a Christian reason”:

“Did you? You’ve been to Aengus’s, to Wintermere, and to the castle too? Decidedly, my boy, you get around at the speed of gossip today! And do just as much good!”

You can see where the program was finally able to break away from the “speed of gossip” quote when it got to “do just as,” which also appears in the story (twice) in the phrase “do just as well.”

Cleaning it up

I found I had to do a lot less editing of the text this year, probably due to using a 3rd-​order Markov chain, which gave me more reasonable English in the first place.

Also, by limiting the number of characters, I had to do less swapping of “he said” for “Egelric said” and other tweaks to keep the text comprehensible.

I did remove a few sentences that had random characters popping in to do nothing interesting. No guest appearances by Cedric this year, crowing, “Your guest house is closed! Good day!” (I would have left him in, if he had.)

I did leave in an interlude involving Alred and Leofric, and Egelric’s interesting observation about love that immediately followed it.

Otherwise nearly everything is as it came out of the algorithm, including the names of the characters speaking the dialog and performing the various actions. The results were intriguing and rather prophetic, once again.

There are a few places where it is not clear who is talking to whom. People do drift in and out of the narrative. You start counting every other sentence from the most recent “Alred said” and then something happens and suddenly it’s not Alred any more but someone else. When did the Aengus and some-​unnamed-​woman conversation turn into Aengus and Malcolm? Or is it Alred and Malcolm? Malcolm and his father? In that, I suppose, it is very much like a dream.

However, I chose to leave those confusing “mystery speaker” passages as they were, because I think that out of the several possible interpretations, all are interesting and possibly prophetic. So I will let you draw your own conclusions.

Last year’s dream was more Iylaine– and Vash-​centric, whereas this one seems to be a lot more about Malcolm. The ending is particularly poignant. I will like to come back to this at the end of 1086 and see how much came true.

Happy belated birthday, Cassie and Tiffany, you middle-​of-​summer babies, you! :bunny: :bunny: 

The Dream

She who was supposed to love. It was rosy on her skin from time to time. She smiled at him with her blue eyes looking up from his chair.

Even dropping herself carelessly into a chair, her long-​limbed grace was something to which his mind could cling as a sign that she was now expected to undertake.

“That is my final word. You may either sleep here or join in me in bed.”

“No!” she hissed.

Time had seemed to crawl while he had considered taking Baby with him. She would laugh, and if he did not dance. She clung to a nearby chair and pressed her bleeding knuckles into the palm of his white hand. It was all he could do to lay it on her after the baby came—never to end. Who could act as hostess in her place?

He cleared his throat and wiped his runny nose on his sleeve and whirled around at the speed of gossip today! And do just as well.

“Do I still have my children?”

And when they had camped out-​of-​doors: thus she had the idea herself—or another idea entirely. She still stroked her hand up the back of his, slowly, silkily.

“Poor Malcolm…”

He could not imagine how she might present it to him, and her voice conspired to tell him what she had been too tired to handle. This: the way he tore down the stairs.

Egelric laughed and then grew serious at once as her cheeks when she came down. “Where is Iylaine?”

“She’s not here neither!” Nor did Mother Curran ordinarily approve of lying. “But if a boy puts up his cousin’s hair!” she warned.

“They’re practically brother and sister! And he’s not truly an elf.”

Alred frowned. “So why didn’t they kill you?”

“Well! Why do you suppose?”

“Perhaps he will tell he does not return. I shan’t be long,” he said, taking a deep breath and found the room Egelric had chosen by following the warm puffs of her breath on his neck? He tried to pray, but he had not heard it in so long. Over a month.

“I do have some advice for you and Baby.”

Gouts of tears suddenly spilled forth from her beloved cousin. “That’s why not!” he hissed.

“He knew nothing of the ways of young women, Malcolm.”

“It’s just like horses,” he said, nodding at the two of them. Suddenly he smiled at her—the boyish smile he had smiled all day. It had not been a mistake to come. His curiosity had been replaced by a boot that crushed his forehead against her wet hair.

“No one,” she said as she sat up. “What is it?” she asked anxiously after the girls had quieted for a moment.

“Your cousin is on his way down.”

He ran blindly until he had starting drinking. That was when he had opened the first two doors himself on Saturday last.

But then he did wake. He woke, and he sat up.

“Let me get dressed.”

Malcolm had thought of something to say to him: he would have said, but it was too late now, in any case.

“Another thing—I have told her something.”

Instead he turned to go out. But three days before—or three nights, rather—she had lain in such an appalling place. She had only danced with Alred and the elf.

“When do you expect it will come? Mother Duna said it might be easier for you to say.”

A pair of deep creases appeared between Gunnilda’s brows, reminding. “There’s just one thing I shall tell you when a woman wants the baby, she thinks she’s certain if she’s a day late, and if she was not looking…?”

Alred turned his head for only an instant to look for a message. Had she found herself hurried along by the very hand, the dark could be kept at bay with a globe of light.

“Light a—Christ!” he swore softly, bitterly. “You don’t deserve an ounce of pity. You killed Matilda.”

Leofric choked and held her against him again.

Nevertheless, Egelric had kicked enough cats to recognize the beautiful, beautiful, funny sweetness of new love in a man’s voice. It was golden and sweet as honey, warm as milk, and when he would have to tame her. He could no longer feel tears.

Aengus knew his father still loved his mother, still missed his mother more than anything. “Now, I shall get me home where, if I am not yet a fool.”

“You shouldn’t have ridden down here.” She looked tenderly at him for twenty years. “And he has told all he knew? Or were there other things that you’ve gone too long without.”

“I have the ill luck to be out riding with Alred and was looking to sit.”

She gently grasped his arm and tried to invite the world inside.

“That is a very staid and sober woman of forty-​odd, and I would do to an elf woman. So perhaps you can tell me generally what you plan to have?”

“I should like to keep that boy in line.”

“You could leave him here.”

“Could I? Hmm… But how do you mean I may?”

“I mean you must, now.” Their father seemed to be melting away.

“What are they saying?” Iylaine whimpered. She was already stepping down onto the rug and flounced the rumples out of her gown, which had drawn tight over her nipples. However, she never saw him again.

Malcolm snorted and walked on. He had walked far this night.

“What are you leering at?” he snarled. “I shall wear red now. You understand that it was ‘so romantic,’ but she couldn’t come.”

“Oh! Why not?” Lili wailed.

“I have no one else for me. There can be no one in particular. I can almost bear it—almost.”

The humiliation stung Malcolm’s throat and eyes, and his only strength was that of a child trying not to cry.