Gambit: Software Tools for Game Theory | ||
---|---|---|
<<< Previous | Next >>> |
This chapter is an introduction to the Gambit Command Language (GCL). The GCL provides a method of directing the operation of Gambit that is analagous to that of a high level general purpose programming language.
The purpose of the GCL is to provide a simple, but powerful and flexible language by which one can perform complicated or repetitive operations and procedures on games in extensive or normal form. The language has facilities for building and editing an extensive or normal form game, converting back and forth between the extensive and normal form representations, and solving the resulting games for various equilibria of interest. Standard arithmetic, logic, text and input-output operations are provided, as well as vectorizable functions which support many vector and matrix operations. Flow control statements allow for repetitive operations (such as investigating games as one changes various parameters) or conditional operations. Thus the GCL is also suitable for certain types of econometric analysis of games.
When the GCL starts, it first looks for the initialization file gclini.gcl which is a file containing GCL functions, including function to load the standard user defined functions that are documented in this manual. If the file cannot be found, a warning will be issued. Control is then turned over to you, and you will receive the GCL prompt
GCL1:= << |
You can edit the command line by using the arrow keys. The left and right arrow key move the cursor, the back space or delete key can be used to delete characters, and the typing characters will enter the characters in insert mode. The up and down arrow keys can be used to recall previous lines.
The GCL prompt is of the form GCLnn:= <<. The prompt is actually a valid part of a GCL expression, and can be deleted or modified by the command line editor if so desired. The << part of the prompt is the short form of the Print function, which causes its argument to be displayed. Backspacing over this part of the command will suppress output. The GCLnn:= part of the prompt assigns the evaluation of the expression to the variable GCLnn. Backspacing over this will prevent saving of the output into a variable.
<<< Previous | Home | Next >>> |
Normal form games | Basic concepts |