Putting the AI in ApplIed Urban Modelling

A Complete Model of Brighton and Hove’s Secondary School System in Five Months

Prof Adam Dennett FRGS FAcSS

Bartlett Centre for Advanced Spatial Analysis, UCL

Friday 16 October 2026

Background

Who I am, and why this talk

  • Professor of Urban Analytics at UCL’s Centre for Advanced Spatial Analysis. I build spatial models — of migration, of housing, of how people move around cities.
  • Also a parent in Brighton & Hove, and one of hundreds of families drawn into a two-year public debate about secondary school admissions.
  • I spent two years analysing the drivers of secondary attainment in England, published as How to Pull the Right Lever.

What I found: the council’s policies were unlikely to improve attainment; the costs — longer journeys, community schooling breaking up — were not weighed against them; and absence, the single largest factor, was not part of the decision at all.

A misalignment runs through the whole episode, between the council’s stated aims (improving disadvantaged attainment), its stated problems (falling rolls, school viability) and the policies actually chosen (admission priorities, catchment boundaries, PAN cuts) — with little attention paid to how those interact, or to what they cost elsewhere in the system.

Problems in the Brighton and Hove school system

  • Some children have no secondary school near their home
  • Declining pupil numbers with some schools affected more than others
  • Policies promoting “choice” funnelling children away from peripheral schools already struggling for numbers
  • Lots of engaged Parents, Schools, Councillors and Pressure Groups but a poor general understanding - Collective Intelligence - about how the whole system operates or how we might fix it to solve the interconnected challenges of attainment, absence, access and viability
  • “Solutions” without asking the right questions

The Brighton and Hove Secondary School System

Figure 1: Schools and Pupils in Brighton and Hove

The cohort is already falling

Income is tied to numbers - and financial reserves are running out

School Allocations and Viability

The city placed 1,900 children in 2010 and 2,250 in 2026. Over the same years Longhill fell from 239 to 81, and Hove Park from 308 to 136. Now the pupil roll is declining, serious problems ahead

An AI4CI problem, if ever there was one

  • The UKRI National AI Research Hub for Collective Intelligence - 5-year, £12m EPSRC Project - asks what AI can do to enhance the thinking groups of people do together and the solutions they can arrive at.

  • Can AI help us develop a shared, inspectable account of how the school system in Brighton and Hove actually behaves?

  • The challenge: If AI can help us get to an answer quicker - can I ask the right questions? Can this collaborative effort enhance our Collective Intelligence?

A system where everyone is well informed about a part and nobody can see the whole is not an information problem. It is a collective intelligence problem.

Why AI made this tractable

What was expensive before

  • Harmonising a dozen published sources that do not share a key
  • Building, calibrating and auditing a city-scale model
  • Re-running everything when one assumption changes
  • Writing it all down clearly enough for a non-specialist to check
  • Turning it into something a parent/school leader/councillor/council officer can actually use

What that cost collapsing buys

  • Scenarios can be tested rather than asserted
  • The work is auditable: every figure traces to code and a source
  • A stakeholder can move a slider, change a number, see a knock-on impact themselves instead of taking my word for it
  • Being wrong becomes cheap, so questions get asked that were not worth a week of someone’s time (“if we move/shrink school A, what happens to demand at school B?”)

The point is not that AI did the analysis. It is that AI made ideas scalable and testable, with a short timeline, big urban models achievable the analysis sharable and replicable — one person could build something the whole city can interrogate, argue with, and use. That is the collective intelligence bit.

The Model

What exists now

The thing Scale
A strategic analysis of the city’s school system 9,712 lines of Quarto
The model itself, plus data assembly ~7,400 lines of R
An interactive policy simulator (Shiny) ~3,000 lines
Commits across six repositories 805
  • A production-constrained spatial interaction model with a competing-destinations term, calibrated per catchment, fitted against the council’s published offer data.
  • It reproduces the September 2026 allocations with an R² of 0.95.
  • Alongside it: a technical guide auditing every model term, a private analysis repository, and three slide decks.

Questions I wanted to answer

I won’t answer these all today - but will show how they can now all be answered

  • What is causing Longhill School’s acute numbers problem - is it geography, demography, attractiveness, some combination or something else?
    • How do parents in the city choose which schools to send their children to - what makes a school attractive? What if parents chose differently?
  • Would moving Longhill and/or shrinking it:
    • Help it survive in the medium term - 2035?
    • Improve accessibility or segregation in the city?
  • How do current and previously proposed policies impact pupil displacement (students unable to attend their local school)?
  • Given how the system operates, what policy levers can be pulled to maintain a viable school system in the city, 10 years from now?

How I answered them - the model

A spatial interaction model: the same family of model used for commuting, migration and retail catchments. It predicts how many children flow from each neighbourhood to each school, given where they live, how far each school is, and how much they want to go there.

\[T_{ij} \;=\; A_i\,O_i\;\;W_j\;\;c_{ij}^{-\beta}\;\;e^{\gamma_h}\;\;C_j^{\delta}\]

Term What it is
\(T_{ij}\) children from neighbourhood \(i\) to school \(j\)
\(O_i\) children living in \(i\) — 195 neighbourhoods
\(W_j\) how attractive school \(j\) is
\(c_{ij}\) bus-and-walk journey time, \(i\) to \(j\)
\(e^{\gamma_h}\) the catchment bonus, if \(j\) is in \(i\)’s catchment
\(C_j\) how much competition \(j\) has nearby
\(A_i\) the balancing term

It is production-constrained: \(A_i\) forces every child living somewhere to end up somewhere. The model never invents or loses children — it only decides where they go.

That is what makes it useful for policy. Close a school, move one, cut its admission number, and the children do not vanish. They reappear somewhere else, and the model says where.

What the model had to learn

Three things are fitted to the council’s own published allocations, rather than assumed:

Distance decay, \(\beta = 1.7\). How steeply demand falls as a school gets further away.

The catchment pull, \(\gamma_h\). How much living inside a catchment raises the odds of choosing a school there — fitted separately for each catchment, because they do not behave alike.

Competition, \(\delta = 0.3\). Whether being surrounded by rivals helps a school or hurts it.

Living in the catchment multiplies the odds by 2.7× in Brighton Aldridge’s and 13.5× in Stringer and Varndean’s — one policy doing five times as much work in one place as another.

Fitted this way, the model reproduces the 2026 offers with an R² of 0.95.

What \(c_{ij}\) actually means

Figure 2: One neighbourhood in the Stringer/Varndean catchment to Brighton Aldridge. Walking legs orange and dashed, bus legs blue. Routed on the real timetable at 08:00.

3.0 km as the crow flies. 35 minutes, 5 legs, two buses — the 50 then 28 — and 1 change. Every one of the 2,925 origin-school pairs in the model is routed like this, on the real timetable. That is what \(c_{ij}\) is.

Attractiveness - \(W_{j}\) = Exam Scores

The council’s secondary admissions guide tells parents to look at each school’s “National Curriculum test results, public exam results” and its Ofsted reports: figures that mostly describe who a school admits.

A test the model could fail

The disadvantage layer is fitted to each school’s published disadvantaged share, so reproducing that share proves nothing. The FOI arrived weeks later with something the model had never seen: how many children each school actually admitted under each priority.

In catchment it predicts well — R² = 0.94, average error 4.1 children.

Out of catchment the total is right and the destinations are not: 95 children modelled against 99 actual, but at the wrong schools. One does nearly all of it — the model places 34 at Varndean; 6 went.

Why Varndean, and why no parameter fixes it. The council admits siblings under priority 3, above both free-school-meal tiers — 70 children at Varndean. The model has no priority 3: looked-after children, SEN and siblings cannot be told apart in zone-level flows.

So a disadvantaged child with a sibling there lands in the model’s tier 5 and in the council’s priority 3. The two numbers are not counting the same children.

I tried the obvious fixes — letting these children decay with distance on their own terms, then flattening how much a school’s reputation pulls them. Steeper decay makes the fit worse on every measure: the city-wide total was already right, so suppressing travel breaks a number that worked. Flattening attractiveness helps slightly and leaves Varndean at 31 against 5. It is a definitional gap, not a behavioural one — which is a more useful thing to know, and took an FOI, a sweep that failed, and the project’s own model guide to establish.

What the Model Says

Worked example: the simulator

  • Simulator has both pre-built scenarios I imagined plus scope to change each element.
  • Built in about two days. “what if” questions became cheap to ask multiple times

Back to the first question

“What is causing Longhill’s acute numbers problem — is it geography, demography, attractiveness, some combination or something else? Would moving and/or shrinking it help it survive, or improve anything else?”

  • The honest answer is none of them on their own.
  • Longhill is not short of children for one reason, so no single lever fixes it.
  • What the simulator lets you do is pull them one at a time, and watch them compound.
  • Today, 2026.
    • Longhill takes 90 of 210 places (modelled) (43%), 120 short.
    • A disadvantaged child travels +3.4 minutes further than everyone else.

1st Lever: families read value added

One dropdown. Families read the four-year value added measure — what a school adds once intake is accounted for — as closely as they now read the headline score. Nothing about the schools changes.

Longhill goes from 90 to 106 of 210 (50%).

The travel gap falls from +3.4 to +2.5 minutes, the city’s mean journey drops by 42 seconds, and segregation rises slightly.

2nd Lever: move it, restore its catchment

Two more controls: Longhill relocates to Elm Grove, and Whitehawk returns to the Longhill catchment it sat in before 2024.

Longhill reaches 140 of 210 (67%), and the travel gap reverses: disadvantaged children now travel 1.9 minutes less than their classmates. Segregation rises, but no child is displaced from a central catchment.

Redrawing the catchments as flow regions around the new site was also tested. It did worse — a travel gap of −1.0 against −1.9, and twice the displacement.

3rd Lever: and if it taught like BACA

The last lever is not an admissions policy. It is the school getting better — value added doubled, to roughly where Brighton Aldridge (BACA) stood over the four years to 2024/25, on a comparably disadvantaged intake.

Longhill reaches 197 of 210 — 94% full, 13 places short, 1% of children displaced city-wide.

A disadvantaged child now travels 2.2 minutes less than everyone else — a swing of 5.6 minutes. Absence is this city’s largest attainment problem, and distance is one of the few things policy can change about it.

Why this needs a simulator

Each choice is modest on its own. 7 points, then 17, then 27. None would survive a committee on its own merits. Together they take a school from 43% full to 94%.

Segregation rises, 0.117 to 0.188. That is the honest cost.

But How to Pull the Right Lever finds the attainment model disagrees about direction between disadvantaged and other pupils — so deconcentration bought with longer journeys is unlikely to help the children it is meant to.

You cannot reason about this in a committee paper. Every lever moves every other one, and you have to see each choice land.

How It Was Built

This started before April

2007-2026. Twenty years of working with spatial interaction models, in contexts from migration to retail.

October 2024. Brighton & Hove is consulting on redrawing its catchments. I write BrighonSchoolsSIM.qmd — 1,014 lines of R and Quarto. A production-constrained spatial interaction model of the city’s schools.

I call the hypothetical baseline Brightopia: where every child would go if distance were the only thing that mattered.

December 2024. I write bus_routes.qmd — 1,021 lines — setting up r5r, a GTFS feed and an OSM extract to compute real public-transport journey times to every school.

2025-2026. Months of work on the drivers of attainment in England, which fed straight into the attractiveness inputs.

Two thousand lines of spatial interaction modelling and routing, written by hand, eighteen months before any of this.

That is what the new model was built on, not instead of.

Brightopia is still in the current document, as the \(W_j = 1\) baseline the calibrated model is measured against.

Five months, in one chart

Counted, not remembered: ~250 MB of Claude Code session logs across ten sessions, plus the git history of six repositories. 1,277 instructions from me, 13,451 tool calls back, over 69 working days spread across 166 — about ten and a half actions for every sentence I typed. A snapshot; the work is still going.

Figure 3

The April–July work is a different project — a national school attainment model. The Brighton system model starts on 8 September and is finished eighteen days later.

The division of labour

What I brought

  • The working prototype — Brightopia, and the r5r routing pipeline, both written by hand in 2024
  • Twenty years of building spatial interaction models: knowing that attractiveness, distance decay and competing destinations were the terms that mattered
  • Knowledge of the school system, and of the city’s politics
  • Judgement about what is defensible to publish
  • Knowing when an answer was wrong
  • Every decision about what to do next

What Claude brought

  • Scale: a hand-built prototype turned into a calibrated, audited system
  • Data wrangling across a dozen published sources
  • Shiny, deployment, rendering, version control
  • Debugging, and the patience for it
  • Documentation written as it went
  • The willingness to redo all of it when one assumption changed

I knew what to ask for and what to examine, because I had built a smaller version of it myself. That is not a small part of why this worked.

What my instructions actually look like

Verbatim, from the logs. The counts are the tool calls that followed.

“fonts as well”

13 characters → 58 actions

“yes, build it”

13 characters → 46 actions

“yes, add Priory, Seahaven and Seaford Head as destinations”

58 characters → 68 actions

“Can you cite the sources and link to all of the data that is used in each section please then commit and push as I’m going to bed”

128 characters → 52 actions

Median instruction: 199 characters. About thirty-six words.

14–16 August: extending my own model

14 August

“All of the code we need to extend the road network is contained within the original BrighonSchoolsSIM.qmd file… We use R5R to build the network… the new thing we can do to extend the bus network down to Peacehaven is use the UK2GTFS package.”

My own file, my own method, and the specific package to go further with it.

16 August, 07:15

“The Dorothy Stringer intake is modelled as low and interpreted as bad location. However, this isn’t quite right… Stringer is low not because it is inaccessible, but because it is central and close to other schools that the model fills up more favourably. So this is a problem inherent in this model.”

The right number, reached by the wrong mechanism - correction on the interpretation.

16–18 August: what to measure, and why it holds

16 August, 21:49

“Ascribing IDACI values to modelled students going into schools in the spatial interaction model could give us a sense of the likely profile of disadvantage at each school.”

This became the entire disadvantage layer.

18 August

“No matter what ideological political thinking might hope — and this is the problem with ideology, it rarely survives coming into contact with reality — across human systems the world over, distance decay is a universal truth, whether it relates to schools, retail, migration, commuting, health care accessibility or any other human process.”

Not a fact to look up (more of a rant at Claude! 😂): knowing which seventy years of literature the city’s argument was about to collide with.

10 September: specifying the model

11:17

“Re-running the Brightopia model with \(W_j\) attractiveness set to weighted preferences and using the new \(c_{ij}\) matrix which fixed some of the travel times — where before we had some weird bus journeys where walking would have been faster — and with setting the beta value to 1.7.”

13:26, two hours later

“Can we add in a competing destinations term too, to see if that fixes the Blatch / Hove Park under/over prediction… Also, we might need a catchment term in there too.”

Between those two messages, two of the five terms in the final equation get specified — each named with the symptom it was meant to cure. None of these six prompts is a correction. They are design.

Catching Errors - In Prompts

Verbatim from the prompts. Four different kinds of wrong.

A statistic that cannot be true

“I’m not sure the ‘where that would rank’ percentage in the attainment tab table is correct for the value added drop down — every school appears to be in the 99th or 100th percentile.”

The wrong input data entirely

“The ‘system as it stands’ in the open report is incorrect. The catchment areas in that map relate to the pre-2024 consultation catchment areas.”

Geometry that could not exist

“The Stringer Varndean catchment can’t be that big and weird shaped, and the BACA catchment can’t extend down over the alternative Longhill site — this needs to be scrapped.”

History the data does not contain

“Up until last year, Whitehawk was in the Longhill catchment… so for a long time Longhill did have a large number of students from deprived areas in its catchment. I’m not sure if this is properly represented in the model?”

None of these is gibberish. Each is plausible, well-formatted and confidently presented — and each needed someone who knew either the statistics or the city. The last one needed knowledge of the city’s own history, which is in no dataset anywhere.

The workflow

Everything is Quarto. The analysis document, the technical guide, the slide decks — all .qmd, all executing live R against the same data.

The loop, many times a day:

  1. I say what I want, in two or three sentences
  2. Claude edits the source and runs it
  3. It renders, screenshots, checks the numbers
  4. It commits and pushes
  5. I read the output and react

When I asked “does the Hove Park change affect section 5.5?”, that was an answerable question — because section 5.5 is code, and code re-runs.

The document is the analysis. There is no separate “writing up” — changing the model changes the paragraph that describes it, because the paragraph is generated from the model.

Reproducibility stops being a virtue you aspire to and becomes the only way the thing can work at this speed. Hand-copied into Word, none of it would survive its own rate of change.

Git is the memory. 805 commits, each with a message explaining why.

The recursion

The interesting part is not that AI wrote code. It is the workflow loop:

  1. A model produces a result.
  2. The result goes into a document, written to be read by me/stakeholders
  3. Claude writes the commentary as it goes.
  4. Writing it plainly is what exposes the holes.
  5. A hole becomes the next question for the model.
  6. Answering it changes the model — and the document rewrites itself.
  7. Go round again.

That cycle ran perhaps two hundred times. Each turn took minutes, not weeks. That compression is the whole story.

The process is not unlike supervising a PhD student or a research assistant. The difference is that a turn of the loop takes minutes rather than weeks.

Where This Leaves Us

What I would say to a colleague

It does not replace knowing things. Every moment that mattered in this project turned on domain knowledge I had and it did not.

It does collapse the cost of trying. The scenarios I tested would each have been a week of work. Testing twenty of them was previously impossible, so I would have tested two.

It writes better documentation than I do, because it never gets bored of writing it.

It needs supervision that looks like peer review, not like proofreading.

The bottleneck moved. It is no longer implementation. It is knowing which question is worth asking.

What about collective intelligence?

AI and expert input together have produced something that did not exist before: a working simulation of the city’s school system that anyone can open and argue with — councillors, officers, school leaders, parents.

That is necessary, and it is not sufficient. There is still a gap between knowing how the system behaves, understanding what each policy lever does to it, and arriving at something the city can live with.

Three things still stand in the way:

  • Awareness. Most people affected do not know the tool exists.
  • Buy-in. It only helps if the people who decide will use it.
  • Enough ideas. A simulator is only as good as the range of scenarios people think to put through it.

What I am asking for.

If you work in the council or a school: put a scenario through it that you think will embarrass the model. That is the most useful thing anyone can do with it.

If you are a researcher: the code, the data and the model are all open. Take it apart.

If you are a parent or a governor: use it before the next consultation, not after.

The simulator is the argument made inspectable. It does not tell the city what to do. It makes it much harder to claim a policy will do something the system cannot deliver.

Any Questions?

Backup

Open questions

  • Authorship. What is the honest way to describe this on a paper? I directed every step and verified every output — but I did not write the code.
  • Verification at speed. I can generate analysis faster than I can properly check it. That is a new kind of risk.
  • Reproducibility of the process. The code is reproducible. The conversation that produced it is not, in any meaningful sense.
  • Who else can do this? This worked because I could tell right from wrong. What happens when the person in the loop cannot?