Original source: Shin Ji Yuan
Image source: Generated by Unbounded AI
Amazing! The GPT skill tree has grown again, and now you can even do the game directly!?
You know, the current era is no longer the era in the past when you can seize the market by making a small game. Today's game development process is super complex.
Let's start with manpower, the personnel of each game team are counted in dozens or even hundreds. Someone is responsible for programming, someone is responsible for art, someone is responsible for maintenance, and so on.
Each game also has a huge code base and material library.
As a result, developing a great game requires a lot of people and a lot of time to complete. And this time period is often several years.
More intuitively, it is money.
The game team developed a masterpiece that people will remember and love, and the budget will exceed $100 million.
Otherwise, game production is a kind of electricity generated with love.
Now, things have changed!
Researchers have developed a model called GameGPT, which can integrate multiple AI agents to automate some of the processes in game development.
And different agents perform their own duties and work in an orderly manner.
There are agents responsible for reviewing the design plan of the game and making corresponding modifications and adjustments; Some are responsible for translating tasks into concrete code; Some are responsible for checking the code generated in the previous step and reviewing the running results; There are also agents responsible for verifying that all work meets initial expectations.
In this way, by refining and decomposing the workflow, GameGPT can simplify the work of AI agents. This kind of performance is more efficient and much simpler to achieve than an all-powerful agent doing everything.
Researchers say that GameGPT can simplify some of the repetitive and rigid aspects of the traditional game development process, such as code testing.
A large number of developers can be freed from the complicated inspection work and focus on more challenging design links that cannot be replaced by AI.
Of course, this paper is still in a relatively preliminary stage. There are no concrete results or experiments to demonstrate performance improvements.
In other words, no one has actually developed a game with GameGPT, and the model is still in the conceptual stage, and it is difficult to evaluate until there are specific application results and quantifiable data.
However, it is always a direction to work on.
Some netizens said that people's ideas about LLM are somewhat biased. Now, researchers have a tool that solves 100% of NLP problems, while people only care about automating certain workflows.
For example, imagine if the game world reacted to your decisions more normally than you could judge in five minutes as a rule-based, hardcoded engine.
Imagine if a game could improvise side quests for you based on the decisions you make (like randomly slaughtering enemies you see along the way, etc.).
When developers create such a system, they use hint engineering to guide LLM instead of coding these things.
However, the purpose of this is not to save costs, but to make games at a stage where it was not possible to make more games before (isn't it a bit of a mouthful).
GameGPT
First, let's take a look at the big framework of the GameGPT model - the whole process.
As you can see, the author personifies each agent, showing more vividly how they perform their respective duties.
On the far left side of the process is the user side, which is entered into GameGPT, and then the development manager and review make preliminary planning.
The requirements are then sent to development engineers, as well as game engine engineers, to perform specific tasks and generate code.
Finally, check if there are any omissions, send them back to the left side, and run again. If not, continue to the right and the engineer in charge of the inspection will perform the test.
**AI development game?? **
In fact, the rudiments of AI-developed game history may go back even further.
The application of AI in game development can be traced back to classic games such as StarCraft and Diablo. At the time, developers needed AI systems to create interactive virtual worlds and characters.
These systems have become standard for the development of such interactive platforms.
Early research related to AI in game development emphasized controlling non-player characters (NPCs), and with the development of natural language processing (NLP) technology, there was some pioneering work using deep learning techniques to generate levels.
One of the masterpieces is MarioGPT, which successfully generated some of the levels in Super Mario Bros. through a fine-tuned GPT-2 model.
LLM has made great strides this year, with good results in both NLP and computer vision (CV).
We know that LLM training is a multi-stage process. The initial phase consists of training these models in an extensive corpus, facilitating the acquisition of basic language skills.
This is followed by a more important stage, which is to fine-tune the model by generating data from various NLP tasks through instructions. This instruction adjustment enhances the generalization ability of the model in a wide range of applications, allowing LLM to achieve error-free performance in tasks that have not been performed in previous training.
Finally, the Human Feedback Reinforcement Learning (RLHF) stage guarantees the structural integrity and reliability of the model.
Another caveat here – the RLHF stage allows the model to generate content that mimics human style, enhancing its versatility as an agent.
In addition, advances in LLM have promoted the automation of agents in the software development process. Many studies have focused on the question of how to develop an LLM-based agent that can perform different tasks.
For example, AutoGPT used LLM agents to handle certain decision-making tasks in the real world, while HuggingGPT used a single LLM as a controller to coordinate more complex AI tasks.
Although these methods rely on a single LLM agent, they all add a reviewer (the reviewer in the flowchart above) to improve the decision.
Or take AutoGPT as an example, the model will get some auxiliary opinions from the supervised learner to improve its own performance, and HuggingGPT can also be connected to GPT-4 to make a reviewer to evaluate the accuracy of decision-making.
There are other examples, such as MetaGPT, which introduces a multi-agent framework that can be used to automate the development of various software.
Going back to the game development we discussed today, we need to know that unlike general software development, the game development industry needs to keep up with trends, so the entire development process must be more precise and concise to achieve the best efficiency.
In addition, tweaking and using a single LLM to serve the entire development cycle of game development without illusions and high accuracy is impractical and costly.
Therefore, the framework of game development AI requires the participation of multiple reviewers, which can effectively alleviate the hallucinatory tendencies inherent in language models.
The researchers also found that language models have another limitation in game development – redundancy. LLM may generate unnecessary, uninformative tasks or code snippets when the game is built.
To effectively address the problem of illusion and redundancy, today's protagonist, GameGPT, strategically takes a variety of approaches to the problem, including dual collaboration, instruction tweaking through internal vocabularies, and decoupling of code.
It is worth noting that dual collaboration involves the interaction between LLM and small deep learning models, as well as the collaborative participation between the agent responsible for execution and the reviewer agent.
The researchers say these synergies have proven effective in mitigating the illusion and redundancy of GameGPT.
Introduction to the method
Next, the researchers dissected the innovation of GameGPT from the whole process.
First of all, during the game design phase, after receiving a user request, GameGPT's tasks include generating a development plan for the entire game. This planning phase is one of the key steps that greatly affects the seamless progress of the entire development process.
This phase is planned by an LLM-based game development manager who comes up with an initial plan and then breaks it down into a task list.
It is worth noting that due to the inherent limitations of LLM, this initial plan often presents hallucinations, resulting in unexpected tasks, including uninformative or unnecessarily redundant tasks.
To address these issues, the researchers proposed four strategies that could mitigate these challenges that were orthogonal to each other and could be performed in layers for better results.
Scenario one: Categorize incoming requests in order to identify the type of game. Currently, the GameGPT framework supports the development of five different game genres, namely: action, strategy, role-playing, simulation, and adventure.
For each type, researchers provide standardized planning templates that guide game development manager agents through the templates with relevant information.
By adopting this approach, the frequency of redundant tasks is significantly reduced, while the likelihood of hallucinations occurring.
Strategy two: involves the involvement of the program examiner agent, which is another LLM-based agent. This agent operates with a careful design to provide a comprehensive review of the mission plan.
Its main goal is to minimize the occurrence of hallucinations and redundancy. This agent evaluation program provides feedback to improve and increase its accuracy, efficiency, and simplicity.
At the same time, the instructions generated in this part can be used as new input for the game development manager's agent, making the task plan more accurate and perfect.
Strategy 3: Adjust the LLM itself of the game development manager's agent through special instructions to better plan at the game development level. The purpose of this fine-tuning process is to allow the model to produce a plan that is both accurate and concise.
For convenience, the research team collected and integrated an internal dataset that included many combinations of inputs and outputs. While these combinations don't conform to the standard format in length or structure, they all revolve around the requirements of game development.
This part of the fixed mix is provided by developers in the industry.
By adopting this approach, the researchers effectively bridged the gap between LLM's general language skills and game development planning skills.
Strategy 4: "Safety net" in the planning stage. Throughout the planning process, the Game Development Manager Agent always shares the interim results with the user on the front-end interface, allowing the rest of the agents to know at all times what development is in progress.
To enhance this, the researchers integrated an interactive approach that enables users to actively review, correct, and enhance plans based on their expectations. This approach also guarantees consistency between the design plan and the user's needs.
With these strategies out of the way, let's take a look at the advantages of GameGPT.
First, the task classification process in this model requires high accuracy in identifying task types and their corresponding parameters.
So, to ensure accuracy at this stage, the researchers created an agent called a game development engineer. The agent consists of two models that work together to participate in the process of task classification.
This collaborative approach improves the accuracy and effectiveness of task identification. At the same time, in order to avoid the appearance of LLM illusions and improve the accuracy of task classification, the researchers provided a list of task types that may appear in game development.
To better classify this, they adopted the BERT model.
The BERT model has been fully trained with an internal dataset. This dataset contains data items tailored to the game development task. The input is drawn from a predetermined list, and the output corresponds to the specified category of the task.
The review of task types and parameters is carried out at this stage, and an agent called task reviewer is introduced, which is mainly responsible for the identification of each category and whether the parameters are reasonable.
The process of reviewing includes reviewing whether the task type is within a predetermined range and whether it is the most suitable task. At the same time, it also checks the parameter list to see if it aligns with the task.
In some scenarios, such as some situations based on contextual task information, or where the user request cannot be inferred parameters, GameGPT takes a proactive approach to solve them.
Reviewer attracts the user's attention by launching a prompt on the front-end interface and requesting additional information required for the parameters.
The benefit of this interactive approach is that it ensures the integrity of the details of the argument even when automatic reasoning is insufficient.
In addition, there is another agent responsible for identifying dependencies between tasks and constructing a diagram that encapsulates these relationships. After the graph is established, an algorithm is used to traverse and filter the graph, resulting in a definite task execution order.
This process ensures that the model can be executed orderly and systematically according to the dependencies of the task, resulting in a coherent and structured development process.
Another problem is that using LLM to generate lengthy code carries greater hallucinations and the risk of redundancy. To solve this problem, the researchers introduced a new method to decouple the code that appears in game design, simplifying the reasoning process of LLM, thereby greatly mitigating hallucinations and redundancy.
This approach is also not difficult to understand - the researchers will divide the expected script into many shorter code snippets for LLM to process. This decoupling method greatly simplifies the work of LLM.
There is also an effective reasoning method called contextual learning, which can also effectively mitigate hallucinations.
In addition, another hallucination elimination technique applied in GameGPT involves generating a set of K code snippets for each task.
These code snippets are then tested in a virtual environment and presented to the user at the same time. Both the testing process and user feedback are used to identify and eliminate problematic code snippets, leaving only the most viable option to execute. This approach also helps to further reduce the occurrence of hallucinations.
In addition, the researchers have an in-house library with a large number of code snippets designed for game development. Each code snippet is commented by a labeler, providing a clear description of its intended purpose.
To summarize, in order to make the code not redundant and not hallucinating, developers have made two preparations, beforehand and in the event.
At the same time, the library mentioned above is also a valuable resource for fine-tuning the model. Code Review and Improvement After the game engine agent generates the code, the code review agent performs a thorough review and review of the codebase.
The agent conducts a thorough assessment in an effort to identify any instances that might deviate from the original request, or unexpected hallucinations in the code.
After thorough review, the agent can not only flag potential differences, but also provide suggestions for improving the code, resulting in a more reasonable version.
After the review process, the modified code, as well as feedback from the agent, will be shared with the game engine engineer, the agent, and the user through the front-end interface. If the user deems it necessary, he can provide code modification suggestions directly through the front-end interface.
These recommendations are then passed on to the code review agent, which evaluates and selectively merges them to further generate a collaborative and iterative approach to enhancing the code.
Finally, once the code is generated and everything is done, the responsibility falls to the game engine testing agent, which is responsible for executing the generated code.
At this stage, the agent also follows the execution sequence established in the previous phase.
The specific execution process involves sending the code for each individual task to the game engine, executing it, and continuously tracking it during execution, generating logs.
After completing all tasks specified in the execution sequence, the agent merges all logs generated throughout the execution.
The result is a concise and comprehensive summary that is presented to the user through a front-end interface.
In addition, the test engineer agent identifies and reports the occurrence of any backtracking observed during execution. These backtraces serve as key indicators that the AI makes further adjustments to the execution process or code, allowing the entire process to be refined and helping to produce a perfect end product.
Finally, let's look at the framework formula for multiple agents working at the same time:
First, in GameGPT, each agent has a private memory system, and they have access to shared public content to get the necessary information to guide their decision-making process.
For agent i with time step t, this process can be expressed as:
where pθi corresponds to the LLM or expert model related to agent i, Oit represents the output or deliverable of agent i at time step t, and Mit and Pt refer to all private memories and necessary public records within the time step t, respectively.
Due to the peculiarities of the game development industry and the limitations of the big language model, the presence of multiple agents with different roles in GameGPT is crucial.
Given that game development cycles are often months-long, relying on a single agent with comprehensive memory and contextual information can greatly reduce the efficiency of language models, including LLM.
As projects become more complex over time, this approach presents scalability challenges. Also, given the limitation on the number of tags handled by LLM, it is not practical to use a separate agent with full memory in large game development projects.
Also, the inherent problems such as hallucinations and redundancy observed in LLMs highlight the importance of collaboration between multiple agents, especially those with critical roles.
This collaboration is significant in mitigating the challenges posed by LLM illusions and redundancy.
As a result, GameGPT utilizes a range of different roles to facilitate its operation, including responsibilities throughout the game development cycle.
These roles include the game content designer, game development manager, program auditor, game development engineer, task auditor, as well as game engine engineer, code auditor, and game engine test engineer mentioned above.
Throughout the game development process, each character takes on different tasks.
Resources: