{"componentChunkName":"component---src-templates-post-template-js","path":"/posts/mario-gpt","result":{"data":{"markdownRemark":{"id":"bf279b78-f11f-5eec-830d-4609fe1eb458","html":"<p>「<a href=\"https://arxiv.org/abs/2302.05981\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">MarioGPT: Open-Ended Text2Level Generation through Large Language Models</a>」を読んだメモです。</p>\n<h2 id=\"abstract\" style=\"position:relative;\"><a href=\"#abstract\" aria-label=\"abstract permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>ABSTRACT.</h2>\n<p>MarioGPT は、GPT-2 をファインチューニングしたモデルとのこと。</p>\n<h2 id=\"2background-and-related-work\" style=\"position:relative;\"><a href=\"#2background-and-related-work\" aria-label=\"2background and related work permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>2.BACKGROUND AND RELATED WORK</h2>\n<h3 id=\"22neural-network-based-level-generation\" style=\"position:relative;\"><a href=\"#22neural-network-based-level-generation\" aria-label=\"22neural network based level generation permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>2.2.NEURAL NETWORK-BASED LEVEL GENERATION</h3>\n<p>先行研究では、生成したステージをプレイ可能か別途 AI エージェントでテストしていた模様。\nMarioGPT はプレイ可能か（つまり、ゴールできる道があるか）も同時に生成するためその点で有利。</p>\n<h2 id=\"3open-ended-level-generation-through-llms\" style=\"position:relative;\"><a href=\"#3open-ended-level-generation-through-llms\" aria-label=\"3open ended level generation through llms permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>3.OPEN-ENDED LEVEL GENERATION THROUGH LLMS</h2>\n<h3 id=\"31level-representation\" style=\"position:relative;\"><a href=\"#31level-representation\" aria-label=\"31level representation permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>3.1.LEVEL REPRESENTATION</h3>\n<p>Video Game Level Corpus (VGLC) という、色々なゲームのステージをテキストにしたデータセットがあるとのこと。</p>\n<p><a href=\"https://github.com/TheVGLC/TheVGLC\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">https://github.com/TheVGLC/TheVGLC</a></p>\n<p>例えばこんな内容。</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n----------------------------------------------------------------------------------E-----------------------------------------------------------------------------------------------------------------------\n----------------------Q---------------------------------------------------------SSSSSSSS---SSSQ--------------?-----------SSS----SQQS--------------------------------------------------------XX------------\n-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------XXX------------\n-------------------------------------------------------------------------------E----------------------------------------------------------------------------------------------------------XXXX------------\n----------------------------------------------------------------S------------------------------------------------------------------------------------------------------------------------XXXXX------------\n----------------Q---S?SQS---------------------&lt;&gt;---------&lt;&gt;------------------S?S--------------S-----SS----Q--Q--Q-----S----------SS------X--X----------XX--X------------SSQS------------XXXXXX------------\n--------------------------------------&lt;&gt;------[]---------[]-----------------------------------------------------------------------------XX--XX--------XXX--XX--------------------------XXXXXXX------------\n----------------------------&lt;&gt;--------[]------[]---------[]----------------------------------------------------------------------------XXX--XXX------XXXX--XXX-----&lt;&gt;--------------&lt;&gt;-XXXXXXXX------------\n---------------------E------[]--------[]-E----[]-----E-E-[]------------------------------------E-E--------E-----------------EE-E-E----XXXX--XXXX----XXXXX--XXXX----[]---------EE---[]XXXXXXXXX--------X---\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX--XXXXXXXXXXXXXXX---XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</code></pre></div>\n<p>ソース: <a href=\"https://github.com/TheVGLC/TheVGLC/blob/master/Super%20Mario%20Bros/Processed/mario-1-1.txt\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">https://github.com/TheVGLC/TheVGLC/blob/master/Super%20Mario%20Bros/Processed/mario-1-1.txt</a></p>\n<p>すごい…</p>\n<h3 id=\"32mariogpt-model\" style=\"position:relative;\"><a href=\"#32mariogpt-model\" aria-label=\"32mariogpt model permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>3.2.MARIOGPT MODEL</h3>\n<p>MarioGPT のモデルには</p>\n<blockquote>\n<p>no pipes, many enemies, low elevation</p>\n</blockquote>\n<p>といったプロンプトを入力にするとのこと。</p>\n<h3 id=\"33open-ended-mario-level-generation-with-novelty-search\" style=\"position:relative;\"><a href=\"#33open-ended-mario-level-generation-with-novelty-search\" aria-label=\"33open ended mario level generation with novelty search permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>3.3.OPEN-ENDED MARIO LEVEL GENERATION WITH NOVELTY SEARCH</h3>\n<p>生成したステージをブラッシュアップするような処理をしている模様。</p>\n<p>かなり色々工夫してるようだが、一旦読み飛ばした。</p>\n<h2 id=\"4experiments-and-results\" style=\"position:relative;\"><a href=\"#4experiments-and-results\" aria-label=\"4experiments and results permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>4.EXPERIMENTS AND RESULTS</h2>\n<h3 id=\"41reconstruction-and-sampling-quality\" style=\"position:relative;\"><a href=\"#41reconstruction-and-sampling-quality\" aria-label=\"41reconstruction and sampling quality permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>4.1.RECONSTRUCTION AND SAMPLING QUALITY</h3>\n<h4 id=\"2-measuring-playability-of-levels\" style=\"position:relative;\"><a href=\"#2-measuring-playability-of-levels\" aria-label=\"2 measuring playability of levels permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>(2) Measuring Playability of Levels:</h4>\n<p>「Mario AI framework」を使ってプレイ可能かテストした模様。\nそして、ほとんどのケースでプレイ可能だったとのこと。</p>\n<p><a href=\"https://github.com/amidos2006/Mario-AI-Framework\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">https://github.com/amidos2006/Mario-AI-Framework</a></p>\n<p>Mario AI framework は、商用利用はできなそう。</p>\n<h2 id=\"感想\" style=\"position:relative;\"><a href=\"#%E6%84%9F%E6%83%B3\" aria-label=\"感想 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>感想</h2>\n<p>Video Game Level Corpus (VGLC) や Mario AI framework など、面白いキーワードを見つけられてよかった。</p>\n<p>GPT-3.5 や GPT-4 なら、ファインチューニングなしでもステージを作らせることができそう。\nただ、作ったステージをブラッシュアップさせるような工夫は必要になるのかもしれない。</p>","fields":{"slug":"/posts/mario-gpt","tagSlugs":["/tag/llm/"],"autoRecommendPosts":["voyager","llm-based-agents-survey","llm-patterns","a-survey-of-agents"]},"frontmatter":{"date":"2023-10-30T12:45:54.155Z","description":"「MarioGPT: Open-Ended Text2Level Generation through Large Language Models」を読んだメモです。","tags":["llm"],"title":"MarioGPT の論文を読んだメモ","socialImage":null,"recommendPosts":null}}},"pageContext":{"slug":"/posts/mario-gpt"}},"staticQueryHashes":["251939775","3942705351","401334301"]}