GDL is a tool for expressing the intricacies of game rules and dynamics in a form comprehensible to AI systems through a combination of logic-based constructs and declarative principles.
In practice, GDL is often used for General Game Playing competitions and research endeavors. In these contexts, GDL is used to specify the rules of games that AI agents are expected to play. AI developers and researchers harness GDL to create algorithms that can comprehend and engage with games based on their rule descriptions. The use of GDL paves the way for the development of highly adaptable AI agents, capable of competing and excelling in diverse gaming scenarios.
This innovation is a testament to the convergence of logic-based formalism and the world of games, opening new horizons for AI's potential in understanding and mastering a multitude of games. Game Description Language equips AI with a universal key to unlock the mysteries of diverse game environments and strategies.
Purpose of GDL
Quoted in an article in New Scientist, Genesereth pointed out that although Deep Blue can play chess at a grandmaster level, it is incapable of playing checkers at all because it is a specialized game player.[1] Both chess and checkers can be described in GDL. This enables general game players to be built that can play both of these games and any other game that can be described using GDL.
Specification
Syntax
GDL is a variant of Datalog, and the syntax is largely the same. It is usually given in prefix notation. Variables begin with "?".[2]
Keywords
The following is the list of keywords in GDL, along with brief descriptions of their functions:
distinct
This predicate is used to require that two terms be syntactically different.
does
The predicate does(?r,?m) means that player (or role) ?r makes move ?m in the current game state.
goal
The predicate goal(?r,?n) is used to define goal value ?n (usually a natural number between 0 and 100) for role ?r in the current state.
init
This predicate refers to a true fact about the initial game state.
legal
The predicate legal(?r,?m) means that ?m is a legal move for role ?r in the current state.
next
This predicate refers to a true fact about the next game state.
role
This predicate is used to add the name of a player.
terminal
This predicate means that the current state is terminal.
true
This predicate refers to a true fact about the current game state.
Rules
A game description in GDL provides complete rules for each of the following elements of a game.
Players
Facts that define the roles in a game. The following example is from a GDL description of the two-player game Tic-tac-toe:
(role xplayer)
(role oplayer)
Initial state
Rules that entail all facts about the initial game state. An example is:
With GDL, one can describe finite games with an arbitrary number of players. However, GDL cannot describe games that contain an element of chance (for example, rolling dice) or games where players have incomplete information about the current state of the game (for example, in many card games the opponents' cards are not visible). GDL-II, the Game Description Language for Incomplete Information Games, extends GDL by two keywords that allow for the description of elements of chance and incomplete information:[3]
sees
The predicate sees(?r,?p) means that role ?r perceives ?p in the next game state.
random
This constant refers to a pre-defined player who chooses moves randomly.
The following is an example from a GDL-II description of the card game Texas hold 'em:
Michael Thielscher also created a further extension, GDL-III, a general game description language with imperfect information and introspection, that supports the specification of epistemic games — ones characterised by rules that depend on the knowledge of players.[4]
Other formalisms and languages for game representation
In classical game theory, games can be formalised in extensive and normal forms. For cooperative game theory, games are represented using characteristic functions. Some subclasses of games allow special representations in smaller sizes also known as succinct games.
Some of the newer developments of formalisms and languages for the representation of some subclasses of games or representations adjusted to the needs of interdisciplinary research are summarized as the following table.[5] Some of these alternative representations also encode time-related aspects:
This section needs expansion. You can help by adding to it. (July 2019)
A 2016 paper "describes a multilevel algorithm compiling a general game description in GDL into an optimized reasoner in a low level language".[19]
A 2017 paper uses GDL to model the process of mediating a resolution to a dispute between two parties and presented an algorithm that uses available information efficiently to do so.[20]
^Tomlin, C.J.; Lygeros, J.; Shankar Sastry, S. (July 2000). "A game theoretic approach to controller design for hybrid systems". Proceedings of the IEEE. 88 (7): 949–970. CiteSeerX10.1.1.129.8347. doi:10.1109/5.871303. S2CID1844682.
^Michael, Michael Kearns; Littman, Michael L. (2001). "Graphical Models for Game Theory". In UAI: 253–260. CiteSeerX10.1.1.22.5705.
^Kearns, Michael; Littman, Michael L.; Singh, Satinder (7 March 2011). "Graphical Models for Game Theory". arXiv:1301.2281 [cs.GT].
^Leyton-Brown, Kevin; Tennenholtz, Moshe (2003). "Local-effect games". IJCAI'03: Proceedings of the 18th International Joint Conference on Artificial Intelligence: 772–777.
^Tagiew, Rustam (2009). "On Multi-agent Petri Net Models for Computing Extensive Finite Games". New Challenges in Computational Collective Intelligence. Studies in Computational Intelligence. Vol. 244. Springer. pp. 243–254. doi:10.1007/978-3-642-03958-4_21. ISBN978-3-642-03957-7.
^Bhat, Navin; Leyton-Brown, Kevin (11 July 2012). "Computing Nash Equilibria of Action-Graph Games". arXiv:1207.4128 [cs.GT].
^Kowalski, Jakub; Szykuła, Marek (2013). "Game Description Language Compiler Construction". AI 2013: Advances in Artificial Intelligence: 26th Australasian Joint Conference, Dunedin, New Zealand, December 1-6, 2013. Proceedings. pp. 234–245. Retrieved 1 July 2019.
^de Jonge, Dave; Trescak, Tomas; Sierra, Carles; Simoff, Simeon; López de Mántaras, Ramon (2017). "Using Game Description Language for mediated dispute resolution". AI & Society. 2017 (4). Springer: 767–784. doi:10.1007/s00146-017-0790-8. S2CID22738517.