© Jørgen Steensgaard-Madsen, Copenhagen, 2006
This game is life threatening, so we shall concentrate on an
emulation. The key characteristic of the game is a gun that may be
fired or not at the head of the current agent in the game. A survivor
wins, a quitter is dishonored. This is pretty trivial from a game
theoretical point of view, so we modify the game slightly so that a
player pays a fixed fee to a common purse before making a choice to
fire or skip. Players take turns and a player is dishonored only when
unable to pay the fee. Initially players are assumed to start each
with the same capital from which fees are drawn. A survivor pockets
the contents of the purse and adds it to his capital.
An important point illustrated by the example is the duality between
operation and clause as seen from definers and users,
respectively. This is one key insight that lies behind the entire design
of Howard languages.
The example can be seen as defining an interpreter for a domain
specific language designed to express strategies for a simple game.
Several other types of programs could similarly be organised as
interpreters for input data expressed in a suitable domain specific
language. Fortunately, programmers
do not have to care about scanning and parsing, since this is obtained
by the semantics of the INTERPRET operation of the
HL:demo interpreter .
|File translated from
|On 18 Oct 2006, 16:47.