PAPER-DIGEST · 2026-09-02

Elshamy et al.: Read the player's skill, then redraw the level itself — Fukai Reads

Dynamic difficulty adjustment / restructuring level content

TL;DR

Skill differs from person to person. The same level is a pleasant challenge for one player and a wall for another. That is why games have long let you pick a difficulty. But you are usually asked once, before you start. Improve halfway through, or get tired and start falling, and the ground under your feet stays exactly as it was.

Ahmed A. Elshamy and colleagues at the Egypt-Japan University of Science and Technology (E-JUST) built a system that infers your skill from how you are moving right now and then rewrites the terrain of the level in front of you. Not tougher enemies, not more pickups. It rearranges floors, gaps and enemy positions.

Skill classification reached 97.82% accuracy. When a rewritten chunk was put back into its level and checked end to end, 74.1% of them were still completable — a little under the 80.0% of the untouched originals. What stands out here, though, is less any single number than the shape of the thing: a part that reads the player and a part that redraws the level, wired into one line.

Introduction — who wrote it, and where

The authors are Ahmed A. Elshamy, Hazem N. Aliedin, Shehab T. Shaban, Moaaz H. Aldakar and Ahmed B. Zaky. All are at the Egypt-Japan University of Science and Technology (E-JUST) in Alexandria, Egypt; Zaky is also with the Faculty of Engineering (Shoubra) at Benha University.

It appeared in Scientific Reports, volume 16, article number 23489, published on 28 July 2026. This is a peer-reviewed, openly accessible paper (DOI: 10.1038/s41598-026-63084-z), not a manuscript parked on arXiv. Anyone can read the text and the figures through to the end. Worth stating up front.

My reason for picking it today is simple. The conversation about adjusting difficulty automatically has stayed inside the language of knobs for a long time. Tougher enemies. More spawns. Fewer health items. All of it moves numbers, and none of it moves the shape of the ground the player walks on. I wanted to see how far the other line of work — the one that edits the ground — has actually come.

Background — you can turn the knobs, but the ground stays put

A difficulty setting is offered once, before you play. The authors call this arrangement coarse and inflexible: if your form changes mid-session, there is nowhere for that change to enter the system.

Dynamic difficulty adjustment (DDA — machinery that raises and lowers difficulty automatically while you play) was the answer to that. But as the authors survey the field, most existing DDA works by tuning low-level values: enemy health, spawn rates, item availability.

The consequence, in the paper's own phrasing, is that the spatial and navigational experience stays largely unchanged regardless of the player's skill. The numbers move; the route does not. The resistance changes, the landscape does not.

Meanwhile, generating levels automatically has advanced along a separate track — PCG, procedural content generation. Here too, the authors see a gap: generation runs as a standalone process, with no inlet for conditioning on the behaviour of the player in front of it. Joining these two lines into one is what this paper sets out to do.Screenshot from LevelheadLevelhead (Butterscotch Shenanigans, 2020), a side-scroller built around making and sharing levels. Screenshot from its Steam store page.

Approach — read the run, write the work order, check the route

The stage is Super Mario Bros. More precisely, the 15 levels of that game held in the Video Game Level Corpus (VGLC), a research dataset in which a level is a grid of tiles — one character per tile for air, solid ground, coins, enemies and hazards.

To judge skill you need runs at different skill levels. The authors first trained three agents with PPO (Proximal Policy Optimization, one of the standard methods in reinforcement learning — a framework for learning, by trial and error, the actions that earn more reward). Expert: 300,000 timesteps. Normal: 100,000. Beginner: 20,000. The difference is the training budget itself.

Human play was added on top — though not natural play. These are recordings of people deliberately performing "like an expert" or "like a beginner". The 8,072 samples collected were split into three groups with k-means (a method that divides data into a chosen number of clusters), and the group with the highest mean horizontal velocity was mapped to expert, the slowest to beginner.

The classifier is XGBoost (a method that stacks many small decision trees). Its inputs are twelve numbers: velocity, distance to the goal, fall distance, whether the player is grounded, proximity to enemies, and so on. One sample is logged every five seconds of play, and each is sorted into expert, normal or beginner on the spot.

Once a verdict is in, the rewriting begins. The paper's own move here is to use a large language model (LLM) in two stages. The first stage takes a short, skill-conditioned instruction — something like "make a safe route for a beginner" — and expands it into a work order listing constraints and objectives. The second stage reads that work order and redraws the tiles of the chunk currently being played. The model used is Mistral AI's Devstral Medium, with six instructions in total, two per skill level.

A rewritten level that cannot be finished is worse than useless, so a check comes last. Passable tiles become nodes, and the moves between them — walking, falling, jumping — become edges; Dijkstra's algorithm (the classic procedure for finding shortest paths from a starting point) then confirms that a route from entrance to exit still exists. Jump height and distance are bounded by a simplified model of platformer physics.

Findings — the classifier lands, and completability nearly holds

Start with the skill classifier. Overall accuracy is 97.82%, with an F1 score (a measure that weighs both misses and false alarms) of 0.98 for all three classes. Mistakes are rare, and the ones that occur stay between neighbouring skill levels.

The clustering that produced the human labels is shakier. Its silhouette score — a measure of how cleanly data separates, where closer to 1 is cleaner — is 0.189. The authors treat this as expected: skill is not the kind of thing that splits neatly into three.

Now the rewriting. Six instructions across 15 levels gave 90 modification runs, of which 85 produced an output chunk. Put back into their levels and checked end to end, 63 of those 85 were completable — 74.1%. Checked in isolation, as a chunk on its own, 71 of 85 passed: 83.5%.

The comparison is against the untouched originals: 12 of the 15 levels passed the check, a baseline of 80.0%. The authors describe 74.1% as closely matching that figure. It is worth pausing here. This is a checker that judges one in five of Nintendo's own levels to be uncompletable. Keep that quirk of the ruler in mind when reading the numbers it produces.

Whether the levels actually changed shape by skill level was measured too, with three metrics: Leniency (rewards minus hazards), Topographical Roughness, and Action Density. Differences across the three groups were statistically significant on all three. But between normal and expert, leniency (p = 0.502705) and action density (p = 0.218674) show no difference at all. Only roughness separates them (p = 0.026319). The authors explain this by noting that the expert prompts aim at clustering hazards and roughening terrain rather than raising the total count of elements.

Where you can use this — you don't have to copy all of it

So what can a maker take home? The useful thing about this paper is that its parts come apart. You do not need the stamina to build the whole pipeline to pick something up from it.

One. Add a difficulty knob on the terrain side. If you are building a side-scrolling action game, it is worth having "widen or narrow a gap by one tile" and "shift a platform up or down one step" on hand before you reach for enemy health. The three metrics used here — leniency, roughness, action density — work as a scoring tool for your own levels. Simply counting them across your hand-made levels will show you your own habits.

Two. Always put a completability check behind the rewrite. This is the most practical part of the work. If you let a language model write levels, budget for one or two in ten outputs being broken. A shortest-path check over tiles-as-nodes and moves-as-edges transfers directly to puzzles: for a Sokoban-like, "does an arrangement remain in which the boxes can be pushed to the exit"; for a lock-and-key level, "does an order remain in which the key can still be reached".Screenshot from Super Meat BoySuper Meat Boy (Team Meat, 2010), a landmark in the lineage that builds difficulty out of the density of gaps and hazards. Screenshot from its Steam store page.

Three. Your player classification can be coarse. This study builds only three tiers — expert, normal, beginner — and that is enough to decide which direction to rewrite in. You can aim at a continuous value instead, as in the work generating just-right puzzles with a genetic algorithm, but starting at three tiers makes both the checking and the log-reading easier.

Four. Rather than labelling skill, manufacture it. The authors produced their training data by running three agents trained for different lengths of time. Instead of hand-labelling, deliberately build a bad bot. That ordering is easy to copy even in solo development with no archive of replays: before you recruit testers, make one AI that plays your game badly.

Limits — what the authors admit, and what I noticed

The authors admit a good deal. The human play is not natural play but recordings of people performing a skill level, and the expert/beginner assignment rests on a single feature: horizontal velocity. Wherever speed is not what skill looks like, that mapping breaks. The classifier's quality, they write, is likewise contingent on how representative this performed data is.

The completability check is a static, rule-based tool rather than a simulation. The authors note it can return false negatives — calling a level impassable when it is not — and that the two rates they report are therefore likely to be slight underestimates. They also list, as a limitation, that everything was evaluated on Super Mario Bros. levels alone, leaving generalisation to other platformers unverified.

What I would add starts with how to read 97.82%. Much of the training data comes from agents deliberately separated by training budget — 300,000, 100,000, 20,000 timesteps. Finding a separation you built in is not a surprising result. The safe reading is not "we can identify a wild player's skill 98% of the time" but "the signal is clean enough to drive the next stage".

One more. Nowhere in this work does a person say the result was more fun. What was measured is completability and the statistics of shape. The authors put controlled user studies on their own list of future work. And there is this: rewriting the chunk in front of the player every five seconds means the player is present at the moment the road ahead is redrawn. Whether that reads as care or as interference, nobody has measured yet.

How Fukai reads it

I want to place this work inside a broader shift in PCG: from a technology for making levels to a technology for fixing them. Rewriting one chunk of an existing level under constraints breaks less, and is easier to check, than conjuring a level from a blank page. And the load-bearing member of this paper, as I read it, is not the language model but the verifier behind it. The model writes freely; Dijkstra lets only the passable through. In the vocabulary of design criticism, this is closer to automated proofreading than to automated authorship. If that is right, the part most easily transplanted into puzzle-making is not the writing side but the passing side.

Closing

If you want to go deeper: on the same problem of matching difficulty automatically, McConnell and Zhao's genetic-algorithm puzzle generation reaches the target through search alone, with no skill estimate in the loop. Reading the two side by side as contrasting designs makes the map of this field easier to see.

Ponnock and Ho's study of Mario 1-1, which measured the effect of the order levels come in, and Gao and Dubé's classifier, which gives player-submitted levels a machine first read, sit on the same shelf of "what to do with a level". This paper's full text is free to read at Scientific Reports; even just looking at the figures conveys the before-and-after of a rewrite.

Sources

Papers and materials referenced in this article:

Adaptive level modification via player skill classification and large language models (Elshamy, Aliedin, Shaban, Aldakar & Zaky, 2026, Scientific Reports 16, 23489)

DOI: 10.1038/s41598-026-63084-z

・Dataset used: The Video Game Level Corpus (VGLC)

Reactions (no login)

Anonymous • one of each per visitor per day

Part of these series

Paper DigestEpisode 74 of 74

Read next

Related reviews