Venom, Beeswax, Fallen 落葉 Leaves

Having come up with an idiosyncratic terminology (Venom, Beeswax, Mushroom, Salt and Egg) for talking about some aesthetic aspects of procedural literature that matter to me, I now find myself reverting to the same terminology even when talking about other people’s work.

Fallen 落葉 Leaves is a procedurally generated poetry cycle in this year’s IF Comp. It draws on sample texts from Confucian poetry, and combines them and other elements densely, producing couplets with a great deal of strangeness per line. In my terms, it’s therefore heavily applying the principles of Venom (particularity, color, surprise) and Beeswax (varied, allusive, culturally rich source material).

The effect is indeed a bit like reading the translation of something whose metaphors, idioms, and cultural references are outside one’s personal ken:

800px-Shi_Jing.jpg

Some phrases sampled from the Shījīng (詩經),
the Confucian Book of Songs, the Classic of Poetry,
as translated by Arthur Waley. — author’s note for Fallen 落葉 Leaves

To start, you select an adverb from a menu and a verb from another menu; then a poem is generated in couplets, with your adverb and verb plugged into one of the couplets. You may repeat this loop as many times as you like, your adverb and verb changing the contents of the cycle overtly and perhaps also in more subtle ways. The author suggests that a hundred or more moves might be appropriate, and that one might want to pull out specific couplets. Looking at the source code reveals that there are many variables being tracked, perhaps iteratively across repeated builds of the poem.

Because the phrases are so allusive, it is not always easy to extract even a notional meaning from them. More often, I found that I could come up with something but that it was a general rather than a precise interpretation:

You sniff oil — writing home about our walks on the terrace —
Your sailing moon, your arrival — sing my pulse.

The first line is easy enough to imagine: the correspondent stopping mid-letter to breathe in the scent of a perfumed oil, possibly. “Your sailing moon, your arrival” perhaps refer to the time when the lover is to set out and rejoin the poet; “sing my pulse” indicates, presumably, that the poet’s life and heartbeat are in some way responsive to the lover’s movements, or else described by them.

Taken as a whole, though, across multiple sonnets, the experience becomes suddenly Mushroomy: overtly repetitive and generative, not concealing how much it is the result of mechanical operation. The grammar that generates sonnets seems to hit the same major points in each couplet, with allusions to erotic time the lovers spent together in the middle, and then a disagreement (with the player’s adverb/verb choice) toward the end, and the lover departing. (Sometimes on a “well-dressed horse,” which I thought was particularly good.)

Continue reading

Casual Procgen Text Tools

Last Thursday I was at at the PCG-meets-autotesting unconference at Falmouth, which organized into a bunch of work-groups to talk through ideas related to the conference theme. This was a really fun time, and I am grateful to the organizers and my fellow guests for making it so intriguing.

Our morning work-group started with a suggestion I had: what if there were a casual text-generation tool like Tracery, but that provided a similar level of help in assembling corpora for leaf-level node expansion? What would help new users learn about selecting and acquiring a corpus? What would help them refine to the point where they had something they were happy with using? (And for that matter, are there applications of this that we could see being useful to expert users as well? What could such a tool offer that is currently difficult to do?)

This idea sprang from some of my own discovery that I spend a lot of my own procgen development time simply on selecting and revising corpora. What will productively add to the feel and experience of a particular work, and what should be excluded? How small or large do the corpora need to be? Is there behavior that I can’t enforce at the grammar level and therefore have to implement through the nature of the corpus itself? (I talk a bit about those concerns during my PROCJAM talk (video, slides), especially under the Beeswax category.)

We had a great conversation with Gabriella Barros, Mike Cook, Adam Summerville, and Michael Mateas. The discussion ranged to cover a number of additional possibilities, some of which went considerably beyond the initial “naive user” brief here.

Continue reading

Bowls of Oatmeal and Text Generation

In a comment on my recent post on text generation, Dryman wrote

I was wondering if you’d been following some of the recent games criticism discussing where procedural content has ultimately failed to be very interesting or engaging (in games such as Spore or No Man’s Sky), and might have some general thoughts about how procedurally generated text content can potentially be made to resonate more strongly than was the case for the largely graphical reskins in those games. Much of the discussion has focused on what Kate Compton has called the problem of “procedural oatmeal” – i.e. it is very easy to pour 10,000 bowls of plain oatmeal, with each oat being in a different position and each bowl essentially unique, but it is very hard to make these differences *matter* to an audience, and be perceived as truly different in any memorable or thought-provoking way.

(“Some of the recent games criticism” also includes this article from Mike Cook on changing how we talk about procedural generation.)

In response to which, I partly want to point to Bruno Dias’ recent Roguelike Celebration talk, which addresses exactly this point: that procedural generation is not a way to get large amounts of content from small amounts of input, and that procedural generation requires an appropriate design approach.

But to speak for myself: I think the key question in oatmeal-avoidance is whether the generation is connected to anything mechanical. I might be able to generate haiku, or funny food names, or imaginary constellations, or names of funny English-sounding towns, but all that generation is purely decorative unless it is tightly correlated with gameplay — and the player will soon realize that it is decorative and start looking past it.

But what kind of mechanical connection is required? It would be a lot to ask that every procedurally generated variant needed to correspond to different gameplay affordances — that procgen is only interesting if having 10K output states means 10K different verbs or verb clusters or play strategies that could be unlocked.

That’s a very demanding design problem. It’s not completely inconceivable to have elements that work together to generate fresh mechanics: Dominion‘s longevity comes from the fact that the cards play off one another in really interesting ways and make each other useful (or not useful) quite quickly: Peddler might be pointless in a game without +Action and +Buy cards, but in a game with a good action/buy engine and, say, Bishop, it might become a massive source of victory points. There are entire blogs devoted to pointing out productive Dominion card combos and strategies. But that’s a challenge in mechanics design, and if every application of procgen text had to be that mechanically rich, we wouldn’t need it very often.

But there are other applications as well, happily. In The Mary Jane of Tomorrow I wanted pretty much everything the robot said to serve as a reminder of her current training state: it acts as both status information and as a perceivable consequence of what the player has done with her. Show her a book about cowgirls, and she’ll start speaking in a funny accent. Teach her about botany, and suddenly she’ll get really specific about the types of apple she can bake in an apple pie.

Procgen methods are great for this kind of low-levellayered consequence: representing how the player has changed the world state persistently in a small way, rather than massively in a way that forked the narrative.

Continue reading

Visualizing Procgen Text, Part Two

In a previous post (now several months ago — sorry!) I wrote about visualization strategies for looking at procedurally generated text from The Mary Jane of Tomorrow and determining whether the procedural generation was being used to best effect.

There, I proposed looking at salience (how many aspects of the world model are reflected by this text?), variety (how many options are there to fill this particular slot?) and distribution of varying sections (which parts of a sentence are being looked up elsewhere?)

It’s probably worth having a look back at that post for context if you’re interested in this one, because there’s quite a lot of explanation there which I won’t try to duplicate here. But I’ve taken many of the examples from that post and run them through a Processing script that does the following things:

Underline text that has been expanded from a grammar token.

Underlining is not the prettiest thing, but the intent here is to expose the template-screen-shot-2016-09-11-at-4-45-52-pmstructure of the text. The phrase “diced spam pie” is the result of expanding four layers of grammar tokens; in the last iteration, the Diced Spam is generated by one token that generates meat types, and the Pie by another token that generates types of dish.

This method also draws attention to cases where the chunks of composition are too large or are inconsistent in size, as in the case of the generated limericks for this game:

screen-shot-2016-09-11-at-4-45-28-pm

Though various factors (limerick topic, chosen rhyme scheme) have to be considered in selecting each line, the lines themselves don’t have room for a great deal of variation, and are likely to seem conspicuously same-y after a fairly short period of time. The first line of text locks in the choice of surrounding rhyme, which is part of why the later lines have to operate within a much smaller possibility space.

screen-shot-2016-09-11-at-4-45-36-pmIncrease the font size of text if it is more salient. Here the words “canard” and “braised” appear only because we’re matching a number of different tags in the world model: the character is able to cook, and she’s acquainted with French. By contrast, the phrase “this week” is randomized and does not depend on any world model features in order to appear, so even though there are some variants that could have been slotted in, the particular choice of text is not especially a better fit than another other piece of text.

This particular example came out pretty ugly and looks like bad web-ad text even if you don’t read the actual content. I think that’s not coincidental.

screen-shot-2016-09-11-at-4-45-59-pmColor the font to reflect how much variation was possible. Specifically, what this does is increase the red component of a piece of text to maximum; then the green component; and then the blue component. The input is the log of the number of possible variant texts that were available to be slotted into that position.

This was the trickiest rule to get to where I wanted it. I wanted to suggest that both very high-variance and very low-variance phrases were less juicy than phrases with a moderate number of plausible substitutions. That meant picking a scheme in which low-variance phrases would be very dark red or black; the desirable medium-variance phrases are brighter red or orange; and high-variance phrases turn grey or white.

Here “wordless” and “lusty” are adjectives chosen randomly from a huge adjective list, with no tags connecting them to the model world. As a result, even though there are a lot of possibilities, they’re likely not to resonate much with the reader; they’ll feel obviously just random after a little while. (In the same way, in the Braised Butterflied Canard example above, the word “seraphic” is highly randomized.)

Finally, here’s the visualization result I got for the piece of generated text I liked best in that initial analysis:

screen-shot-2016-09-11-at-4-45-44-pm

We see that this text is more uniform in size and color than most of the others, that the whole thing has a fair degree of salience, and that special substitution words occur about as often as stressed words might in a poem.

*screen-shot-2016-09-11-at-5-25-03-pm

There’s another evaluative criterion we don’t get from this strategy, namely the ability to visualize the whole expansion space implicit in a single grammar token.

Continue reading

Worldsmith (Ade McT/interactive fables)

Screen Shot 2016-08-21 at 6.21.43 PM.png

Worldsmith belongs to a category that is still pretty rare, even in this age of growing opportunities for commercial IF: it’s for-sale parser IF. A demo is available for free, but the full version is $5.99. Not only that, but the author has collaborated with furkle (of SPY INTRIGUE fame) to skin an Inform 7 game with images, video, hyperlinks and custom menus. The surrounding images help communicate status information, with images of the NPCs you’re conversing with, and/or the planet you’re currently constructing.

Then there’s the gameplay. Worldsmith is heavy on both simulation and procedural text; I’ve seen a lot of authors start work that made ambitious use of those, but very few actually finish something of that scope and complexity.

The essential premise is that you are a world-builder in competition with several other world-builders (a very high-powered version of the Great British Bake-Off, perhaps). In order to do this, you must combine fundamental elements such as Air and Fire to make planets; set the planets in chosen orbits in your pet solar system; seed those planets with life; and then nurture the life to a degree of sentience that will survive in the wider universe and be able to leave its home planet before said planet becomes uninhabitable.

So far as I’ve seen, this is very much a systems game rather than a puzzle game. There is loads of information to learn about how various elements combine and what sorts of creatures they are likely to produce. Though you get a tutorial (a rather exasperated encounter with your teacher, who evidently feels that you really should have mastered the elements of world-construction by now), there’s a dizzying amount to retain, and you’ll likely find yourself reviewing your instruction manual quite a lot.

I haven’t managed to win. On the contrary, I’ve made a series of half-baked planets and seeded unsuccessful life on them, and needed to restart several times. (It turns out that if you teach your lifeforms too much too quickly, they’ll probably just destroy themselves, so slow up, Prometheus.) But I feel like I’m learning, so this is good restarting, rather than the bad frustrating restarting when a puzzle game has gone unwinnable.

In response to the decisions you make, your world is formed with differently described land forms, creatures, and technologies. It’s probably the closest thing to Spore-in-text-form that I’ve seen.

Still, eventually I realized that if I wanted to blog about this piece, I was going to have to go against my usual preference and write it up without having played the whole thing. So that’s a big caveat. I have some things to point out about Worldsmith but I have not seen anything near all of it, and certainly not most of its storyline.

Continue reading

Visualizing Procgen Text

Lately I’ve been aggressively telling everyone I know to do more visualization of the systems they’re building, and thinking about what that might mean for the procedural text experiments I’ve been up to.

If you’ve played with The Mary Jane of Tomorrow, you’ve probably noticed that some of the poems it generates show a lot more variation and richness than others. That’s easy to observe, but can we quantify it? Can we draw observations about what level of complexity is the most satisfying, and identify portions of the game where more or less complexity would improve the experience? If we’re procedural text artists, how do we decide where to direct our attention?

One of the fun/horrifying things about this particular medium is that it pretty much never feels like you’re done: it would always be possible to add more corpora and more variant templates. Both Mary Jane and Annals of the Parrigues came to an end because I needed to move on to other work, not because I couldn’t think of anything further to add. But one thing I might want from a procgen text tool is help discerning where the biggest blank spots are currently.

The first step towards visualization is of course figuring out what aspects of the system you might want to look at, and in fact I often find “how would I draw a picture of this?” to be a good way of making myself think about the salient qualities of a particular system. Here are the things I decided I wanted to know about the text in Mary Jane:

Size of component phrases: how long is the smallest atom of text in a given composition? When you see something in the text, was that produced by a human or is it the juxtaposition of several pieces selected algorithmically? This is very varied in Mary Jane, with some poems or conversation options picking entire sentences, and other selections being just a word or two long. (Parrigues goes even further and composites town names from constituent syllables, but Mary Jane isn’t going that far.)

Number of alternatives: if a phrase was picked from a list, how many other options were there? Number of options is going to determine how unique a particular element is in your experience of the text.

Salience of selected phrase: why did we pick this piece? How many pieces of information about the world model did it have to match in order to be selected? (And to combine those two points, if we picked a highly salient phrase, how many other options were there of equal salience?)

Continue reading