Project report · Bachelor's thesis in Computer Science

Preference-Guided Curriculum Discovery for Robust Reinforcement Learning

I trained a network to order game levels by difficulty from an LLM's pairwise judgments and used it to guide the training curriculum of a reinforcement learning agent. The learned ordering is informative. Whether it helps the curriculum depends on how the training loop uses it.

Author
Malik Durmus
Institution
LMU Munich, Chair of Mobile and Distributed Systems, 2026
Period
March to September 2026
Stack
Python · JAX · Flax · Optax · Hugging Face datasets · SQLite · FastAPI · Gemini on Vertex AI · Weights & Biases · Slurm · RunPod · LaTeX

The problem

Unsupervised Environment Design trains reinforcement learning agents on automatically chosen levels. The method I built on, Sampling for Learnability (SFL), scores a candidate level by p(1 − p), where p is the agent's success rate on it, and trains on the levels the agent solves about half of the time. At the start of training the agent fails almost everywhere, the score is zero for most levels, and the curriculum falls back to random sampling. I call this phase the cold start.

The thesis asks whether a difficulty ordering of the levels, learned before training from a large language model's comparisons of rendered levels, can supply the missing selection signal, and how it compares with making the empirical score itself denser.

How it works

Blue parts are what I added; black parts are the standard SFL training loop. Offline, an LLM compares pairs of rendered levels, a CNN ensemble is trained on these preferences, and its scores are turned into a difficulty percentile c between 0 and 1. Online, every buffer refresh scores candidate levels by the agent's learnability ℓ = p(1 − p), combines ℓ with c and a difficulty target μ that moves with the agent's success rate, and keeps the top-K levels for training.

What I built

Preference-labeling pipeline

Batch annotation of rendered level pairs with Gemini 3.5 Flash on Vertex AI: four datasets of about 22,000 pairwise difficulty judgments each, roughly 88,000 in total, with SQLite bookkeeping and compilation to Hugging Face datasets. A FastAPI tool for the human validation set of 690 pairs.

LLM agrees with the human annotator on 86% of decisive pairs

Difficulty model

A residual CNN in JAX/Flax trained with the Bradley–Terry pairwise loss, symmetry augmentation, five-member ensembles, and a rank-based normalization against a frozen reference sample, which makes scores from a pairwise-trained model usable as a target.

held-out pairwise accuracy 0.90 (JaxNav), about 0.80 (XLand-MiniGrid)

Curriculum integration

Extended the SFL codebase with a difficulty target that moves with the agent, four rules that combine the learned score with the empirical one, three controllers for the target, three dense learnability scores, a shortest-path heuristic, and a generator restricted to solvable levels. Ported the loop to XLand-MiniGrid.

about 200 training runs of 3·10⁸ environment steps

Evaluation and reproducibility

Ten paired seeds per method with exact Wilcoxon tests and Holm correction, a worst-case evaluation over 10,000 levels per policy, a measurement study of the cold start itself, and a scripted pipeline that regenerates every figure and result table of the thesis from the logged runs.

one command rebuilds all figures and tables

What the thesis shows

The network is informative. It reproduces the annotator's ordering on unseen pairs with up to 90% accuracy, the annotator agrees with a human on 86% of decisive pairs, and a curriculum guided by the learned ordering alone ends above one guided by a shortest-path heuristic.

Its value depends on how the loop uses it. The ordering places hard and unsolvable levels at the same end. With the original controller the difficulty target rises to its maximum, and the prior then pulls unsolvable levels into training. When the generator produces only solvable levels, the additive combination of the two scores is significantly better than SFL.

0.900.920.94 0.960.981.00 win rate on the 100-level evaluation set, final five cycles Standard SFL Linear Addition Soft Handoff Learnability-Weighted Multiplicative Filter Prior-Only (model alone) Uniform sampling (DR)
JaxNav with the unfiltered generator, ten paired seeds per rule: mean final win rate with one standard deviation. No rule improves on standard SFL; Linear Addition and Soft Handoff are not significantly different from it. Axis starts at 0.90.
GeneratorStandard SFLLinear AdditionPaired result
All levels0.9800.977not significant (3 of 10 seeds ahead)
Solvable levels only0.9860.991significantly better (9 of 10 seeds, p = 0.027)

Findings in detail

What I took from it

The project was an exercise in running an empirical study end to end: fixing the comparisons before running them, keeping every number traceable to a run or a file, and following a negative headline result down to its cause. The most useful step was the ablation on solvable levels, which turned "the prior does not help" into a statement about when it does.

Code: preference annotation and difficulty-model training (uedrlhf) and SFL extensions (built on sampling-for-learnability). The thesis PDF is available on request. Language models were used for language refinement and coding assistance, as stated in the thesis.