An example of the syntax, from a version of Dijkstra's algorithm[0]:
The current node is a node that varies.
A node can be found, examined, or unreached.
A node has a number called the total distance.
Definition: a node is near if its total distance is 10 or less.
Following relates various nodes to one node (called the precedent).
The verb to follow (he follows, they follow, he followed, it is followed, he is following) implies the following relation.
> but many have told me later that they really like coding an IF game using Inform 7 once
TIL a programming language purpose built for text adventure games, Is there any example of a famous game written using it with source? I wonder whether inform is specifically useful where there's meta programming within the game.
Also, You seem to take extra care and effort in teaching your students and I appreciate it.
> Is there any example of a famous game written using it with source?
Here's a page of links to Inform source for a number of games including Zork. Obviously it's a rewrite of Zork using Inform as Infocom predate Inform by many years.
> What’s an IF game? Very difficult to search that; Google prioritizes matches containing the English word ‘if’.
Replace "IF" with "text adventure" and you'll get better results. Their heyday was pre-Windows and the classic names to look for are Infocom (US), Scott Adams (US), and Level 9 (UK).
Note well that people who enjoy Interactive Fiction (what we used to call "text adventures") ought to be the most likely people to forgive the fact that a pseudo-natural language interface is, in fact, much pickier with regard to accepted input than actual natural language. (what we used to call tolerance for "guess the verb")
It is not at all the point of this talk, but as a side-note:
> …the functional programming language Haskell [compiles] via C, for example…
This is not correct. GHC, the de facto Haskell compiler, targets an intermediate language called C--, which resembles but is not identical to C and was explicitly designed as a compiler target. The point that some languages do compile to other high-level languages is true—Nim and Haxe being some good examples—but it is not true of Haskell.
> Use the C code generator. Only supposed in unregisterised GHC builds.
> This is the oldest code generator in GHC and is generally not included any more having been deprecated around GHC 7.0. Select it with the -fvia-C flag.
> The C code generator is only supported when GHC is built in unregisterised mode, a mode where GHC produces “portable” C code as output to facilitate porting GHC itself to a new platform. This mode produces much slower code though so it’s unlikely your version of GHC was built this way. If it has then the native code generator probably won’t be available. You can check this information by calling ghc --info (see --info).
I'm a little surprised that while using language models for generating text is suggested, there's no suggestion at using other ways to parse input. It feels like there is some much more advanced technology here that could be put to use.
There's a certain danger to letting the AI "find" the answer, that is you are trying to find an overlap between what the user entered and the options that are available in a situation, and since the program can enumerate the options it might find solutions that the user didn't _really_ identify. But if you are comfortable with a game that might err on the side of being easy... at least I would prefer that, as I tend to find IF too frustrating to play because it's like I'm trying to get in the author's head and figure out what they want me to type.
It would be interesting to think about how GPT-3/etc can be used to generate stable non-hallucinatory descriptions. It could solve some of the combinatorial problems of state and generating descriptions, and perhaps even raise interesting and unplanned events. But to do that you'd almost have to parse the results and then incorporate them into the world (or reject the results and regenerate). That's... actually how a lot of Inform works, so maybe it's a real option? It seems particularly interesting for NPCs, where perhaps you could use a language model for responding but _also_ allow for the model to suggestion NPC actions. By parsing them similar to how you parse player input you can keep the NPCs from being able to do impossible things (a big problem in AI Dungeon) but allow them to attempt actions. Then inform becomes the stable model of the world in which both players and bots are doing things. (This idea actually has me kind of excited...)
For a couple of years I've been compiling an (admittedly worse) fuzzy-parsed version of this with GPT-3 (and friends) to generate and play out executable Javascript lore in an RPG engine.
So, I am very surprised I'm only hearing about Inform now -- clearly not hanging out in the right circles.
Does anyone have any recommendations for keeping abreast of projects like this so we can leverage the best of open source and not reinvent the wheel?
I just found out about NarraScope and I hope to attend the next one. Is there other things I should check out? Twitter firehose doesn't work too well...
Also, do yourself a favor and read the Inform Designer’s Manual, Edition 4. It’s dated (I think it came out in 1998) and pertains to Inform version 6, but it is still very relevant (modern Inform uses I6 under the hood), and it’s a lovely piece of technical writing.
In case you'll get an itch to play IF games, and don't know which one to choose.
Picking at random from this list of top 50 as voted by community, never failed me so far:
It dominated the scene for quite a while. Looking at the Xyzzy award winners will confirm that. Even the first Best Game winner ("So Far" by Andrew Plotkin) was an Inform 6 game.
However over the past decade or so the scene diversified a lot more, particularly as choice-driven rather than parser-driven games became a lot more popular. Twine is a tool for making browser IF games that really broke through there, although in recent times Ink has gained popularity both for making IF and as a tool for making dialogue systems in other non-IF games. Most new parser-IF games I encounter though still tend to be Inform.
A small tangent: for readers interested in IF and curious about trying to write one, Inkjam is 3-day event where you make a short game with Ink, and this year's event is in early September. I participated last year and it's good fun and a good challenge!
FWIW, I recently found a succinct description of the strengths of parser-based and choice-based IF tucked away as an aside in an article by Jimmy Maher on a different subject [1]:
> a hypertext narrative built out of discrete hard branches is much more limiting in some ways than a parser-driven text adventure with its multitudinous options available at every turn — but, importantly, the opposite is also true. A parser-driven game that’s forever fussing over what room the player is standing in and what she’s carrying with her at any given instant is ill-suited to convey large sweeps of time and plot. Each approach, in other words, is best suited for a different kind of experience. A hypertext narrative can become a wide-angle exploration of life-changing choices and their consequences, while the zoomed-in perspective of the text adventure is better suited to puzzle-solving and geographical exploration — that is, to the exploration of a physical space rather than a story space.
Jimmy Maher's blog on the history of computer gaming, which emphasizes interactive fiction, has been going for years and is a comprehensive (and highly readable) source information of how companies like Infocom and other "adventure game" designers in the 70s and 80s led to computer gaming as we know it today.
It's used for the majority of parser-based games (in the traditional text adventure style). But there are many more games these days that are choice-based (like a choose your own adventure book), Inform can potentially be used for such a game, but few of them are made with it. The most popular tool for those games is Twine.
* It's very well documented. The entire compiler design and language grammar is detailed to near text-book standards.
* It's a language that none of my students have ever heard of before
* The syntax of the language is an English-like syntax which weirdly trips up most CS students the first time they see it
* It's a great example of a language used for specialty purposes. No kitchen-sink language here.
Students at first hate it...but many have told me later that they really like coding an IF game using Inform 7 once they get the hang of it.