{"word_count": 1384, "character_count": 8508}
The last two days I’ve been teaching a course on formal modeling in the context of our new doctoral program in Digital Studies (Programme doctoral en études numériques); in fact, it was the first ever course taught in this program.  It would certainly have been easier to give a course on the basis of material that you already have, but I wanted to teach something new rather than just warming up old material.  In accordance with my ideas for developing the digital humanities at UNIL, I decided on the topic of formal modeling.  This meant, however, a lot of work over the summer and, with the date of the course coming closer, nagging doubts about the—newly developed and thus untested—content.  Would I have enough material?  Would the participants be able to relate to it, or would it be too hard?  And so on.I had a small but very diverse group of doctoral students from archeology, literary studies, film studies, and sociology, and I’m happy to report that the program on which I had eventually settled turned out to be just right.  The course still included one very experimental section on Friday afternoon: I wanted to explore the feasibility of using Inform 7  to introduce formal modeling.Inform 7 is the latest version of the Inform programming language by Graham Nelson (Nelson2001), a language designed for creating interactive fiction (IF).  Historically, it is one of the great achievements of the IF community in the wake of the folding of Infocom in 1989: Inform compiles to code for the Z-machine, which had been developed by Inform for running Zork (and the over 30 subsequent titles) on microcomputers.  Inform 7 now replaces the C-like syntax of previous versions of Inform with a natural language-like syntax.  Most attempts at making programming more accessible by making programming languages look more like natural languages (usually: like English), such as COBOL, SQL, or AppleScript, have more or less failed with respect to this goal.  However, as implemented in Inform 7, and in the particular domain of interactive fiction, I have the feeling that it works very well.  For example, to create a story environment with three locations, one supporter, one container, and one miscellaneous item (the starting pistol), only the following is required (Nelson2011):East of the Garden is the Gazebo.  Above is the Treehouse.A billiards table is in the Gazebo.  On it is a trophy cup.A starting pistol is in the cup.Inform 7 also gives you much more freedom in the choice of syntax than, say AppleScript, so the following would be one of many more equivalent descriptions of the same environment:The Garden is a room.The Gazebo is a room.  It is east of the Garden.Down from Treehouse is the Garden.In the Gazebo is a billiards table.A starting pistol is in the trophy cup.The cup is on the billiards table.In particular in conjunction with its development environment, which integrates editing, testing, and extensive documentation, Inform 7 thus seems to be a very interesting and accessible platform for experimenting with formal models.[caption id="attachment_358" align="alignnone" width="300"] A screenshot of Inform 7[/caption]I’m not the first one to think that Inform 7 may be useful in education; the Inform Web site has a whole section on teaching with Inform, listing numerous teaching resources.  One example is the use of Inform 7 for historical simulations (for teaching history) by Jeremiah McCall, a topic which clearly touches on formal modeling, even though the main subject is history.Since I had no idea what the background of the participants of my course would be (and due to lack of time), I decided to just try Inform 7 on them with an absolutely minimal introduction.  I gave them a brief historical overview, showed them a short transcript of the opening scene of Zork I, and then had them play a bit with the Onyx and Disenchantment Bay sample stories, which come with Inform 7, before they should try to create their own little stories.  None of the participants had heard of interactive fiction before, and all but one had no prior programming experience.How did it go?  First off, I think the experiment was successful with respect to the overall goal of the course to encourage participants to reflect on models and to realize how explicit formal models—in particular models that can be manipulated by and through computers—need to be.  With respect to actually creating a model in Inform, the participants did not get beyond very basic beginnings.  In a future iteration of this course, whether in the same setting, in a summer school, or as a semester-long course in our master’s program in digital humanities—I would clearly like to have students create more substantial models.  So, what were the problems and what would could be approaches for overcoming them?First, as “natural” Inform 7’s syntax and vocabulary is, it still requires you to know the legal syntax and vocabulary, and a typo or a missing period will prevent your program from running.  Furthermore, if English is not your native language, you may be struggling with the language anyway—and students in the humanities are often not even reading English on a regular basis. ((There is an extension for writing stories in French—and a very nice introduction to it—but it is not (yet) as stable as the standard English version.))Second, you need to have some idea of what is possible, or, in particular in the classroom setting: what may be predefined and thus readily available, to search for and find it in the documentation.Third, there clearly is the thorny issue of bugs and debugging.Having taught programming courses before, all of this did obviously not come as a surprise to me.  It was also interesting that the one student with prior knowledge of programming had effectively no problems in these three areas.  Noticing that Inform 7 would not just accept anything, it was immediately clear to her that despite the “natural language” appearance of Inform 7, there is indeed a specific syntax you have to stick to.  In her story, she wanted to restrict the passage from one room to another.  It sufficed to tell her that there is a section on doors in the manual to put her on track.  And of course, if you have ever done any programming, you know how to deal with errors and rather take them as challenges than as failures.  So, previous knowledge of more traditional programming language certainly transfers to Inform 7, but the question is: in a context where learning the language is not the priority, can we avoid a lengthy introduction to language syntax, and how can we take advantage of the properties of Inform 7 to enable students to quickly pick up the knowledge necessary to be productive?One interesting thing I notice in the course is that despite having no prior knowledge of IF, the students apparently intuitively tended toward “classic” IF settings, such as doors that require keys to open, which must be found first, a “magic” inscription that transports you back in time, or a lounge with many booths populated by mysterious people.  I thus believe that it is not a problem to come up with stories that lend themselves to being easily modeled in Inform.  One thing I would therefore like to try in a future course is to have students first create “storyboards,” and then, step by step, translate them into the language of Inform 7.  The syntax and vocabulary covered would probably resemble what is covered by the Gentle Introduction to Inform, by Mark Engelberg.  This heavily-commented sample game introduces room creation and description, object creation, doors, rules for creating a prologue and ending the game, character creation, asking characters questions, scoring, text variations, instead and after rules, and every turn rules.  This would certainly sufficient for creating interesting stories and be a good foundation for any more “serious” modeling in Inform.As yet, I do not know when and in what setting exactly I will repeat the course, but when I do, I will try the “storyboard” approach and see how it goes.ReferencesNelson, G. (2001). The Inform Designer's Manual. The Interactive Fiction Library, St. Charles, IL, USA, fourth ed.URL http://inform-fiction.org/manual/about_dm4.htmlNelson, G. (2011). Natural language, semantic analysis, and interactive fiction. In K. Jackson-Mead, &#38; J. R. Wheeler (Eds.) IF Theory Reader, (pp. 141–188). Boston, MA, USA: Transcript On Press.URL http://www.inform7.com/learn/documents/WhitePaper.pdf