Nano-NaNoGenMo or #NNNGM

Ah, distinctly I remember it was in the bleak November;
And each separate bit and pixel wrought a novel on GitHub.

April may be the cruelest month, and now the month associated with poetry, but November is the month associated with novel-writing, via NaNoWriMo, National Novel Writing Month. Now, thanks to an offhand comment by Darius Kazemi and the work of Hugo van Kemenade, November is also associated with the computer-generation of novels, broadly speaking. Any computer program and its 50,000 word+ output qualifies as an entry in NaNoGenMo, National Novel Generation Month.

NaNoGenMo does have a sort of barrier to entry: People often think they have to do something elaborate, despite anyone being explicitly allowed to produce a novel consisting entirely of meows. Those new to NaNoGenMo may look up to, for instance, the amazingly talented Ross Goodwin. In his own attempt to further climate change, he decided to code up an energy-intensive GPT-2 text generator while flying on a commercial jet. You’d think that for his next trick this guy might hop in a car, take a road trip, and generate a novel using a LSTM RNN! Those who look up so such efforts — and it’s hard not to, when they’re conducted at 30,000 feet and also quite clever — might end up thinking that computer-generated novels must use complex code and masses of data.

And yet, there is so much that can be done with simple programs that consume very little energy and can be fully understood by their programmers and others.

Because of this, I have recently announced Nano-NaNoGenMo. On Mastodon and Twitter (using #NNNGM) I have declared that November will also be the month in which people write computer programs that are at most 256 characters, and which generate 50,000 word or more novels. These can use Project Gutenberg files, as they are named on that site, as input. Or, they can run without using any input.

I have produced three Nano-NaNoGenMo (or #NNNGM) entries for 2019. In addition to being not very taxing computationally, one of these happens to have been written on an extremely energy-efficient electric train. Here they are. I won’t gloss each one, but I will provide a few comments on each, along with the full code for you to look at right in this blog post, and with links to both bash shell script files and the final output.

OB-DCK; or, THE (SELFLESS) WHALE


perl -0pe 's/.?K/**/s;s/MOBY(.)DI/OB$1D/g;s/D.r/Nick Montfort/;s/E W/E (SELFLESS) W/g;s/\b(I ?|me|my|myself|am|us|we|our|ourselves)\b//gi;s/\r\n\r\n/
/g;s/\r\n/ /g;s//\n\n/g;s/ +/ /g;s/(“?) ([,.;:]?)/$1$2/g;s/\nEnd .//s’ 2701-0.txt #NNNGM

WordPress has mangled this code despite it being in a code element; Use the following link to obtain a runnable version of it:

OB-DCK; or, THE (SELFLESS) WHALE code

OB DCK; or, THE (SELFLESS) WHALE, the novel

The program, performing a simple regular expression substitution, removes all first-person pronouns from Moby-Dick. Indeed, OB-DCK is “MOBY-DICK” with “MY” removed from MOBY and “I” from DICK. Chapter 1 begins:

Call Ishmael. Some years ago—never mind how long precisely—having little or no money in purse, and nothing particular to interest on shore, thought would sail about a little and see the watery part of the world. It is a way have of driving off the spleen and regulating the circulation. Whenever find growing grim about the mouth; whenever it is a damp, drizzly November in soul; whenever find involuntarily pausing before coffin warehouses, and bringing up the rear of every funeral meet; and especially whenever hypos get such an upper hand of , that it requires a strong moral principle to prevent from deliberately stepping into the street, and methodically knocking people’s hats off—then, account it high time to get to sea as soon as can. This is substitute for pistol and ball. With a philosophical flourish Cato throws himself upon his sword; quietly take to the ship. There is nothing surprising in this. If they but knew it, almost all men in their degree, some time or other, cherish very nearly the same feelings towards the ocean with .

Because Ishmael is removed as the “I” of the story, on a grammatical level there is (spoiler alert!) no human at all left at the end of book.

consequence


perl -e 'sub n{(unpack"(A4)*","backbodybookcasedoorfacefacthandheadhomelifenamepartplayroomsidetimeweekwordworkyear")[rand 21]}print"consequence\nNick Montfort\n\na beginning";for(;$i<12500;$i++){print" & so a ".n;if(rand()<.6){print n}}print".\n"' #NNNGM

consequence code

consequence, the novel

Using compounding of the sort found in my computer-generated long poem The Truelist and my “ppg 256-3,” this presents a sequence of things — sometimes formed from a single very common four-letter word, sometimes from two combined — that, it is stated, somehow follow from each other:

a beginning & so a name & so a fact & so a case & so a bookdoor & so a head & so a factwork & so a sidelife & so a door & so a door & so a factback & so a backplay & so a name & so a facebook & so a lifecase & so a partpart & so a hand & so a bookname & so a face & so a homeyear & so a bookfact & so a book & so a hand & so a head & so a headhead & so a book & so a face & so a namename & so a life & so a hand & so a side & so a time & so a yearname & so a backface & so a headface & so a headweek & so a headside & so a bookface & so a bookhome & so a lifedoor & so a bookyear & so a workback & so a room & so a face & so a body & so a faceweek & so a sidecase & so a time & so a body & so a fact […]

Too Much Help at Once


python -c "help('topics')" | python -c "import sys;print('Too Much Help at Once\nNick Montfort');[i for i in sorted(''.join(sys.stdin.readlines()[3:]).split()) if print('\n'+i+'\n') or help(i)]" #NNNGM

Too Much Help at Once code

Too Much Help at Once, the novel

The program looks up all the help topics provided within the (usually interactive) help system inside Python itself. Then, it asks for help on everything, in alphabetical order, producing 70k+ words of text, according the GNU utility wc. The novel that results is, of course, an appropriation of text others have written; it arranges but doesn’t even transform that text. To me, however, it does have some meaning. Too Much Help at Once models one classic mistake that beginning programmers can make: Thinking that it’s somehow useful to read comprehensively about programming, or about a programming language, rather than actually using that programming language and writing some programs. Here’s the very beginning:

Too Much Help at Once
Nick Montfort

ASSERTION

The “assert” statement
**********************

Assert statements are a convenient way to insert debugging assertions
into a program:

assert_stmt ::= “assert” expression [“,” expression]

A plot

So far I have noted one other #NNNGM entry, A plot by Milton Läufer, which I am reproducing here in corrected form, according to the author’s note:


perl -e 'sub n{(split/ /,"wedding murder suspicion birth hunt jealousy death party tension banishment trial verdict treason fight crush friendship trip loss")[rand 17]}print"A plot\nMilton Läufer\n\n";for(;$i<12500;$i++){print" and then a ".n}print".\n"'

Related in structure to consequence, but with words of varying length that do not compound, Läufer’s novel winds through not four weddings and a funeral, but about, in expectation, 735 weddings and 735 murders in addition to 735 deaths, leaving us to ponder the meaning of “a crush” when it occurs in different contexts:

and then a wedding and then a murder and then a trip and then a hunt and then a crush and then a trip and then a death and then a murder and then a trip and then a fight and then a treason and then a fight and then a crush and then a fight and then a friendship and then a murder and then a wedding and then a friendship and then a suspicion and then a party and then a treason and then a birth and then a treason and then a tension and then a birth and then a hunt and then a friendship and then a trip and then a wedding and then a birth and then a death and then a death and then a wedding and then a treason and then a suspicion and then a birth and then a jealousy and then a trip and then a jealousy and then a party and then a tension and then a tension and then a trip and then a treason and then a crush and then a death and then a banishment […]

Share, enjoy, and please participate by adding your Nano-NaNoGenMo entries as NaNoGenMo entries (via the GitHub site) and by tooting & tweeting them!

Computational Narrative and Games (Special Issue)

A special issue of IEEE Transactions on Computational Intelligence and AI in Games (TCIAIG) is now out — I mention it because I was one of the editors, and the issue deals with computational narrative and games.

Here’s the link to the computational narrative and games issue. It was edited by Ian Horswill, Nick Montfort and Michael Young. And here’s what is in it:

Guest Editorial
Horswill, I.D; Montfort, N; Young, R.M
p 92-96

Social Story Worlds With Comme il Faut
McCoy, J. ; Treanor, M. ; Samuel, B. ; Reed, A.A. ; Mateas, M. ; Wardrip-Fruin, N.

p 97-112

Versu—A Simulationist Storytelling System
Evans, R. ; Short, E.
p 113-130

A Computational Model of Narrative Generation for Surprise Arousal
Bae, B.-C. ; Young, R.M.
p 131-143

Automated Story Selection for Color Commentary in Sports
Lee, G. ; Bulitko, V. ; Ludvig, E.A.
p 144-155

Skald: Minstrel Reconstructed
Tearse, B. ; Mawhorter, P. ; Mateas, M. ; Wardrip-Fruin, N.
p 156-165

Designing User-Character Dialog in Interactive Narratives: An Exploratory Experiment
Endrass, B. ; Klimmt, C. ; Mehlmann, G. ; Andre, E. ; Roth, C.
p 166-173

Personalized Interactive Narratives via Sequential Recommendation of Plot Points
Yu, H. ; Riedl, M.O.
p 174-187

Lessons on Using Computationally Generated Influence for Shaping Narrative Experiences
Roberts, D.L. ; Isbell, C.L.
p 188-202

A Supervised Learning Framework for Modeling Director Agent Strategies in Educational Interactive Narrative
Lee, S.Y. ; Rowe, J.P. ; Mott, B.W. ; Lester, J.C.
p 203-214

Shall I Compare Thee to Another Story?—An Empirical Study of Analogy-Based Story Generation
Zhu, J. ; Ontanon, S.
p 216-227

Analysis of ReGEN as a Graph-Rewriting System for Quest Generation
Kybartas, B. ; Verbrugge, C.
p 228 – 241

Michael’s Narrative Candy Store

Michael Mateas gave the keynote today at Intelligent Narrative Technologies 6. With reference (early on) to the Hero’s Journey, he presented a sort of “developer’s journey,” noting that indie developers (as seen at Indiecade) have been turning away from concern with structure and mechanics and toward narrative. He similarly encouraged those working in AI and narrative to turn from structuralist narratology and look at concrete traditions of narrative based in communities of practice.

I thought his repudiation of structuralist narratology was in some ways similar to someone in computer graphics objecting to the pixel or the polygon becuase pixels and polygons do not provide any guidance as to how to create beautiful images. He’s right, and if people are missing this, it’s worth pointing out. But the core problem is with one’s expectation for structural understanding. If people are interested (as Michael is) in modeling “internal processes and conflicts” mapping to “external conflicts” … what are these external conflicts made of? Aren’t they made of events? And wouldn’t it be great to have a solid model of events so more complex narrative phenomena can be built up out of them?

Michael gave us an array of options for work motivated by specific poetic ideas, and these (in keeping with his practice) were extremely grand plans, with a panpoly of dissertations needed to make real progress. His suggestions were that we build huge AI systems, implementing Beckett, Boal, detective novels, flash fiction, and the levels of intentionality in Virgina Woolf. I don’t object to attempting to deal with goals of this sort, but this tour of the interactive narrative candy store seemed to be proposing 23 different manned space missions.

My idea: Why not create & compose simple models of narrative aspects that are indeed culturally grounded and for which there is a poetics, but which seem lower-level (or easier to start on) than the ideas Michael has – aspects such as repetition (seen in Beckett, of course), ellipsis (and its relationship to suspense, as treated in Michael Young’s research), and the like?

These sorts of questions seem to have easier starting points and offer the potential to generalize to some extent across genres, while yielding specific insights as well.

A repetition or ellipsis system would be as culturally grounded as any one that Michael suggested, and it too could be “fully realized” and produce outputs.

My very simple system “Through the Park,” described in “Small-Scale Systems and Computational Creativity,” is an attempt to show how low the stairs are for those interested in investigating ellipsis. Although extremely simple, it is a real model of an aspect of narrative and has been useful to me in thinking about it.

Ian Horswill pointed out in the discussion after the talk that understanding repetition may not be easier than generating romance novels, flash fiction, or work like that of specific authors. This is true, but with repetition there are more concrete starting points. One can certainly start with a lightweight simulation of the world, and of narration, and then elaborate.

Richard Evans mentioned that the repetition in _The Odyssey_ and in Beckett’s plays doesn’t have much in common. I would say that this is true, but that they have _something_ in common – creating a coherent and distinctive texture of language. On the other hand, even within the _same work,_ or work by the same author, there will be different types of repetition that do different things. That’s what makes this aspect of narrative (or, really, textuality) a rich one. It seems to me that these different uses, within a single work or across different works, could be understood analytically and modeled computationally in useful ways. The focus on a single aspect, rather than a genre or community of practice, would make this more tractable and offer a foothold.

Talks from Media Systems

Noah Wardrip-Fruin was an organizer the Media Systems workshop at UCSC just over a year ago, August 26-29, 2012. It was an extraordinary gathering about computational media and its potential, with famous participants from a variety of disciplines and practices. The workshop’s sponsors were also remarkable: the National Science Foundation, National Endowment for the Humanities, National Endowment for the Arts, Microsoft Research, and Microsoft Studios. Now, Noah is working to put high-quality videos of talks from this event online, and to offer some very useful framing discussion of those talks.

This month, three have been posted. The first of these is a talk by Ian Horswill: “Interdisciplinarity is Hard.” I’m collaborating with Ian now to edit a special issue on computational narrative and am looking forward to seeing him at AIIDE. In addition to his talk, I recommend (and assign) his short but rich article “What is Computation?,” which discusses some of the fundamentals of computation as a science along with its intellectual and cultural importance. Those with access to ACM content can also get the later version of the article that was published in Crossroads.

The second talk posted is from the inestimable production designer Alex McDowell: “World Building.” McDowell (The Crow, Fear and Loathing in Las Vegas, Fight Club, Minority Report, Watchmen, etc., etc. ) describes how the development of movies is no longer a storytelling process driven by a single person or idea, but is becoming a process of world building in which a variety of concepts, including design and in some cases engagement with urban planning and spaces, influence each other. McDowell made his points with some of the most beautiful and byzantine diagrammatic slides since David Byrne was doing work in PowerPoint.

The most recent talk is mine – Nick Montfort: “The Art of Operationalization.” I spoke about my experience implementing humanistic ideas (in my case, about narrative) in computational systems, ones that not only can produce narrative results, but which can advance our understanding of the humanities and arts. Prof. Janet Kolodner (now serving the National Science Foundation) seemed to be uncertain about the value of this work, and questioned me about that during my talk – in a way that surprised me a bit! But looking back, I see that our discussion was one of the benefits of having a diverse yet fairly small in-person gathering. I seldom have these discussions either on this blog or in larger, multi-track conferences.

I think of Curveship and even the development of small-scale programs such as Through the Park as research activities (in the humanities, but potentially also in computation) that as connected to narrative and poetic practice. While some people (such as Ken Perlin, who was also at workshop and whose video will be up next week) work in this sort of mode and see the value in it, the benefits are not obvious. The result may not a direct educational outcome, an incremental advance that can be directly measured and evaluated, or a work of art or literature that is recognizable in a traditional way. So, whether I was able to answer well at the time or not, I appreciate the questions, and hope to get more of those sort in other workshops such as these.

Canonical Hypertext, IF, and Digital Narrative

What is it that those who have it hate it and oppose it, but those who lack it desperately want it and imagine it?

A canon.

Deb Chachra called my attention to Infovore’s new canonical list of “hypertext literature / interactive fiction / digital narrative.”

I certainly don’t object to the exercise of blog-based canon development. Back in 2004 I presented a canon-like list of Atari VCS games. Thinking up the list and discussing it online were very useful to me as I started formulating the book I’d later write with Ian Bogost, Racing the Beam. Some of the discussion was “what about this game, why not that game?,” as one commenter noted, but really not much of it – more often we ended up discussing why the focus on the Atari VCS, or what qualities make a game worth studying, or how gameplay and graphics/sound interact, etc.

So, instead of offering any substitute items for the list provided, I’ll just try to mention an aspect of “canon” that Infovore has already picked up on. The best idea in developing such lists seems to be not to pick the greatest hits or the first at doing something or the most widely cited, but rather to choose those productions that are interesting to compare to others.

A canon is a standard, as the OED offers: “c. A standard of judgement or authority; a test, criterion, means of discrimination.” So, it would make sense to me to select works that are, for example, the best at political discourse, or engagement with language, or formal innovation, or critique and transformation of existing work – or whatever aspects of interactive literature one values. What would you hold up as an example of avant-garde writing practices meeting interactivity, for instance, after 1961? What’s the standard for work that engages with contemporary political issues?

T-CIAIG (Computational Narrative & Games) Due October 5

The tickets are now diamonds!

Ian Horswill, Michael Young and I are editing a special issue of IEEE Transactions on Computational Intelligence and AI in Games (T-CIAIG), and your submissions are invited — until October 5, 2011. We have extended the deadline two weeks.

Specifically:

The T-CIAIG Special Issue on Computational Narrative and Games solicits papers on all topics related to narrative in computational media and of relevance to games, including but not limited to:

  • Storytelling systems
  • Story generation
  • Drama management
  • Interactive fiction
  • Story presentation, including performance, lighting, staging, music and camera control
  • Dialog generation
  • Authoring tools
  • Human-subject evaluations of systems

I posted the full call here way back in February: “Call for papers: Special Issue on Computational Narrative and Games.” We are very interested in submissions dealing with computationally involved work on the important topic of narrative.

Friday’s the Deadline: Special Issue on Computational Narrative and Games

As mentioned here before, Ian Horswill, Michael Young and I are editing a special issue of IEEE Transactions on Computational Intelligence and AI in Games (T-CIAIG), and your submissions are invited. Specifically:

The T-CIAIG Special Issue on Computational Narrative and Games solicits papers on all topics related to narrative in computational media and of relevance to games, including but not limited to:

  • Storytelling systems
  • Story generation
  • Drama management
  • Interactive fiction
  • Story presentation, including performance, lighting, staging, music and camera control
  • Dialog generation
  • Authoring tools
  • Human-subject evaluations of systems

I posted the full call here way back in February: “Call for papers: Special Issue on Computational Narrative and Games.” So it seems appropriate to remind everyone now, as the deadline for submissions is this Friday, September 21, 2012.

All author/submission info is online. Submission is done through Manuscript Central.

Let me know (soon!) in comments or by email if you have questions.

Fire Up Your Computational Narrative and Games Submissions

Ian Horswill, Michael Young and I are editing a special issue of IEEE Transactions on Computational Intelligence and AI in Games (T-CIAIG), and your submissions are invited. Specifically:

The T-CIAIG Special Issue on Computational Narrative and Games solicits papers on all topics related to narrative in computational media and of relevance to games, including but not limited to:

  • Storytelling systems
  • Story generation
  • Drama management
  • Interactive fiction
  • Story presentation, including performance, lighting, staging, music and camera control
  • Dialog generation
  • Authoring tools
  • Human-subject evaluations of systems

I posted the full call here way back in February: “Call for papers: Special Issue on Computational Narrative and Games.” So it seems appropriate to remind everyone now, as the deadline for submissions is September 21, 2012.

I recently updated the URL for author/submission info. Submission is done through Manuscript Central.

Let me know in comments or by email if you have questions.

Computational Narrative and Games T-CIAIG Issue

IEEE Transactions on Computational Intelligence and AI in Games (T-CIAIG)

Call for papers: Special Issue on Computational Narrative and Games

Special issue editors: Ian Horswill, Nick Montfort and R. Michael Young

Stories in both their telling and their hearing are central to human experience, playing an important role in how humans understand the world around them. Entertainment media and other cultural artifacts are often designed around the presentation and experience of narrative. Even in video games, which need not be narrative, the vast majority of blockbuster titles are organized around some kind of quest narrative and many have elaborate stories with significant character development. Games, interactive fiction, and other computational media allow the dynamic generation of stories through the use of planning techniques, simulation (emergent narrative), or repair techniques. These provide new opportunities, both to make the artist’s hand less evident through the use of aleatory and/or automated methods and for the audience/player to more actively participate in the creation of the narrative.

Stories have also been deeply involved in the history of artificial intelligence, with story understanding and generation being important early tasks for natural language and knowledge representation systems. And many researchers, particularly Roger Schank, have argued that stories play a central organizing role in human intelligence. This viewpoint has also seen a significant resurgence in recent years.

The T-CIAIG Special Issue on Computational Narrative and Games solicits papers on all topics related to narrative in computational media and of relevance to games, including but not limited to:

– Storytelling systems
– Story generation
– Drama management
– Interactive fiction
– Story presentation, including performance, lighting, staging, music and camera control
– Dialog generation
– Authoring tools
– Human-subject evaluations of systems

Papers should be written to address the broader T-CIAIG readership, with clear and substantial technical discussion and relevance to those working on AI techniques for games. Papers must make sufficient contact with the AI for narrative literature to provide useful insights or directions for future work in AI, but they need not be limited to the documentation and analysis of algorithmic techniques. Other genres of papers that could be submitted include:

– Documentation of complete implemented systems
– Aesthetic critique of existing technologies
– Interdisciplinary studies linking computational models or approaches to relevant fields such as narratology, cognitive science, literary theory, art theory, creative writing, theater, etc.
– Reports from artists and game designers on successes and challenges of authoring using existing technologies

Authors should follow normal T-CIAIG guidelines for their submissions, but clearly identify their papers for this special issue during the submission process. T-CIAIG accepts letters, short papers and full papers. See the IEEE T-CIAIG page for author information. Extended versions of previously published conference/workshop papers are welcome, but must be accompanied by a covering letter that explains the novel and significant contribution of the extended work.

Deadline for submissions: **September 21, 2012**

Notification of Acceptance: December 21, 2012

Final copy due: April 19, 2013

Expected publication date: June or September 2013