Re: Portability of games (was Re: Limitations of Inform and TADS?)


09 Nov 1995 16:18:27 GMT

Graham Nelson <nelson@vax.oxford.ac.uk> wrote:
> [Inform] is perfectly flexible enough to accommodate as much of this
> as you want to implement, and I'm sure the same must go for TADS as
> well.

This is true but not especially useful. Almost all computer languages
are Turing powerful and capable of expressing any algorithm. However,
languages differ in how easy it is to express particular algorithms, and
some languages are more suitable for some problems than others.

For example, if I have a file and I want to know the most frequent word
in that file, I type

cat file | tr -cs A-Za-z '
' | tr A-Z a-z | sort | uniq -c | sort -n | tail -1

But I confess that I am at a complete loss as to how to write this
algorithm in Inform (even if I am guaranteed that there will be no
memory problems). Certainly it would take several tens of lines to code
up a solution.

So for this type of problem, shell scripts are a more productive
language than Inform (in the sense that I can spend less time writing a
program to solve the problem, and the resulting program is more flexible
and easier to maintain). Inform, on the other hand, is best suited for
the problem of writing "Trinity"- and "Curses"-like adventure games.

But for more complicated games involving character knowledge, reasoning
and planning, other languages may be more productive yet. People who
work in the AI field tend to use dynamic symbolic languages like Prolog,
Scheme and LISP because these languages allow them to manipulate complex
symbolic data structures easily, something which Inform does not allow
(I have to encode my symbols as numbers, and transform all my data
structures to fixed-size arrays or trees of objects). How do I
represent a conceptual dependency structure in Inform? A frame? A
plan? A semantic net?

This isn't really a criticism of Inform: no language can be good at
everything, and Inform is very good at what it is intended for.

--
Gareth Rees