Sony Files Patent to Let AI Write the Code That Feeds Game-Testing Bots
Before an AI bot can test a video game, someone has to teach the game to report what's happening. Sony's filing hands that job to another AI.
What Sony's game-testing code helper does
Every time a studio builds a new version of a game, testers have to play it again to catch bugs. More and more, some of that playing is done by AI bots instead of people. But a bot is only as good as what it can see.
A bot can't glance at the screen the way you do. The game has to tell it things, like your character is low on health or the ship is almost out of fuel. Today, an engineer has to find the right spot in the game's code and add a message that sends that information out. Sony's patent application gives that chore to an AI model, which reads the game's code, picks the spots, writes the messages, and adds them.
Then the bot plays, and the system watches how it does. If the extra information helps, the message stays. If not, it can be changed or removed.
… determining, by the machine learning model and based on the video game information to be collected, a location in a video game codebase for an application programming interface (API) call insertion …
Translation: The AI figures out exactly where in the source code to insert a data tracking command.
How the AI picks where to add each data request
The system starts with an input describing what the test bot needs to know: the current state of the game world, the actions available, interactions with non-player characters (the computer-controlled ones), or game events. In one version, that input is a JSON file (a simple, structured text file) listing the type of data, its format, and the address of the AI agent that will receive it.
A machine learning model, described as a large language model (the same family of AI behind chatbots), then reads the game's codebase, meaning the full collection of source code. It picks the right spots and writes an API call, a small request that pulls a piece of information out of the game and sends it along. The filing's example is a simple role-playing game where moving, attacking and collecting an item each send a report to the bot.
After that, a feedback loop kicks in:
- The bot plays, and a separate assessor checks how its choices lined up with the data it received.
- The model can change, move, delete or add calls based on that review.
- Developers can accept or reject each call in a merge request (a standard code review step), and those answers help retrain the model.
- Marker tags let the calls be stripped out once a testing session ends.
The filing also describes the model leaving plain-language comments in the code to explain each addition, then reading them later to decide on more.
… generating an API call based on the video game information to be collected and the location. The method can further include inserting the API call into the video game codebase at the location …
Translation: The system automatically writes the new code and injects it directly into the game's codebase.
What this means for Sony's game testing bots
The immediate winners are the people who build and test games. The filing says hand-picking code locations for test data is slow and easy to get wrong, and that automating it could cut mistakes and shorten development timelines. For you as a player, the hoped-for result is fewer bugs slipping through to release.
The filing uses Sony's own console setting as its example, and it names big PlayStation-style games as titles a bot might play. It also mentions that an AI agent could run during a live game session, and could even control a non-player character. Those are optional variations, though. The core idea is a behind-the-scenes tool that helps AI testers see more of what a game is doing.
That makes this Sony's ninth filing in the AI recommendation space we've tracked since May, joining earlier applications like voice-matching players by skill and concert streams near parked cars.
Software alone can make this work, which means the distance to a first working version is shorter than most ideas of this type. A studio would need a model that can read code, access to the game's stored source files, and a bot capable of playing through the game automatically, none of which require new hardware to build.
The document itself shows where the real work lives: the system proposes a code change, then a human engineer approves or rejects it before anything goes live. That approval step is the design, not a gap in it, and it points toward an internal assistant as the nearest practical form rather than anything running on its own.
No speed or accuracy numbers appear in the filing, so how well this holds up under real conditions is still an open question. If it works well enough to ship, players would never encounter it directly, only the quieter benefit of games arriving with fewer rough edges.
Get our take in your Top Stories
Liked this breakdown? Add Patentlyze as a preferred source on Google, and our plain-English take shows up more often in your Top Stories the next time Sony patent news breaks.
There are more where this came from
We read every patent application Big Tech publishes and send you the ones worth knowing. Plain English, free, every week.
The drawings
10 drawing sheets from US 2026/0335770 A1 · click any drawing to enlarge
Show the other 2 sheets
Want this weekly breakdown for a company we don't cover? Patentlyze Pro →
Be the first to weigh in