From Code to Play: Benchmarking Program Search for Games Using Large Language Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Eberhardinger, Manuel, Goodman, James, Dockhorn, Alexander, Perez-Liebana, Diego, Gaina, Raluca D., Çakmak, Duygu, Maghsudi, Setareh, Lucas, Simon
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911056722395136
author Eberhardinger, Manuel
Goodman, James
Dockhorn, Alexander
Perez-Liebana, Diego
Gaina, Raluca D.
Çakmak, Duygu
Maghsudi, Setareh
Lucas, Simon
author_facet Eberhardinger, Manuel
Goodman, James
Dockhorn, Alexander
Perez-Liebana, Diego
Gaina, Raluca D.
Çakmak, Duygu
Maghsudi, Setareh
Lucas, Simon
contents Large language models (LLMs) have shown impressive capabilities in generating program code, opening exciting opportunities for applying program synthesis to games. In this work, we explore the potential of LLMs to directly synthesize usable code for a wide range of gaming applications, focusing on two programming languages, Python and Java. We use an evolutionary hill-climbing algorithm, where the mutations and seeds of the initial programs are controlled by LLMs. For Python, the framework covers various game-related tasks, including five miniature versions of Atari games, ten levels of Baba is You, an environment inspired by Asteroids, and a maze generation task. For Java, the framework contains 12 games from the TAG tabletop games framework. Across 29 tasks, we evaluated 12 language models for Python and 8 for Java. Our findings suggest that the performance of LLMs depends more on the task than on model size. While larger models generate more executable programs, these do not always result in higher-quality solutions but are much more expensive. No model has a clear advantage, although on any specific task, one model may be better. Trying many models on a problem and using the best results across them is more reliable than using just one.
format Preprint
id arxiv_https___arxiv_org_abs_2412_04057
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle From Code to Play: Benchmarking Program Search for Games Using Large Language Models
Eberhardinger, Manuel
Goodman, James
Dockhorn, Alexander
Perez-Liebana, Diego
Gaina, Raluca D.
Çakmak, Duygu
Maghsudi, Setareh
Lucas, Simon
Artificial Intelligence
Large language models (LLMs) have shown impressive capabilities in generating program code, opening exciting opportunities for applying program synthesis to games. In this work, we explore the potential of LLMs to directly synthesize usable code for a wide range of gaming applications, focusing on two programming languages, Python and Java. We use an evolutionary hill-climbing algorithm, where the mutations and seeds of the initial programs are controlled by LLMs. For Python, the framework covers various game-related tasks, including five miniature versions of Atari games, ten levels of Baba is You, an environment inspired by Asteroids, and a maze generation task. For Java, the framework contains 12 games from the TAG tabletop games framework. Across 29 tasks, we evaluated 12 language models for Python and 8 for Java. Our findings suggest that the performance of LLMs depends more on the task than on model size. While larger models generate more executable programs, these do not always result in higher-quality solutions but are much more expensive. No model has a clear advantage, although on any specific task, one model may be better. Trying many models on a problem and using the best results across them is more reliable than using just one.
title From Code to Play: Benchmarking Program Search for Games Using Large Language Models
topic Artificial Intelligence
url https://arxiv.org/abs/2412.04057