{"id":566,"date":"2006-08-17T11:45:14","date_gmt":"2006-08-17T16:45:14","guid":{"rendered":"http:\/\/www.shamusyoung.com\/twentysidedtale\/?p=566"},"modified":"2009-08-06T14:19:46","modified_gmt":"2009-08-06T18:19:46","slug":"informless","status":"publish","type":"post","link":"https:\/\/www.shamusyoung.com\/twentysidedtale\/?p=566","title":{"rendered":"Informless"},"content":{"rendered":"<table align=right>\n<tr>\n<td><img decoding=\"async\" src=\"images\/zork.gif\" alt=\"Zork\" align=\"right\"\/><\/td>\n<\/tr>\n<\/table>\n<p><a href=\"http:\/\/www.lileks.com\/bleats\/archive\/06\/0806\/081706.html\">James Lileks <\/a> tries out <a href=\"http:\/\/inform-fiction.org\/I7\/Welcome.html\">Inform<\/a>, a software tool that lets you make interactive fiction, or &#8220;text-based adventure games&#8221;, in the gamer&#8217;s vernacular.   Inform is said to be &#8220;based on natural language&#8221;, which caused me to raise an eyebrow, Spock-like, the moment I read it.  Interactive fiction is still <strong>a game<\/strong>.  The player does things, and the game world is altered in some way.  They continue to alter the game world until the story reaches its conclusion.  This sort of thing requires <em>some<\/em> sort of branching logic.  If the player goes left, they end up in the library.  Right, and they go to the observatory.  Go down into the basement and get eaten by a grue.  Whatever.  There is no way around this: You need some sort of logic to govern this, and that means you need a programming language.  This &#8220;based on natural English&#8221; stuff sounds like Inform is making promises it can&#8217;t keep, that the would-be author can program without learning a programming language.<\/p>\n<p>James gave it a try.  He wrote a short introductory paragraph and told Inform to do its thing. Here is how things went for him:<\/p>\n<div class=quote><tt>You&#39;ve awakened in a dark hole. You cannot tell what smells worse - you or the pit you're in. The floor is hard, but you can see the sky; it's either twilight or dawn. You've no idea.<\/tt><\/p>\n<p>Not exactly interactive fiction style, I know, but it&#39;s been a while. I asked the game to process what I&#39;d written, and it came up with the following error messages. It&#39;s like remarks on a freshman comp paper from a brilliant grad student who completely fried his brain with acid:<br \/>\n<tt><br \/>\nProblem. You wrote 'You've awakened in a dark hole'  : but I can't find a verb here that I know how to deal with, so I am ignoring this sentence altogether.<\/p>\n<p>Problem. You wrote 'You can't tell what smells worse - you or the pit you're in'  : again, I can't find a verb here that I know how to deal with.<\/p>\n<p>Problem. The sentence 'The floor is hard, but you can see the sky'   appears to say two things are the same - I am reading 'floor' and 'hard' as two different things, and therefore it makes no sense to say that one is the other: it would be like saying that 'the chalk is the cheese'. It would be all right if the second thing were the name of a kind, perhaps with properties: for instance 'Dairy Products School is a lighted room' says that something called Dairy Products School exists and that it is a 'room', which is a kind I know about, combined with a property called 'lighted' which I also know about.<\/p>\n<p>[...]<\/p>\n<p>Problems occurring in translation prevented the game from being properly created. (Correct the source text to remove these problems and click on Go once again.)<br \/>\n<\/tt><br \/>\n<strong>Noted, pal. Delete&nbsp;from drive.<\/strong><\/div>\n<p>I don&#8217;t blame him for being irritated.  I gave inform a try myself.  It turns out you can&#8217;t just throw down some prose and expect a computer to intuit what to do with it.  You have to define things as a &#8220;room&#8221; (which is any place, room-like or not, such as &#8216;Jail Cell&#8217; or &#8216;Baseball Field&#8217;), an &#8220;item&#8221; (something that can be picked up) a &#8220;door&#8221; (something that connects two rooms) or a &#8220;container&#8221; (something which may contain items, which may or may not be openable and may or may not be locked).  There are these distinct types of things.  You define them and describe them in certain ways.  If you fail to describe things the way Inform expects, it will fail and will not be able to turn your text into a game.<\/p>\n<p>Programmers will instantly recognize this process: It&#8217;s called <em>compiling<\/em>.  It&#8217;s the process that takes your computer code and turns it into an executable.  If you do not follow the rules of the programming language you&#8217;re using, the compile will fail and the compiler will give you an error message instead of making a game.  This is exactly what happened to James.<\/p>\n<p>So Inform is sort of trying to pretend that it is <em>not<\/em> using a programming language.  This &#8220;based on natural English&#8221; is misleading at best, sophistry at worst.  It <em>is<\/em> using a programming language, but since it is &#8220;based on natural English&#8221; the rules of the language are murky and the compiler is easy to confuse.  Consider:<\/p>\n<p>The key to the computer room is an item.  It is on the table.  It can be taken.  It unlocks the steel door. The description is &#8220;a small brass key with well-worn teeth&#8221;.<\/p>\n<p>This is how you have to write.  Whether or not this is &#8220;natural English&#8221; is arguable.  I&#8217;ve never met anyone who talks this way. A human can parse this easily, but the compiler is going to go nuts.  It&#8217;s going to see &#8220;computer room is an item&#8221; and think the computer room is an item on a table.  It may see &#8220;It is on the table.  It can be taken.&#8221; and think the table can be taken. Should the period at the end of the last sentence go inside or outside of the quotes? Correct grammer says inside, but since that text is echoed back to the player- often in another contex &#8211; you don&#8217;t really want a full stop there.  Trying to write things so as to totally disambiguate your meaning is very hard, and even when done properly the compiler can still get confused. The compiler can misunderstand just about anything.  I&#8217;m sure once you get the hang of it you&#8217;ll eventually intuit what will work and what won&#8217;t, but note that in the end it is the <del datetime=\"2006-08-17T16:00:06+00:00\">author<\/del> <em>programmer<\/em> doing the intuiting, not the compiler.  The rules must be learned via trial and error.  <\/p>\n<p>Let&#8217;s compare this to a language I&#8217;m going to make up right now:<br \/>\n<code><br \/>\n+declare item:\"computer room key\"<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;takeable=true<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;unlocks=\"steel door\"<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;location=\"table\"<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;shortname=\"key\"<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;description=\"a small brass key with well-worn teeth\"<br \/>\n<\/code><\/p>\n<p>This is what programmers are used to: symbols, assigning properties to variables, indentation.  I submit that even for a non-programmer the above is no less readble than what you would need to write for Inform.  Yes, it seems cryptic and daunting, but the system has clear rules that can be clearly defined for the programmer and understood.  Inform has rules as well, but they are obscured and mysterious.  Like a blind man describing an elephant, you must feel around and probe the thing many times until you begin to get a sense of how it is really shaped.<\/p>\n<p>But in the end I think the goal of Inform &#8211; which I am guessing is to bring the power of programming to non-programmers &#8211; is a noble endeavor which is fundamentally flawed. Certainly there are brilliant people out there who have great ideas for interactive fiction but lack the ability to bring them to life.  Putting the power of coding in their hands would be a boon to fans of IF.  Currently IF is dominated by various horror and science fiction stories, with the occasional mystery thrown in for good measure.  I&#8217;m betting this is because these are the sorts of things that programmers enjoy.  If non-programmers had a way of realizing their vision, we might end up seeing IF romance novels, coming-of-age stories, character-driven historical fiction, and other things that just don&#8217;t naturally come from the minds of coders. As nice as this would be, I don&#8217;t think it can be done this way.<\/p>\n<p>Inform tried to allow programming without the use of a programming language, and what they built is programming with a confusing language that has nebulous rules. <\/p>\n<p>UPDATE: I should add: It doesn&#8217;t do what users hope it will do, but Inform is nonetheless a very admirable and fascinating project. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>James Lileks tries out Inform, a software tool that lets you make interactive fiction, or &#8220;text-based adventure games&#8221;, in the gamer&#8217;s vernacular. Inform is said to be &#8220;based on natural language&#8221;, which caused me to raise an eyebrow, Spock-like, the moment I read it. Interactive fiction is still a game. The player does things, and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[66],"tags":[],"class_list":["post-566","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/566","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=566"}],"version-history":[{"count":0,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/566\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=566"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=566"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}