Tsinghua built a game company! More than ten ChatGPT posts, 7 minutes to develop a game
Tsinghua University used ChatGPT to create a "zero artificial content" "game company", from the boss to the employees are all AI!
As long as you propose an idea, the complete process from design to testing will be handled by AI.
The whole process can be completed in just seven minutes , and the cost is less than US$0.3 (a little more than two RMB yuan)!
This "company" is named "ChatDev", as the name suggests, is to develop through chat.
In the "company", more than a dozen chatbots play different roles and are connected in series to complete the development work.
The whole process can be completed with ChatGPT, without having to train a corresponding model for each link.
The average time for this "company" to develop a game is 409.84 seconds, the fastest is not even three minutes, and the slowest is only 17 minutes.
In terms of consumption, ChatDev uses the ChatGPT API (3.5-turbo), and each game uses about 48.5K tokens on average.
According to this data calculation, using it to develop games, the average cost of each game is only 0.2967 US dollars.
So, how does this "company" work?
Let AI work together
The research team designed a set of "ChatChain" connected by ChatGPT for this "company".
Each bot plays different roles such as CEO, programmer, designer, etc., covering all positions involved in game development.
In order to avoid mistakes or hallucinations, each step in the development process is completed by two bots.
Specifically, ChatDev needs to go through the four major links of design-programming-testing-documentation when making games .
Humans provide an initial idea before the design phase begins, which is the only place where humans are needed .
This idea will be analyzed and evaluated jointly by the CEO, CTO and CP(roduct)O played by the bot.
The CEO will discuss with the CPO and CTO respectively to decide the presentation form of the game (Web/Desktop/Mobile…) and the programming language to be used.
In addition, in the design process, the role played by each bot is assigned by two instructors (also bots).
In order to improve the quality of design work, the team also introduced two working mechanisms of "memory flow" and "self-reflection".
"Memory flow" will save the records of each round of dialogue for each bot to read at any time to ensure the continuity of thinking.
The "self-reflection" mechanism is to generate a "pseudo-self" when the bots have completed their respective work but have not met the requirements, and feedback the questions and related dialogues to the instructor.
After the design work is over, it enters the programming link , including code writing and graphical interface design.
The CTO makes requirements and general ideas to the programmers, and the programmers write the code.
Designers will generate GUI schemes, call related tools to generate image resources, and be integrated by programmers.
The programming process also introduces a working mechanism to improve quality and efficiency, specifically including "code management" and "thought guidance".
The code management mechanism can save multiple versions in the development project, so that it can be rolled back in case of problems.
The two points of the thinking guidance mechanism are to allow the CTO and programmers to "exchange roles", understand each other's ideas, and better solve problems when they arise.
After the program is compiled, it is time to test it .
The testing process is divided into two steps: code review and actual operation, involving the two roles of "code reviewer" and "test engineer".
The testing process also introduces a "thought guidance" mechanism. When the test feedback is unclear, programmers and test engineers will exchange roles.
After the test is completed, the body of the game is done, and the next thing to do is to write documents .
Documentation mainly includes environment description and user manual.
The former describes the environment that the game needs to run, and the CTO guides the programmers to complete it.
The latter is what the CEO decides to include, and the CPO generates it.
At this point, the development of a game is all over.
Apart from providing the starting idea, there is no human shadow in the whole process.
Of course, the dialogue, code and other information in this process are all visible to humans, ensuring the flexibility of development.
If necessary, manual intervention can also be performed, such as replacing the generated GUI.
The above is the whole introduction about the working process of ChatDev.
ChatDev was built under the guidance of Professor Sun Maosong from the NLP Laboratory of Tsinghua University. His research direction is natural language understanding, Chinese information processing, etc.
Associate Professor Liu Zhiyuan of the laboratory is the co-corresponding author of the paper. His research directions are knowledge graph and semantic computing, social computing and computational social science.
The first author of the paper is Dr. Qian Chen, who graduated from the Tsinghua School of Software. In 2016, he was recommended to Tsinghua University for direct Ph.D. from Beijing Institute of Technology. After graduating in 2021, he will work as an application researcher at Tencent.
One More Thing
ChatDev uses the role played by AI to simulate the social scenario of the company.
Not only this "AI game company", using AI to simulate human society has become a research trend.
For example, the "Game Version of Westworld" we have introduced before uses AI to control NPCs and builds a society in the game.
Another team used AI to control characters to make an episode of TV series in the background of South Park.