PS5 is teaching AI how to play games like a human to automate testing
![PS5](https://automaton-media.com/en/wp-content/uploads/2024/08/20240823-35894-header.JPG.jpg)
Sony Interactive Entertainment’s PS5 engineers held a lecture at Japan’s Computer Entertainment Development Conference (CEDEC) on August 21. As reported by 4Gamer, the presentation centered around the PS5 team’s efforts to create an automated system for QA (quality assurance) testing, which interestingly involves using machine learning to simulate human-like gameplay.
From the looks of it, the automated quality testing in question is not being applied to game development and looking for bugs in games themselves, but rather within the PlayStation 5’s systems – such as its Home and Control Center systems. PS5’s system software contains functions that are linked to gameplay and game progression (Activity Cards are one clear example), and such functions need to be tested by actually playing games.
However, manual QA testing can only be performed a set number of times over the course of a project, which means that depending on the timing a bug occurs, it can end up being caught right before release, potentially disrupting plans, according to Sony’s engineer. On the other hand, if automated, testing can be performed daily, which means bugs get detected early, and developers can react before they get saved to the project’s source code.
![](https://automaton-media.com/en/wp-content/uploads/2024/08/20240823-35894.-001JPG.jpg)
Sony’s solution to this challenge was to develop an automatic play system that incorporates AI. This system is run on a PC by the engineer, and it fetches screen data from the PS5. In response to the game data it receives, it determines and sends back controller inputs to the PS5 i.e., plays the game.
The system consists of two “agents” – a replay agent and an imitation agent. The replay agent merely plays back previously recorded manual gameplay and is used for menu navigation and game scenes that always progress in a predetermined way without random variables. On the other hand, the imitation agent is an AI model that has learned how to play games like a human using a type of machine learning called imitation learning.
The imitation agent reproduces behavioral patterns from the sample data it was trained on – human gameplay. This means that it can play games in real time even when there are random factors present. Sony’s automatic play system switches between these two agents throughout the testing process. To determine when a switch from the replay agent to the imitation agent is needed, the system uses scene recognition and template matching features to check whether a game scene matches pre-prepared data or not.