General game playing
{{short description|Ability of artificial intelligence to play different games}}
{{split|General video game playing|date=June 2023|discuss=Talk:General game playing#Revert merge and split out General video game playing}}
{{Artificial_intelligence|Major goals}}
General game playing (GGP) is the design of artificial intelligence programs to be able to play more than one game successfully.{{cite web |last1=Pell |first1=Barney |editor1=H. van den Herik |editor2=L. Allis |title=Metagame: a new challenge for games and learning. |date=1992 |url=https://svn.sable.mcgill.ca/sable/courses/COMP763/oldpapers/pell-92-metagame.pdf |trans-title=Heuristic programming in artificial intelligence 3–the third computerolympiad |location=Ellis-Horwood |access-date=2020-02-17 |archive-date=2020-02-17 |archive-url=https://web.archive.org/web/20200217154408/https://svn.sable.mcgill.ca/sable/courses/COMP763/oldpapers/pell-92-metagame.pdf |url-status=live }}{{cite journal |last1=Pell |first1=Barney |title=A Strategic Metagame Player for General Chess-Like Games |journal=Computational Intelligence |date=1996 |volume=12 |issue=1 |pages=177–198 |doi=10.1111/j.1467-8640.1996.tb00258.x |s2cid=996006 |language=en |issn=1467-8640}}{{cite journal |last1=Genesereth |first1=Michael |last2=Love |first2=Nathaniel |last3=Pell |first3=Barney |title=General Game Playing: Overview of the AAAI Competition |journal=AI Magazine |date=15 June 2005 |volume=26 |issue=2 |pages=62 |doi=10.1609/aimag.v26i2.1813 |language=en |issn=2371-9621}} For many games like chess, computers are programmed to play these games using a specially designed algorithm, which cannot be transferred to another context. For instance, a chess-playing computer program cannot play checkers. General game playing is considered as a necessary milestone on the way to artificial general intelligence.{{cite book |last1=Canaan |first1=Rodrigo |last2=Salge |first2=Christoph |last3=Togelius |first3=Julian |last4=Nealen |first4=Andy |title=Proceedings of the 14th International Conference on the Foundations of Digital Games |date=2019 |pages=1–8 |trans-title=Proceedings of the 14th International Conference on the Leveling the playing field: fairness in AI versus human game benchmarks |language=EN|doi=10.1145/3337722 |isbn=9781450372176 |s2cid=58599284 }}
General video game playing (GVGP) is the concept of GGP adjusted to the purpose of playing video games. For video games, game rules have to be either learnt over multiple iterations by artificial players like TD-Gammon,{{cite web|last1=Mnih|first1=Volodymyr|last2=Kavukcuoglu|first2=Koray|last3=Silver|first3=David|last4=Graves|first4=Alex|last5=Antonoglou|first5=Ioannis|last6=Wierstra|first6=Daan|last7=Riedmiller|first7=Martin|title=Playing Atari with Deep Reinforcement Learning|url=https://www.cs.toronto.edu/~vmnih/docs/dqn.pdf|publisher=Neural Information Processing Systems Workshop 2013|access-date=25 April 2015|date=2013|archive-date=12 September 2014|archive-url=https://web.archive.org/web/20140912094917/https://www.cs.toronto.edu/~vmnih/docs/dqn.pdf|url-status=live}} or are predefined manually in a domain-specific language and sent in advance to artificial players{{cite book |last1=Schaul |first1=Tom |title=2013 IEEE Conference on Computational {{Proper name|Inteligence}} in Games (CIG) |chapter=A video game description language for model-based or interactive learning |date=August 2013 |pages=1–8 |doi=10.1109/CIG.2013.6633610 |citeseerx=10.1.1.360.2263 |isbn=978-1-4673-5311-3 |s2cid=812565 }}{{cite journal|first1=John|last1=Levine|first2=Clare Bates|last2=Congdon|first3=Marc|last3=Ebner|first4=Graham|last4=Kendall|first5=Simon M.|last5=Lucas|first6=Risto|last6=Miikkulainen|first7=Tom|last7=Schaul|first8=Tommy|last8=Thompson|title=General Video Game Playing|journal=Artificial and Computational Intelligence in Games|date=2013|volume=6|pages=77–83|url=http://drops.dagstuhl.de/opus/volltexte/2013/4337/|access-date=25 April 2015|publisher=Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik|archive-date=9 April 2016|archive-url=https://web.archive.org/web/20160409061434/http://drops.dagstuhl.de/opus/volltexte/2013/4337/|url-status=live}} like in traditional GGP. Starting in 2013, significant progress was made following the deep reinforcement learning approach, including the development of programs that can learn to play Atari 2600 games{{Cite journal|last1=Bowling|first1=M.|last2=Veness|first2=J.|last3=Naddaf|first3=Y.|last4=Bellemare|first4=M. G.|date=2013-06-14|title=The Arcade Learning Environment: An Evaluation Platform for General Agents|journal=Journal of Artificial Intelligence Research|language=en|volume=47|pages=253–279|doi=10.1613/jair.3912|issn=1076-9757|arxiv=1207.4708|s2cid=1552061}}{{cite journal|first1=Volodymyr |last1=Mnih | first2=Koray | last2=Kavukcuoglu | first3=David | last3=Silver | first4=Andrei A. | last4=Rusu | first5=Joel | last5=Veness | first7=Marc G. | last7=Bellemare | first8=Alex | last8=Graves | first9=Martin | last9=Riedmiller | first10=Andreas K. | last10=Fidjeland | first11=Georg Ostrovski | last11=Stig Petersen | first12=Charles | last12=Beattie | first13=Amir | last13=Sadik | first14=Ioannis | last14=Antonoglou | first15=Helen | last15=King | first16=Dharshan | last16=Kumaran | first17=Daan | last17=Wierstra | first18=Shane | last18=Legg | first6=Demis | last6=Hassabis |title=Human-level control through deep reinforcement learning|journal=Nature|date=26 February 2015|volume=518|issue=7540 |pages=529–533|doi=10.1038/nature14236|pmid=25719670|bibcode=2015Natur.518..529M |s2cid=205242740 }}
{{cite web|last1=Korjus|first1=Kristjan|last2=Kuzovkin|first2=Ilya|last3=Tampuu|first3=Ardi|last4=Pungas|first4=Taivo|title=Replicating the Paper "Playing Atari with Deep Reinforcement Learning"|url=https://courses.cs.ut.ee/MTAT.03.291/2014_spring/uploads/Main/Replicating%20DeepMind.pdf|publisher=University of Tartu|access-date=25 April 2015|date=2014|archive-date=18 December 2014|archive-url=https://web.archive.org/web/20141218203544/https://courses.cs.ut.ee/MTAT.03.291/2014_spring/uploads/Main/Replicating%20DeepMind.pdf|url-status=live}}{{cite web|last1=Guo|first1=Xiaoxiao|last2=Singh|first2=Satinder|last3=Lee|first3=Honglak|last4=Lewis|first4=Richard L.|last5=Wang|first5=Xiaoshi|title=Deep Learning for Real-Time Atari Game Play Using Offline Monte-Carlo Tree Search Planning|url=http://papers.nips.cc/paper/5421-deep-learning-for-real-time-atari-game-play-using-offline-monte-carlo-tree-search-planning.pdf|website=NIPS Proceedingsβ|publisher=Conference on Neural Information Processing Systems|access-date=25 April 2015|date=2014|archive-date=17 November 2015|archive-url=https://web.archive.org/web/20151117235331/http://papers.nips.cc/paper/5421-deep-learning-for-real-time-atari-game-play-using-offline-monte-carlo-tree-search-planning.pdf|url-status=live}} as well as a program that can learn to play Nintendo Entertainment System games.{{cite web|last1=Murphy|first1=Tom|title=The First Level of Super Mario Bros. is Easy with Lexicographic Orderings and Time Travel ... after that it gets a little tricky.|url=https://www.cs.cmu.edu/~tom7/mario/mario.pdf|publisher=SIGBOVIK|access-date=25 April 2015|date=2013|archive-date=26 April 2013|archive-url=https://web.archive.org/web/20130426205157/https://www.cs.cmu.edu/~tom7/mario/mario.pdf|url-status=live}}{{cite web|last1=Murphy|first1=Tom|title=learnfun & playfun: A general technique for automating NES games|url=https://www.cs.cmu.edu/~tom7/mario/|access-date=25 April 2015|archive-date=19 April 2015|archive-url=https://web.archive.org/web/20150419040342/http://www.cs.cmu.edu/~tom7/mario/|url-status=live}}{{cite web|last1=Teller|first1=Swizec|title=Week 2: Level 1 of Super Mario Bros. is easy with lexicographic orderings and|url=http://swizec.com/blog/week-2-level-1-of-super-mario-bros-is-easy-with-lexicographic-orderings-and/swizec/6392|website=A geek with a hat|access-date=25 April 2015|date=October 28, 2013|archive-date=30 April 2015|archive-url=https://web.archive.org/web/20150430042152/http://swizec.com/blog/week-2-level-1-of-super-mario-bros-is-easy-with-lexicographic-orderings-and/swizec/6392|url-status=live}}
The first commercial usage of general game playing technology was Zillions of Games in 1998. General game playing was also proposed for trading agents in supply chain management there under price negotiation in online auctions from 2003 onwards.{{cite thesis |last1=McMillen |first1=Colin |s2cid=167336006 |title=Toward the Development of an Intelligent Agent for the Supply Chain Management Game of the 2003 Trading Agent Competition |date=2003 |series=Master's Thesis |trans-title=2003 Trading Agent Competition |publisher=University of Minnesota |location=Minneapolis, MN}}{{cite book |last1=Zhang |first1=Dongmo |title=From general game descriptions to a market specification language for general trading agents |date=2009 |pages=259–274 |trans-title=Agent-mediated electronic commerce. Designing trading strategies and mechanisms for electronic markets. |publisher=Springer |location=Berlin, Heidelberg|bibcode=2010aecd.book..259T |citeseerx=10.1.1.467.4629 }}{{cite web |title=AGAPE - An Auction LanGuage for GenerAl Auction PlayErs |url=https://www.irit.fr/agape/ |website=AGAPE |date=8 March 2019 |access-date=5 March 2020 |language=fr-FR |archive-date=2 August 2021 |archive-url=https://web.archive.org/web/20210802202917/https://www.irit.fr/agape/ |url-status=live }}{{cite journal |last1=Michael |first1=Friedrich |last2=Ignatov |first2=Dmitry |title=General Game Playing B-to-B Price Negotiations |journal=CEUR Workshop Proceedings |date=2019 |volume=-2479 |pages=89–99 |url=http://ceur-ws.org/Vol-2479/project2.pdf |access-date=5 March 2020 |archive-date=6 December 2019 |archive-url=https://web.archive.org/web/20191206072841/http://ceur-ws.org/Vol-2479/project2.pdf |url-status=live }}
History
{{update section|date=October 2021}}
In 1992, Barney Pell defined the concept of Meta-Game Playing and developed the "MetaGame" system. This was the first program to automatically generate chess-like game rules, and one of the earliest programs to use automated game generation. Pell then developed the system Metagamer.[http://www.barneypell.com/games_research.html Barney Pell's research on computer game playing] {{Webarchive|url=https://web.archive.org/web/20070812030341/http://www.barneypell.com/games_research.html |date=2007-08-12 }}. This system was able to play a number of chess-like games, given game rules definition in a special language called Game Description Language (GDL), without any human interaction once the games were generated.{{cite web|url=http://satirist.org/learn-game/projects/metagame.html|website=Metagame and General Game Playing|title=Metagame and General Game Playing|access-date=27 March 2016|archive-date=3 March 2001|archive-url=https://web.archive.org/web/20010303224210/http://satirist.org/learn-game/projects/metagame.html|url-status=live}}
In 1998, the commercial system Zillions of Games was developed by Jeff Mallett and Mark Lefler. The system used a LISP-like language to define the game rules. Zillions of Games derived the evaluation function automatically from the game rules based on piece mobility, board structure and game goals. It also employed usual algorithms as found in computer chess systems: alpha–beta pruning with move ordering, transposition tables, etc.[https://groups.google.com/group/comp.ai.games/browse_thread/thread/c3f734729a107d22/a25c735d6a0693db?&hl=en#a25c735d6a0693db Available: Universal Game Engine] {{Webarchive|url=https://web.archive.org/web/20121103121708/http://groups.google.com/group/comp.ai.games/browse_thread/thread/c3f734729a107d22/a25c735d6a0693db?&hl=en#a25c735d6a0693db |date=2012-11-03 }} email to comp.ai.games by Jeff Mallett, 10-Dec-1998. The package was extended in 2007 by the addition of the Axiom plug-in, an alternate metagame engine that incorporates a complete Forth-based programming language.
In 1998, z-Tree was developed by Urs Fischbacher.{{cite web |title=UZH - z-Tree - Zurich Toolbox for Readymade Economic Experiments |url=https://www.ztree.uzh.ch/en.html |website=www.ztree.uzh.ch |access-date=17 February 2020 |language=en |archive-date=21 February 2016 |archive-url=https://web.archive.org/web/20160221175546/https://www.ztree.uzh.ch/en.html |url-status=live }} z-Tree is the first and the most cited software tool for experimental economics. z-Tree allows the definition of game rules in z-Tree-language for game-theoretic experiments with human subjects. It also allows definition of computer players, which participate in a play with human subjects.{{cite web |last1=Beckenkamp |first1=Martin |last2=Hennig-Schmidt |first2=Heike |last3=Maier-Rigaud |first3=Frank P. |title=Cooperation in Symmetric and Asymmetric Prisoner's Dilemma Games |date=1 March 2007 |publisher=Social Science Research Network |language=en|ssrn=968942|url=https://papers.ssrn.com/sol3/papers.cfm?abstract_id=968942 }}
In 2005, the Stanford Project General Game Playing was established.
In 2012, the development of PyVGDL started.{{cite web |last1=Schaul |first1=Tom |title=schaul/py-vgdl |website=GitHub |url=https://github.com/schaul/py-vgdl |date=7 February 2020 |access-date=9 February 2020 |archive-date=11 June 2018 |archive-url=https://web.archive.org/web/20180611003012/https://github.com/schaul/py-vgdl |url-status=live }}
GGP implementations
=Stanford project=
General Game Playing is a project of the Stanford Logic Group of Stanford University, California, which aims to create a platform for general game playing. It is the most well-known effort at standardizing GGP AI, and generally seen as the standard for GGP systems. The games are defined by sets of rules represented in the Game Description Language. In order to play the games, players interact with a game hosting server[http://sourceforge.net/apps/trac/ggpserver/ GGP Server] {{Webarchive|url=https://web.archive.org/web/20140221223753/http://sourceforge.net/apps/trac/ggpserver/ |date=2014-02-21 }}, platform for competition of general game playing systems.[http://130.208.241.192/ggpserver/ Dresden GGP Server] {{Webarchive|url=https://web.archive.org/web/20130407041521/http://130.208.241.192/ggpserver/ |date=2013-04-07 }}, platform for competition of general game playing systems with automatic scheduling of matches. that monitors moves for legality and keeps players informed of state changes.
Since 2005, there have been annual General Game Playing competitions at the AAAI Conference. The competition judges competitor AI's abilities to play a variety of different games, by recording their performance on each individual game. In the first stage of the competition, entrants are judged on their ability to perform legal moves, gain the upper hand, and complete games faster. In the following runoff round, the AIs face off against each other in increasingly complex games. The AI that wins the most games at this stage wins the competition, and until 2013 its creator used to win a $10,000 prize. So far, the following programs were victorious:{{cite web|url=http://www.general-game-playing.de/|title=General Game Playing|website=www.general-game-playing.de|access-date=2008-08-21|archive-date=2008-12-26|archive-url=https://web.archive.org/web/20081226050247/http://www.general-game-playing.de/|url-status=live}}
=Other approaches=
Other general game playing software that use their own languages for defining game rules include:
GVGP implementations
=Reinforcement learning=
GVGP could potentially be used to create real video game AI automatically, as well as "to test game environments, including those created automatically using procedural content generation and to find potential loopholes in the gameplay that a human player could exploit". GVGP has also been used to generate game rules, and estimate a game's quality based on Relative Algorithm Performance Profiles (RAPP), which compare the skill differentiation that a game allows between good AI and bad AI.{{Cite web|url=http://julian.togelius.com/Nielsen2015Towards.pdf|title=Towards generating arcade game rules with VGDL|last1=Nielsen|first1=Thorbjørn S.|last2=Barros|first2=Gabriella A. B.|last3=Togelius|first3=Julian|last4=Nelson|first4=Mark J.|access-date=2018-02-24|archive-date=2015-09-12|archive-url=https://web.archive.org/web/20150912082532/http://julian.togelius.com/Nielsen2015Towards.pdf|url-status=live}}
=Video Game Description Language=
The General Video Game AI Competition (GVGAI) has been running since 2014. In this competition, two-dimensional video games similar to (and sometimes based on) 1980s-era arcade and console games are used instead of the board games used in the GGP competition. It has offered a way for researchers and practitioners to test and compare their best general video game playing algorithms. The competition has an associated software framework including a large number of games written in the Video Game Description Language (VGDL), which should not be confused with GDL and is a coding language using simple semantics and commands that can easily be parsed. One example for VGDL is PyVGDL developed in 2013. The games used in GVGP are, for now, often 2-dimensional arcade games, as they are the simplest and easiest to quantify. To simplify the process of creating an AI that can interpret video games, games for this purpose are written in VGDL manually.{{clarify|reason=What would the alternative be? To write games in VGDL automatically?|date=January 2024}} VGDL can be used to describe a game specifically for procedural generation of levels, using Answer Set Programming (ASP) and an Evolutionary Algorithm (EA). GVGP can then be used to test the validity of procedural levels, as well as the difficulty or quality of levels based on how an agent performed.{{Cite web|url=http://www.diego-perez.net/papers/PLG_ASP_GVG.pdf|title=Procedural Level Generation with Answer Set Programming for General Video Game Playing|last1=Neufeld|first1=Xenija|last2=Mostaghim|first2=Sanaz|last3=Perez-Liebana|first3=Diego|access-date=2018-02-24|archive-date=2016-03-28|archive-url=https://web.archive.org/web/20160328190637/http://www.diego-perez.net/papers/PLG_ASP_GVG.pdf|url-status=live}}
Algorithms
Since GGP AI must be designed to play multiple games, its design cannot rely on algorithms created specifically for certain games. Instead, the AI must be designed using algorithms whose methods can be applied to a wide range of games. The AI must also be an ongoing process, that can adapt to its current state rather than the output of previous states. For this reason, open loop techniques are often most effective.{{Cite journal|title=Recent Advances in General Game Playing|journal=The Scientific World Journal|date=2015 |volume=2015 |publisher= Hindawi Publishing Corporation
|doi=10.1155/2015/986262 |language=en |doi-access=free|last1=Świechowski|first1=Maciej|last2=Park|first2=Hyunsoo|last3=Mańdziuk|first3=Jacek|last4=Kim|first4=Kyung-Joong|page=986262|pmid=26380375|pmc=4561326}}
A popular method for developing GGP AI is the Monte Carlo tree search (MCTS) algorithm.{{Cite web|url=https://www.researchgate.net/publication/228393769|title=Monte-Carlo Tree Search for General Game Playing|website=ResearchGate|access-date=2016-04-01}} Often used together with the UCT method (Upper Confidence Bound applied to Trees), variations of MCTS have been proposed to better play certain games, as well as to make it compatible with video game playing.{{Cite journal|last=Finnsson|first=Hilmar|date=2012|title=Generalized Monte-Carlo Tree Search Extensions for General Game Playing|url=https://www.aaai.org/ocs/index.php/AAAI/AAAI12/paper/viewFile/4935/5300|journal=Proceedings of the Twenty-Sixth AAAI Conference on Artificial Intelligence|access-date=2016-04-09|archive-date=2013-10-15|archive-url=https://web.archive.org/web/20131015225401/http://www.aaai.org/ocs/index.php/AAAI/AAAI12/paper/viewFile/4935/5300|url-status=dead}}{{Cite web|url=http://julian.togelius.com/Frydenberg2015Investigating.pdf|title=Investigating MCTS Modifications in General Video Game Playing|last1=Frydenberg|first1=Frederik|last2=Anderson|first2=Kasper R.|last3=Risi|first3=Sebastian|last4=Togelius|first4=Julian|access-date=2016-04-09|archive-date=2016-04-12|archive-url=https://web.archive.org/web/20160412083640/http://julian.togelius.com/Frydenberg2015Investigating.pdf|url-status=live}}M. Swiechowski; J. Mandziuk; Y. S. Ong, "Specialization of a UCT-based General Game Playing Program to Single-Player Games," in IEEE Transactions on Computational Intelligence and AI in Games, vol.PP, no.99, pp.1-1 {{doi|10.1109/TCIAIG.2015.2391232}} Another variation of tree-search algorithms used is the Directed Breadth-first Search (DBS),{{Cite web|last=|first=|date=|title=Changing the root node from a previous game step.|url=https://www.researchgate.net/figure/Changing-the-root-node-from-a-previous-game-step_fig1_280087542|quote=DBS: A Directed Breadth First Search (DBS) algorithm|archive-url=https://web.archive.org/web/20210117163805/https://www.researchgate.net/figure/Changing-the-root-node-from-a-previous-game-step_fig1_280087542|archive-date=2021-01-17|access-date=|website=|url-status=live}} in which a child node to the current state is created for each available action, and visits each child ordered by highest average reward, until either the game ends or runs out of time.{{Cite web|url=http://www.diego-perez.net/papers/OpenLoopGVG.pdf|title=Open Loop Search for General Video Game Playing|last1=Perez|first1=Diego|last2=Dieskau|first2=Jens|last3=Hünermund|first3=Martin|access-date=2016-04-09|archive-date=2016-03-28|archive-url=https://web.archive.org/web/20160328190610/http://www.diego-perez.net/papers/OpenLoopGVG.pdf|url-status=live}} In each tree-search method, the AI simulates potential actions and ranks each based on the average highest reward of each path, in terms of points earned.
=Assumptions=
In order to interact with games, algorithms must operate under the assumption that games all share common characteristics. In the book Half-Real: Video Games Between Real Worlds and Fictional Worlds, Jesper Juul gives the following definition of games: Games are based on rules, they have variable outcomes, different outcomes give different values, player effort influences outcomes, the player is attached to the outcomes, and the game has negotiable consequences.Jesper Juul. Half-Real: Video Games Between Real Rules and Fictional Worlds. MIT Press, 2005. Using these assumptions, game playing AI can be created by quantifying the player input, the game outcomes, and how the various rules apply, and using algorithms to compute the most favorable path.{{Cite web|url=http://people.idsia.ch/~tom/publications/dagstuhl-gvgp.pdf|title=General Video Game Playing|last1=Levine|first1=John|last2=Congdon|first2=Clare Bates|last3=Ebner|first3=Marc|last4=Kendall|first4=Graham|last5=Lucas|first5=Simon M.|last6=Miikkulainen Risto|first6=Schaul|last7=Tom|first7=Thompson|last8=Tommy|access-date=2016-04-09|archive-date=2016-04-18|archive-url=https://web.archive.org/web/20160418222101/http://people.idsia.ch/~tom/publications/dagstuhl-gvgp.pdf|url-status=live}}
See also
References
{{reflist}}
External links
- [http://logic.stanford.edu/ggp/homepage/index.php General Game Playing Home Page at Stanford University]
- See also the [http://www.ggp.org/ GGP.org], [https://github.com/ggp-org GGP.org GitHub page], and [https://web.archive.org/web/20131230235146/http://games.stanford.edu/ games.stanford.edu].
- [http://www.general-game-playing.de/ General Game Playing Resources] provided by Dresden University of Technology.
- [http://mrraow.com/index.php/aiai-home/ AiAi by Stephen Tavener]
- [http://www.polyomino.com/ PolyGamo Player Project by David M. Bennett]
- [https://www.zillions-of-games.com/cgi-bin/zilligames/submissions.cgi/19249?do=show;id=1452 Axiom Development kit] a meta-game development system compatible with Zillions of Games, by Greg Schmidt.
- [http://palamedes-ide.sourceforge.net/ Palamedes] - A General Game Playing IDE
- [https://cs.stanford.edu/people/karpathy/convnetjs/demo/rldemo.html ConvNetJS Deep Q Learning Demo]