ArticleslgStudy

science

Game Description Language

Game Description Language is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Game Description Language rather than just read about it. In short: Game Description Language (GDL) is a specialized logic programming language designed by Michael Genesereth. The goal of GDL is to allow the development of AI agents capable of general game playing.

Key takeaways

  • Game Description Language belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Game Description Language to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Game Description Language from memory before moving on to harder problems.

Reference excerpt

Game Description Language (GDL) is a specialized logic programming language designed by Michael Genesereth. The goal of GDL is to allow the development of AI agents capable of general game playing. It is part of the General Game Playing Project at Stanford University. GDL is a tool for expressing the intricacies of game rules and dynamics in a form comprehensible to artificial intelligence (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 endeavours. 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 rules. The use of GDL allows for the development of highly adaptable AI agents, capable of competing in diverse scenarios.

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. 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 ?.

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 the player (or role) ?r makes the 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 fact about the initial game state. legal The predicate (legal ?r ?m) means that ?m is a permissible move for role ?r in the current state. next This predicate refers to a 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 an end state of the game. true This predicate refers to a fact about the current game state.

Rules A game description in GDL provides complete rules that define the game's players, initial state, valid moves, how the game state is updated, how the game ends, and how a winner is determined.

Players Facts that define the roles in a game. For example, the two-player game tic-tac-toe could define players in GDL with (role xplayer) and (role oplayer).

Initial state Rules that entail all facts about the initial game state. The following example describes an empty three-by-three tic-tac-toe board, with player x making the starting move:

Legal moves Rules that describe each move which can be taken by a player, based on the current game conditions. A tic-tac-toe player can mark a cell if it is currently blank, and it is the player's turn to move. In GDL:

Game state update Rules that describe all facts about the next state relative to the current state and the moves taken by the players. For example:

Termination Rules that describe the conditions under which the game ends. In tic-tac-toe, the game is over if either player makes three marks in a line, or there are no more blank spaces:

Goal states The values that determine which player wins in an end state. An example is:

Extensions

GDL-II GDL 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). An extension of GDL known as the Game Description Language for Incomplete Information Games (GDL-II) extends the language by two keywords, sees and random, that allow for the description of elements of chance and incomplete information. The statement (sees ?r ?p) means that role ?r perceives ?p in the next game state. The random 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:

GDL-III Michael Thielscher also created a further extension, GDL-III, a general GDL with imperfect information and introspection, that supports the specification of epistemic games—those characterized by rules that depend on the knowledge of players.

Other methods of game representation

In classical game theory, games can be formalized 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. Over time, other formalisms and languages for representing different game types have been developed, due in part to the needs of interdisciplinary research. Some of these alternative representations include time-related aspects:

Applications

A 2016 paper "describes a multilevel algorithm compiling a general game description in GDL into an optimized reasoner in a low level language". 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 to efficiently do so.

See also First-order logic Logic translation

References

External links Game Description Language Specification Archived 2013-04-12 at the Wayback Machine Refereed paper introducing GDL-II

Worked examples

Example 1 — a first encounter with Game Description Language

Start with the simplest possible case. Write down what Game Description Language claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Game Description Language before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Game Description Language ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Game Description Language

In research
Game Description Language appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Game Description Language in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Game Description Language is common in secondary-school and first-year university syllabi. It links to neighbouring topics Game artificial intelligence, Logic programming languages, so understanding it makes those chapters shorter.
In everyday life
Look for Game Description Language outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Game Description Language” →

How to study Game Description Language in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Game Description Language means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Game Description Language out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Game Description Language in simple terms?

Game Description Language (GDL) is a specialized logic programming language designed by Michael Genesereth. The goal of GDL is to allow the development of AI agents capable of general game playing.

Why does Game Description Language matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Game Description Language?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Game Description Language.

Tags

  • Game artificial intelligence
  • Logic programming languages

Keep exploring