Categorical listing of functions

This section contains a list of functions organized by category. For a description of each function and its arguments, refer to the following, alphabetically organized, section.

In the GCL, we have tried to minimize the number of built-in functions to include only those that are essential. The idea is that any other function can be built up as a user defined function from the built-in functions. As part of the GCL distribution, we provide a library of useful user defined functions in the file \verb+stdudfs.gcl+. If the line \verb+Include["stdudfs.gcl"]+ is in the \verb+gclini.gcl+ file, then this file is loaded when the GCL is started. The user can also load their own set of user defined functions by adding a line \verb+Include["myudfs.gcl"]+

The reason for minimizing the number of built-in funcitons is that it allows for greater flexibility of use of the GCL, and minimizes clogging up of the space of functions names. It is much easier for users to modify or redefine user defined functions to suit their particular purpose than to modify built-in functions. Also, this approach makes it possible to run a ``stripped down'' version of the GCL if memory is a premium, by just not including unused user defined functions.

The cost to the above approach is that user defined functions can take longer to execute than a corresponding built-in function with the same functionality.

Much of the development of the GCL is based on our own computational experience, and tends to be optimized with respect to the kinds of problems we encounter. However, it may not be optimized for the type of problems you find interesting. If you find that certain operations in the GCL are unacceptably slow, we would appreciate getting feedback on this.

General functionality

Variables and functions

Assign 
Clear 
Include 
NewFunction 
Quit 
UnAssign 

Flow control

For 
If 
While 

Help

Help 
HelpVars 
IsDefined 
Manual 
Version 

Timing

Date 
ElapsedTime 
IsWatchRunning 
StartWatch 
StopWatch 

System information and commands

ExePath 
GambitExe (user-defined) 
GetEnv 
Platform 
SetEnv 
Shell 
UnSetEnv 

Basic data types

Logic

And 
Not 
Or 

Relational operators

Equal 
Greater 
GreaterEqual 
Less 
LessEqual 
NotEqual 

Mathematical operations

Divide 
Exp 
Float 
IntegerDivide 
Inverse 
Log 
Max (user-defined) 
MaxInt (user-defined) 
Min (user-defined) 
Minus 
Modulus 
Negate 
Parentheses 
Plus 
Power 
Precision 
Randomize 
Randomize (user-defined) 
Rational 
Times 

Strings

Concat (user-defined) 
Greater 
GreaterEqual 
Less 
LessEqual 
NthChar 
NumChars 
Plus 
Text 

Lists

ArgMax 
CartesianProd (user-defined) 
Concat 
Contains 
Dimensions (user-defined) 
Dot 
Filter 
Flatten 
Index 
IsList 
Length 
List 
Max (user-defined) 
Min (user-defined) 
NthElement 
NumElements 
Prepend (user-defined) 
Remove 
Sort 
Sum (user-defined) 
Transpose 

Data conversions

Float 
Float (user-defined) 
Integer 
ListForm (user-defined) 
Null 
Precision 
Rational 
Rational (user-defined) 
Text 

Input and output

Display (user-defined) 
Format 
GetFormat 
GetListFormat 
GetIntegerFormat (user-defined) 
GetNumericFormat (user-defined) 
GetSolutionFormat (user-defined) 
GetTextFormat (user-defined) 
Input 
IsEof 
ListFormat 
LoadEfg 
LoadNfg 
Output 
Print 
Read 
Read (user-defined) 
ReadText 
SaveEfg 
SaveNfg 
SetIntegerFormat (user-defined) 
SetListFormat (user-defined) 
SetNumericFormat (user-defined) 
SetSolutionFormat (user-defined) 
SetTextFormat (user-defined) 
Write 
WriteSequenceForm 

Building games

Extensive form manipulation

AddActionAdds an action to a support
AddMoveAdds a move to a game at a terminal node
AddMove (user-defined) 
AddNodeAdds a node to a basis
Basis 
CompressEfg 
CopyTree 
DeleteAction 
DeleteEmptyInfoset 
DeleteEmptyInfosets (user-defined) 
DeleteMove 
DeleteOutcome 
DeleteTree 
InsertAction 
InsertMove 
MergeInfosets 
MoveToInfoset 
MoveTree 
NewEfg 
NewInfoset 
NewInfoset (user-defined) 
NewOutcome 
NewOutcome (user-defined) 
NewPlayer 
NewPlayer (user-defined) 
Randomize (user-defined) 
RemoveAction 
RemoveNode 
Reveal 
SequenceForm 
SequenceFormConstraints 
SequenceFormStrats 
SetChanceProbs 
SetComment 
SetName 
SetOutcome 
SetPayoff 
SetPayoffs (user-defined) 
Support 

Normal form manipulation

AddStrategyAdds a strategy to a support
AgentFormCreates the agent normal form for an extensive form game
CompressNfg 
DeleteOutcome 
ListForm (user-defined) 
NewNfg 
NewNfg (user-defined) 
NewOutcome 
NewOutcome (user-defined) 
NewPlayer 
NewPlayer (user-defined) 
Nfg 
Nfg (user-defined) 
OutcomeForm (user-defined) 
Randomize (user-defined) 
RemoveStrategy 
SetComment 
SetName 
SetOutcome 
SetPayoff 
SetPayoffs (user-defined) 
Support 

Getting information

ActionNumbernativeReturns the index of an action in a support or basis
ActionNumberstdudfs.gcl 
ActionsnativeReturns the list of actions in a support at an information set
Actionsstdudfs.gcl 
AllActionsstdudfs.gcl 
AllInfosetsstdudfs.gcl 
AllMembersstdudfs.gcl 
Ancestorsstdudfs.gcl 
Centroidstdudfs.gcl 
Chancenative 
ChanceProbnative 
Childrennative 
Commentnative 
Descendantsstdudfs.gcl 
Gamenative 
Historystdudfs.gcl 
Infosetnative 
Infosetsnative 
Infosetsstdudfs.gcl 
IsConsistentnative 
IsConstSumnative 
IsNullnative 
IsPerfectRecallnative 
IsPredecessornative 
IsRootstdudfs.gcl 
IsSuccessornative 
Membersnative 
Membersstdudfs.gcl 
Mixednative 
Mixedstdudfs.gcl 
Namenative 
NextSiblingnative 
NodeNumbernative 
Nodesnative 
NodeTreestdudfs.gcl 
NonterminalNodesstdudfs.gcl 
NthChildnative 
NumActionsstdudfs.gcl 
NumChildrenstdudfs.gcl 
NumMembersstdudfs.gcl 
NumPlayersstdudfs.gcl 
NumStratsstdudfs.gcl 
Outcomenative 
Outcomesnative 
Parentnative 
Payoffnative 
Payoffsstdudfs.gcl 
Playernative 
PlayerNumberstdudfs.gcl 
Playersnative 
PriorActionnative 
PriorSiblingnative 
Profilesstdudfs.gcl 
RootNodenative 
Strategiesnative 
Strategiesstdudfs.gcl 
StrategyNumbernative 
TerminalNodesstdudfs.gcl 

Solving games

Subgames

MarkedSubgamenative 
MarkedSubgamesstdudfs.gcl 
MarkSubgamesstdudfs.gcl 
MarkSubgamenative 
Subgamesnative 
UnMarkSubgamesstdudfs.gcl 
UnMarkSubgamenative 

Dominance elimination and supports

Actionsnative 
Actionsstdudfs.gcl 
AddActionnative 
AddStrategynative 
Basisnative 
IsDominatednative 
IterativeUnDominatedstdudfs.gcl 
NthElementstdudfs.gcl 
PossibleNashSupportsnative 
RemoveActionnative 
RemoveStrategynative 
Strategiesnative 
Strategiesstdudfs.gcl 
Supportnative 
UnDominatednative 
UnDominatedstdudfs.gcl 

Solution algorithms

EnumMixedSolvenative 
EnumMixedSolvestdudfs.gcl 
EnumPureSolvenative 
EnumPureSolvestdudfs.gcl 
LcpSolvenative 
LcpSolvestdudfs.gcl 
LiapSolvenative 
LiapSolvestdudfs.gcl 
LpSolvenative 
LpSolvestdudfs.gcl 
PolEnumSolvenative 
QreGridSolvenative 
QreSolvenative 
QreSolvestdudfs.gcl 
SimpDivSolvenative 
SimpDivSolvestdudfs.gcl 

Equilibria and refinements

AllNashstdudfs.gcl 
AllPerfectstdudfs.gcl 
AllSequentialstdudfs.gcl 
AllSubgamePerfectstdudfs.gcl 
ManyNashstdudfs.gcl 
OneNashstdudfs.gcl 
OnePerfectstdudfs.gcl 
OneSequentialstdudfs.gcl 
OneSubgamePerfectstdudfs.gcl 

Solution information

Accuracynative 
ActionProbnative 
ActionProbsstdudfs.gcl 
ActionValuenative 
ActionValuesstdudfs.gcl 
Behavnative 
Behavstdudfs.gcl 
Beliefnative 
Beliefsstdudfs.gcl 
Creatornative 
InfosetProbnative 
InfosetProbsstdudfs.gcl 
InfosetValuenative 
InfosetValuesstdudfs.gcl 
IsNashnative 
IsPerfectnative 
IsSequentialnative 
IsSubgamePerfectnative 
LiapValuenative 
Mixednative 
Mixedstdudfs.gcl 
NodeValuenative 
NodeValuesstdudfs.gcl 
Payoffnative 
Payoffsstdudfs.gcl 
QreLambdanative 
QreValuenative 
RealizProbnative 
RealizProbsstdudfs.gcl 
Regretnative 
Regretsstdudfs.gcl 
SetActionProbsnative 
SetStrategyProbnative 
SetStrategyProbsnative 
SetProbsstdudfs.gcl 
StrategyProbnative 
StrategyProbsnative 
StrategyValuenative 
StrategyValuesstdudfs.gcl