Paper deep dive
Learning Long-Term Educational Investment Policies under Residential Sorting
Honglei Guo, Shuo Chen, Mingjie Bi, Zeyang Sun, Xiaoxi Wang, Yuhan Zhao
Intelligence
Status: succeeded | Model: Gemma-4-26B-A4B | Prompt: intel-v1 | Confidence: 90%
Last extracted: 8/10/2026, 1:57:31 AM
Summary
This paper proposes a dynamic multi-agent framework to optimize long-term public-school investment policies under residential sorting. The model links government investment, household sorting, housing prices, population turnover, and school quality. A government planner uses reinforcement learning (RL) to determine budget allocation policies that balance educational access and equity. Simulations demonstrate that the RL-based policy achieves high access levels and low socioeconomic stratification compared to baselines.
Entities (6)
Relation Signals (6)
Dynamic Multi-Agent Framework → uses → Reinforcement Learning (RL)
confidence 95% · A government planner uses reinforcement learning (RL) to identify multiyear allocation policies... We address this gap with a dynamic multi-agent framework
RL-based Policy → achieves → Educational Access
confidence 90% · our RL-based policy attains the highest access level (0.4780)... demonstrating a favorable effectiveness–equity balance
Government Investment → affects → School Quality
confidence 90% · Government investment changes school quality; school quality affects household residential and school choices
School Quality → influences → Household Sorting
confidence 90% · school quality affects household residential and school choices
Household Sorting → influences → Housing Prices
confidence 90% · household choices change housing prices, student enrollment, and the demographic composition of schools
RL-based Policy → reduces → Socioeconomic Stratification
confidence 85% · The results also indicate reduced socioeconomic stratification in educational access.
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Allocating public-school investment effectively and fairly is difficult when school access depends on residence. School improvements can raise nearby housing demand and prices, reshape enrollment, and potentially limit access for lower-income households. These effects evolve as residential sorting changes school composition, quality, and future investment needs. Existing approaches often study school funding, household choice, and housing markets separately, while static models can miss their interconnected, long-term effects. We address this gap with a dynamic multi-agent framework that links government investment, household sorting, housing prices, population turnover, enrollment, and evolving school quality. A government planner uses reinforcement learning (RL) to identify multiyear allocation policies that account for household responses while balancing aggregate educational access and equity. In simulations, our RL-based policy attains the highest access level (0.4780) and second-lowest access Gini coefficient (0.0164) among representative baselines, demonstrating a favorable effectiveness-equity balance. The results also indicate reduced socioeconomic stratification in educational access. By making education-housing feedback explicit, our framework supports long-term analysis of how school investment shapes educational opportunity over time.
Tags
Links
- Source: https://arxiv.org/abs/2608.07295v1
- Canonical: https://arxiv.org/abs/2608.07295v1
Trouble viewing inline? Open PDF directly →
Full Text
102,755 characters extracted from source content.
Expand or collapse full text
Learning Long-Term Educational Investment Policies under Residential Sorting Hpnglei Guo1, Shuo Chen1, Yuhan Zhao 1 Honglei Guo 1,2, Shuo Chen 2, Mingjie Bi2, Zeyang Sun2, Xiaoxi Wang2, Yuhan Zhao2 Abstract Allocating public-school investment effectively and fairly is difficult when school access depends on residence. School improvements can raise nearby housing demand and prices, reshape enrollment, and potentially limit access for lower-income households. These effects evolve as residential sorting changes school composition, quality, and future investment needs. Existing approaches often study school funding, household choice, and housing markets separately, while static models can miss their interconnected, long-term effects. We address this gap with a dynamic multi-agent framework that links government investment, household sorting, housing prices, population turnover, enrollment, and evolving school quality. A government planner uses reinforcement learning (RL) to identify multiyear allocation policies that account for household responses while balancing aggregate educational access and equity. In simulations, our RL-based policy attains the highest access level (0.4780) and second-lowest access Gini coefficient (0.0164) among representative baselines, demonstrating a favorable effectiveness–equity balance. The results also indicate reduced socioeconomic stratification in educational access. By making education–housing feedback explicit, our framework supports long-term analysis of how school investment shapes educational opportunity over time. Introduction Figure 1: Overview of the multi-agent resource allocation framework. Government resource allocation affects school access indirectly through household sorting, housing-market adjustment, enrollment, and school-quality dynamics. These interactions jointly determine the next-period state, and the government uses reinforcement learning to learn a sequential allocation policy. Access to high-quality education is central for long-term social opportunity. However, in many public-school-dominant education systems, access to educational quality is highly impacted by residential location and school-district assignment. When high-quality schools are concentrated in particular communities, households with sufficient resources may compete for housing in these areas, while less advantaged households may face limited access to the same educational opportunities (Chetty et al. 2016; Biasi 2023; Owens 2018). This makes educational resource allocation an important but difficult social planning problem. Governments must allocate limited resources across schools or districts while balancing multiple objectives, such as reducing inequality in access and maintaining efficient resource use. In this work, we operationalize these educational resources as government investment at the school level, which represents policy inputs that can improve school quality, such as teacher development, facility improvement, and other forms of school-level support. The difficulty of educational investment is that its effect does not stop at the school receiving the resource. It propagates through a dynamic social loop. Government investment changes school quality; school quality affects household residential and school choices; household choices change housing prices, student enrollment, and the demographic composition of schools; these changes then reshape inequality, school demand, and future allocation needs. Planning within this loop is challenging for several reasons. When residential location determines school access, educational investment becomes coupled with the housing market, so improvements in school quality may also change local housing demand and prices. Household responses are also heterogeneous because families differ in income and preferences, leading the same investment to affect access differently across groups. Moreover, the effects of investment unfold gradually and can persist across multiple periods. These mechanisms interact simultaneously, meaning that the outcome of an allocation decision depends not only on the government’s action but also on the endogenous responses of households, schools, and housing markets. Prior work has examined important parts of this system. For example, Barseghyan et al. (2019) studied household behavior model with a focus on peer preferences in public school choice; Abdulkadiroğlu and Sönmez (2003) approached the school choice problem via mechanism design; Black (1999) and Caetano (2019) investigated the relationship between school quality and housing prices; while Monarrez (2023) and Owens et al. (2016) focused on educational inequality and segregation. These studies characterize important links in the social loop, but they typically examine them separately rather than as part of a unified dynamic resource-allocation problem. This leaves open how a government should allocate resources when school quality, residential sorting, housing prices, enrollment, and educational access co-evolve over time. To address this gap, we propose a dynamic multi-agent framework for educational investment allocation. As illustrated in Figure 1, the framework models households and government as interacting agents, while representing schools, the housing market, and demographic change as key environment components. Households differ in socioeconomic characteristics and preferences, choose residential locations under housing and educational constraints, and generate evolving enrollment patterns. Schools receive government investment and update their educational quality over time. The government observes the evolving system and allocates limited investment across schools while balancing multiple objectives. Building on this framework, we formulate government allocation as a sequential decision-making problem and use reinforcement learning (RL) to learn allocation policies. We use simulations to compare different allocation strategies and examine their effects on educational access, resource efficiency, residential and school segregation, and inequality over time. We further conduct sensitivity analyses to study how key factors, including household preferences and school educational performance, shape policy outcomes. Our contributions are as follows: • We develop a multi-agent computational framework that captures the dynamic education–housing feedback loop, linking government investment, school quality, household sorting, enrollment, and educational access. • We characterize household sorting through a convex program and develop efficient algorithms for computing the resulting equilibrium. • We develop an RL-based allocation approach that enables a government planner to learn multi-objective investment policies under delayed effects and endogenous household responses. • We conduct comprehensive simulations based on the framework and conduct social impact analysis to show that our RL-based policy achieves a favorable balance between efficiency and equity by reducing disparities in school quality while preserving socioeconomic matching. Related Work School Access and Household Sorting. School-choice research studies assignment mechanisms and how preferences for school effectiveness and peer composition shape enrollment (Abdulkadiroğlu and Sönmez 2003; Abdulkadiroğlu et al. 2020; Barseghyan et al. 2019). A related structural literature models residential sorting as an equilibrium outcome of heterogeneous household preferences and endogenous housing prices. Epple and Sieg (1999) estimate equilibrium sorting across local jurisdictions, while Bayer et al. (2004) integrate heterogeneous discrete residential choice with urban housing-market equilibrium. Bayer et al. (2007) extend this framework to estimate preferences for schools and neighborhood attributes. Empirical evidence further shows that school quality is capitalized into housing prices and that school districts and attendance boundaries affect residential and school segregation (Black 1999; Caetano 2019; Turnbull and Zheng 2021; Owens 2017; Owens et al. 2016; Monarrez 2023). More integrated equilibrium models connect community composition, school spending, housing, peer effects, and migration (Fernández and Rogerson 1996; Nechyba 1999). Recent spatial and agent-based models represent additional feedback between residential and school choices (Agostinelli et al. 2024; Dignum et al. 2022, 2024). Our framework builds directly on the equilibrium-sorting literature but embeds household sorting within a dynamic system in which government investment changes school quality, housing demand, enrollment, and future allocation needs. School Investment and Resource Planning. Causal evidence from school-finance reforms shows that sustained spending can improve educational and long-term economic outcomes, often with larger benefits for disadvantaged students and effects that emerge gradually (Jackson et al. 2016; Lafortune et al. 2018; Biasi 2023; Jackson and Mackevicius 2024). Dynamic general-equilibrium analysis has also examined the long-run distributional and welfare consequences of school-finance reform (Fernández and Rogerson 1998). Computational work addresses different planning decisions. Mayerle et al. (2022) jointly match students, schools, teachers, classes, and classrooms, while attendance-boundary optimization balances integration, travel, and enrollment constraints (Gillani et al. 2023). Guan et al. (2025) incorporate predicted school choices into stochastic rezoning optimization, and Zhang et al. (2026) use deep RL for multistep school-district adjustment. These methods optimize finance reform, resource matching, or geographic assignment. Our planner instead allocates a recurring school-level investment budget and evaluates effectiveness and fairness after endogenous changes in quality, residential sorting, housing prices, and enrollment. Closest Comparisons. Three recent studies are especially close to ours. Agostinelli et al. (2024) jointly model housing, school access, and heterogeneous residential sorting, but evaluate school-choice expansion and housing vouchers rather than repeated school investment. Guan et al. (2025) use predicted household school choices to inform a segregation-oriented boundary redesign, whereas our household response operates through a housing-market sorting equilibrium after each investment decision. Zhang et al. (2026) also use RL for multistep school planning, but their actions modify district boundaries and their objectives concern distance and utilization. Our RL planner allocates investment and evaluates the long-term distribution of accessed school quality. The main distinction is the combination of sequential investment, endogenous education–housing feedback, and an explicit effectiveness–equity objective. Agent Models and Environment Components The model is built around an institutional feature of public education: residential location determines school access. When government investment improves a school, it may also increase nearby housing demand and the price of entering that district. The same policy can therefore raise school quality while changing which households can access it. We capture this feedback through two decision-making agents, households and the government, and three environment components: communities and housing markets, population turnover, and schools. Setting and Notation. We study a region with M residential communities and K public schools over periods t=0,…,Tt=0,…,T. A fixed district map :1,…,M→1,…,KD:\1,…,M\→\1,…,K\ identifies the school serving each community. Thus, moving to community m provides access to school (m)D(m). Community m has a fixed amenity value QmQ_m, housing capacity CmC_m, current vacancies VmtV_m^t, and housing price PmtP_m^t. These quantities distinguish school access from other neighborhood amenities and housing costs. School k has quality rktr_k^t, and t=(r1t,…,rKt)r^t=(r_1^t,…,r_K^t) denotes the regional school quality profile. Housing capacity limits immediate access to desirable schools. Instead, households compete for units released through turnover, and prices mediate this competition. Household Model. A household’s residential choice depends on its types/characteristics (e.g., income, parental education, child performance) and stage in the school life cycle. We describe household i by a state tuple sit=(θi,cit,mit),θi=(yi,zi,ei)∈Θ.s_i^t=( _i,c_i^t,m_i^t), _i=(y_i,z_i,e_i)∈ . (1) Here, θi _i denotes the type vector, which includes income yiy_i, parental education ziz_i, and the child’s persistent latent ability eie_i. citc_i^t is the child’s age, and mitm_i^t is the current community. Household types follow a finite distribution pθ∈Θ\p_θ\_θ∈ estimated from China Education Panel Survey data (National Survey Research Center 2015). Households consider school access only when a child enters school. Children below age six occupy housing but are not yet enrolled. At age six, household i joins the entry cohort ℐt=i:cit=6I^t=\i:c_i^t=6\ and may stay or move. Once enrolled, the household remains in its chosen community for W school periods. Thus, only part of the population can respond to a new allocation in any period. For a school-entry household, action aita_i^t selects a community, including the option to remain in mitm_i^t. The choice trades off school quality, housing cost, moving cost D, and neighborhood amenities, captured by the utility uimt:=uit(ait=m)=αir(m)t+ηQm−[βiPmt+D](m≠mit)⏟u¯imt+εimt. split&u_im^t:=u_i^t(a_i^t=m)\\ &= _ir_D(m)^t+η Q_m- [ _iP_m^t+D ]1(m≠ m_i^t)_ u_im^t+ _im^t. split (2) The housing price and moving cost apply only to movers because an incumbent retains its current unit. The shocks εimt∼Gumbel(0,τ) _im^t (0,τ) models unobserved household-specific considerations and are independent across households, communities, and periods. Detailed specifications of parameters and utility design are provided in Appendix A.1. New households entering the region provide a second source of housing demand. Let tJ^t denote these preschool-age in-migrants. They do not yet make a school-entry decision, so their current utility depends on amenities and housing prices: vimt:=vit(ait=m)=ηQm−βiPmt⏟v¯imt+εimin,t.v_im^t:=v_i^t(a_i^t=m)= η Q_m- _iP_m^t_ v_im^t+ _im^in,t. (3) Their shocks satisfy the same independence and distributional assumptions as those in (2). In-migrants compete for vacant units and therefore affect the prices faced by ℐtI^t. They may reconsider their residential locations when their children later enter school. Population Turnover. At the start of period t, turnover from the preceding period has formed the resident population ℋtH^t, released vacancies, and identified ℐtI^t and tJ^t. Eligible non-school-age households may depart, and new preschool-age households are drawn from pθp_θ. Each departure releases one unit in the household’s community, so vacancies arise through turnover rather than being reset exogenously. The population module maintains ∑i∈ℋt(mit=m)≤Cm _i ^t1(m_i^t=m)≤ C_m and scales in-migration so that expected new demand does not exceed aggregate vacancies. This makes residential composition slow-moving and prevents a policy from immediately reshuffling all students after quality changes. Appendix A.2 provides the transition details. School Model. Schools are modeled as education-production components. They take government allocation and household choices as input and generate education performance measured by school qualities. Let ℒktL_k^t be the children enrolled in school k after period-t sorting, and let Nkt=|ℒkt|N_k^t=|L_k^t|. The mean ability of enrolled children is Skt=1Nkt∑i∈ℒktei.S_k^t= 1N_k^t _i _k^te_i. (4) Thus, peer composition changes endogenously as households select across communities. Given per-student investment hkth_k^t, school quality updates after sorting according to rkt+1=(1−δ)rkt+δ[wvgv(hkt)+wsSkt].r_k^t+1=(1-δ)r_k^t+δ [w_vg_v(h_k^t)+w_sS_k^t ]. (5) The persistence parameter δ reflects gradual change in school conditions. The increasing, concave function gvg_v captures diminishing returns to investment, while wvw_v and wsw_s weight resources and peer composition. We normalize rkt∈(0,1]r_k^t∈(0,1] and Skt,gv(hkt)∈[0,1]S_k^t,g_v(h_k^t)∈[0,1], and set wv+ws=1w_v+w_s=1, so rktr_k^t is a comparable quality index. For a child living in community mitm_i^t, we denote current accessed quality as ρit=r(mit)t _i^t=r_D(m_i^t)^t. We also define the child learning-outcome index by oit=ρiteiψ.o_i^t= _i^te_i^ψ. (6) This index combines accessed quality with persistent ability, which can be used to measure a child’s received educational benefit. The exponent ψ controls how persistent ability enters the learning-outcome index. Government Model. The government cannot directly assign households to schools. Its policy instrument is an annual budget BtB_t divided among the K schools. Define the allocation simplex as ΔK=∈ℝ+K:∑k=1Kbk=1 _K=\b _+^K: _k=1^Kb_k=1\. The government chooses shares t∈ΔKb^t∈ _K, so school k receives total funding gkt=bktBtg_k^t=b_k^tB_t. After enrollment, per-student investment is hkt=gkt/Nkth_k^t=g_k^t/N_k^t. It is clear that ∑k=1Kgkt=Bt _k=1^Kg_k^t=B_t. The central difficulty to determine the budget share is temporal. Current investment changes future school quality, future school quality changes residential demand, and residential choices changes who benefits from subsequent investment. We formalize this sequence and the government’s objective in the next section. Multi-Agent Learning Framework The components above interact once in every simulated period. Turnover at the end of period t−1t-1 creates the start-of-period population and housing state at t. The feedback is illustrated in Figure 1. We describe this interaction as a dynamic leader–follower framework with lagged household response. The decision process can be divided into two levels. In the lower level, households compete for available residential spots given school quality tr^t, which leads to a sorting equilibrium. In the upper level, the government anticipates the sorting equilibrium and determine the budget allocation tb_t, which changes the quality observed by households in later periods. Lower-Level Household Sorting Logit Demand. Only communities with vacancies can accept a mover. Let ℳt=m:Vmt>0M^t=\m:V_m^t>0\. A school-entry household chooses between staying and moving, with feasible set it=mit∪ℳtA_i^t=\m_i^t\ ^t; an in-migrant must choose from ℳtM^t. Given t=(P1t,…,PMt)P^t=(P_1^t,…,P_M^t) and school quality tr^t, the Gumbel shocks in (2)–(3) imply (See Appendix B.1) σimt(t;t) _im^t(P^t;r^t) =exp(u¯imt/τ)∑m′∈itexp(u¯im′t/τ), = ( u_im^t/τ) _m _i^t ( u_im ^t/τ), (7) μimt(t) _im^t(P^t) =exp(v¯imt/τ)∑m′∈ℳtexp(v¯im′t/τ). = ( v_im^t/τ) _m ^t ( v_im ^t/τ). (8) These probabilities describe utility-maximizing choices under independent unobserved preferences. Summing them gives expected fresh demand for vacant units in community m: Dmt(t;t)=∑i∈ℐtm≠mitσimt(t;t)+∑i∈tμimt(t). splitD_m^t(P^t;r^t)=& _ subarrayci ^t\\ m≠ m_i^t subarray _im^t(P^t;r^t)+ _i ^t _im^t(P^t). split (9) The first term is demand from school-entry movers; the second is demand from in-migrants. Households that stay do not consume vacancies. Market Clearing. We make the following assumption. Assumption 1 (Slack supply and price floor). In every period, expected fresh demand does not exceed aggregate vacancies, ∑mDmt≤∑mVmt _mD_m^t≤ _mV_m^t. Moreover, housing prices satisfy Pmt≥Pmin>0P_m^t≥ P_ >0. The first condition allows the region to contain vacant units even when particular districts are contested. The second gives housing a minimum reservation value. Communities with excess capacity remain at the price floor, while contested communities get a price premium until expected demand matches vacancies. Thus, the clearing condition becomes a complementarity system: for each m∈ℳtm ^t, we have Dmt(t;t)≤Vmt,Pmt≥Pmin,(Pmt−Pmin)[Vmt−Dmt(t;t)]=0. splitD_m^t(P^t;r^t)≤ V_m^t, P_m^t≥ P_ ,\\ (P_m^t-P_ )[V_m^t-D_m^t(P^t;r^t)]=0. split (10) A sorting equilibrium is a triple (t⋆,t⋆,t⋆)(P^t , σ^t , μ^t ) in which both household groups choose according to (7)–(8) at prevailing prices and expected demand satisfies (10). Prices summarize competition from other households; once prices are fixed, the logit probabilities determine choice behavior. This equilibrium is central to the social-impact question because it captures whether school improvements are capitalized into housing prices that limit access. We provide a convex-program characterization and Algorithm 1 to efficiently compute the equilibrium in Appendix B.2. After obtaining the equilibrium, a capacity-feasible realization procedure then maps these probabilities to discrete residential assignments (See Appendix B.4). Upper-Level Allocation Government Objective. The government rewards both the aggregate level and the distribution of publicly supplied school quality. Let ρit,+=r(mit)t+1 _i^t,+=r_D(m_i^t)^t+1 be the end-of-period quality accessible to a child enrolled after period-t sorting. For every household i∈ℒt:=⋃kℒkti ^t:= _kL_k^t, we define ϵ(t,+)=(1|ℒt|∑i∈ℒt(ρit,+)1−ϵ)1/(1−ϵ),ϵ≥0.W_ε( ρ^t,+)= ( 1|L^t| _i ^t( _i^t,+)^1-ε )^1/(1-ε), ε≥ 0. (11) At ϵ=0ε=0, the objective is average accessed quality, which represents aggregate effectiveness under the fixed annual budget. Larger ϵε gives more priority to children with lower access, and the limit as ϵ→∞ε→∞ is maximin access. Parameter ϵε therefore makes the effectiveness–equity judgment explicit. For the special case where ϵ=1ε=1, we use the continuous geometric mean extension. Access is the primary welfare basis because it represents the school quality supplied through public policy. Across the horizon, the government seeks an observation-based policy π that maximizes π[∑t=0T−1γtϵ(t,+)−λ‖t−t−1∥22],E_π [ _t=0^T-1γ^t \W_ε( ρ^t,+)-λ\|b^t-b^t-1\|_2^2 \ ], (12) with −1b_-1 properly initialized. The optimization is subject to population turnover, household sorting, school-quality transitions, and the annual budget. Discount factor γ controls the weight on future cohorts, and λ≥0λ≥ 0 discourages abrupt changes in allocation shares. Remark. Access is the primary welfare basis because it represents the school quality supplied through public policy. The government does not optimize to^t directly because this index reflects persistent child ability, which is more appropriate to be used as a measure of educational outcomes. Learning Allocation Policy. The government’s problem is sequential and we represent it as a partially observable Markov decision process (POMDP). The full state xt∈x^t contains the household-level population and the variables required for the transition to be Markov. The government receives only a summarized observation qt=(xt)=[t,(occmtCm)m=1M,¯t,¯t,t],q^t=O(x^t)= [r^t, ( occ_m^tC_m )_m=1^M, y^t, e^t, χ^t ], (13) where occmtocc_m^t is community occupancy, ¯t y^t and ¯t e^t are community-level mean income and ability, and t χ^t summarizes the entry group. The action is t∈ΔKb^t∈ _K. We parameterize the observation-based policy as t∼πϕ(⋅∣qt)=Dirichlet(ϕ(qt)),b^t _φ(· q^t)=Dirichlet\! ( κ_φ(q_t) ), (14) so every sampled allocation satisfies the annual budget constraint. After each action, the environment computes sorting, enrollment, the school transition, welfare, and turnover. The one-period reward is the corresponding term in (12). We use PPO (Schulman et al. 2017) to learn a policy over full trajectories. Household sorting is solved within each environment step rather than learned by the government. Appendix C provides POMDP characterization and the training algorithm. Simulations and Experiments Setup. We initialize the environment with 4 schools and 12 communities, and the corresponding school districts are shown in Figure 2. Each community has 100 residential positions. Household profiles, including income, educational level, child ability, are sampled from the CEPS data. Their utility coefficients are computed based on sampled profiles. The data preprocessing and parameter calibration are provided in Appendix D.1. Figure 2: Initial environment settings. 12 communities (C1–C12) with amenity QmQ_m are allocated to 4 school (Sch1-Sch4) districts, distinguished by colors. Households are spatially distributed among communities and schools provide heterogeneous educational quality rkr_k. This setting serves as the basis for evaluating different allocation policies. Metrics. We propose six complementary metrics summarized in Table 1 to evaluate efficiency and equity. Mean Access (MA) and Human Capital (HC) measure overall allocation efficiency. Gini Access (GA) and Income Access Gap (IA) measure inequality in educational opportunities, while Income Dissimilarity (ID) and Income–Quality Correlation (IQ) capture socioeconomic segregation and the association between household income and school quality, respectively. Detailed definitions and implementations are provided in Appendix D.2. Metric Interpretation MA Average school quality accessed by households HC Aggregate educational outcomes GA Inequality in access to school quality IA Access gap between income groups ID Residential segregation across income groups IQ Association between household income and school quality Table 1: Summary of evaluation metrics. To evaluate the effectiveness, robustness, and scalability of our framework, we conduct four sets of experiments: (i) comparisons with representative baseline resource-allocation policies, (i) module-level ablation studies, (i) parameter sensitivity analyses, and (iv) scalability evaluations across increasing problem sizes. Comparison with Allocation Baselines We compare the PPO allocation policy with three transparent policy rules. The equal-split policy assigns the same total funding to every school; the enrollment-proportional policy allocates funding according to current enrollment, thereby equalizing per-student investment; and the compensatory policy assigns larger budget shares to lower-quality schools. Appendix D.5 provides the formal definitions and evaluation protocol. Table 2 reports long-term average performance experimented by 100 seeds. The PPO policy provides the strongest balance on the planner’s primary objectives, achieving the highest Mean Access (MA; 0.478) and the second-lowest Gini Access (GA; 0.0164). The MA values are close across all policies (0.477–0.478), but the proposed policy reaches the highest access level while maintaining substantially lower inequality than equal-split and compensatory funding. Its Human Capital is also within 0.19% of the best result (106.39 versus 106.60), indicating that the improved access balance does not require a substantial loss in overall educational outcomes. Metric \ Policy Equal Enroll Prop. Compensatory PPO MA (×10−2)(× 10^-2) ↑ 47.77(0.27) 47.77(0.32) 47.78(0.36) 47.80(0.27) HC ↑ 106.59(1.58) 106.28(1.58) 106.60(1.67) 106.40(1.61) GA (×10−2)(× 10^-2) ↓ 2.29(0.21) 0.59(0.07) 1.99(0.21) 1.64(0.18) IA (×10−3)(× 10^-3) |⋅|↓|·| -5.41(1.43) 0.39(0.51) -4.51(1.16) 6.00(1.34) ID (×10−1)(× 10^-1) ↓ 1.41(0.14) 1.44(0.16) 1.39(0.14) 1.47(0.15) IQ (×10−1)(× 10^-1) |⋅|↓|·| -2.95(0.60) 0.56(0.92) -2.90(0.59) 3.99(0.66) Table 2: Long-term average performance across allocation policies. For IA and IQ, values closer to zero indicate greater equality between income groups. The income-based measures provide an important qualification. The IA remains close to zero under every policy (-0.0054–0.006), and ID also lies within a narrow range (0.139–0.147). The PPO policy therefore does not create a large income access gap, although its positive IQ (0.399) indicates that higher-income communities remain more strongly associated with higher-quality schools. Figure 3 illustrates this relationship. These findings distinguish equality in the overall distribution of school quality from equality between income groups. The proposed policy improves the former, which is directly represented in the government objective, while its advantages are more limited for the latter. This is socially important because it shows that equalizing school-quality access alone may not eliminate the residential mechanisms through which income differences persist. The framework makes this distinction visible and can support future evaluations in which income-based fairness or housing access is incorporated explicitly into policy design. Figure 3: The policy impact on (a) school-level mean household income and (b) school quality before and after policy simulations. Besides, The limited variation within each policy in Table 2 shows that the main findings are not driven by a particular simulated population. In particular, the proposed policy consistently maintains high average access and relatively low access inequality. Because the numerical differences in MA are small, these results support a stable balance between access and equality rather than a large advantage on every individual metric. Ablation Study We examine the contributions of two social mechanisms: student-composition feedback in school-quality evolution and endogenous housing-price formation. The student-composition feed mechanism affects peer composition on school quality evolution in (5) and removing it freezes SktS^t_k in every simulation periods. Removing the housing-price formation mechanism fixes housing prices and eliminates the feedback between household choices and residential sorting. Table 3 compares the model without either mechanism, with each mechanism separately, and with both mechanisms. Metric \ Mode Neither Composition only Prices only Full model MA (×10−2)(× 10^-2) ↑ 46.38 46.34 46.39 46.41 HC ↑ 111.77 111.50 111.67 111.99 GA (×10−2)(× 10^-2) ↓ 2.08 2.08 1.26 1.22 IA (×10−3)(× 10^-3) |⋅|↓|·| 0.10 0.00 0.10 0.30 ID (×10−1)(× 10^-1) ↓ 0.67 0.64 1.38 1.39 IQ (×10−1)(× 10^-1) |⋅|↓|·| 0.05 0.05 -0.06 0.13 Table 3: Performance under different ablation settings. Bold indicates the best value. For IA and IQ, values closer to zero indicate greater equality between income groups. The full model achieves the highest MA (0.4641) and HC (111.99) and the lowest GA (0.0122). The MA values remain within a narrow range (0.4634–0.4641), so the main benefit is not a large increase in one outcome but consistent performance across access, educational outcomes, and access inequality. When housing prices are endogenous, adding student-composition feedback produces modest improvements in MA (+0.2×10−3+0.2× 10^-3), HC (+0.314+0.314), and GA (−0.4×10−3-0.4× 10^-3). This suggests that composition feedback is most useful when it operates within the complete education–housing interaction. The housing-price mechanism produces the more socially consequential change. When student-composition feedback is present, allowing prices to respond more than doubles ID (from 0.064 to 0.139), even as GA falls from 0.0208 to 0.0122. Thus, endogenous housing prices can make school-quality access more evenly distributed overall while simultaneously strengthening income sorting across locations. The apparently lower segregation obtained when prices are fixed should therefore be interpreted cautiously: it results partly from removing the channel through which demand for better schools affects residential costs. Figure 4 supports this interpretation dynamically. Housing prices respond to household demand only when endogenous price formation is included, while student-composition feedback changes how school quality evolves after households sort. Including both mechanisms enables the framework to represent an important social tension: school investment may improve overall access while its benefits remain mediated by residential markets. Figure 4: Evolution of (a) mean housing price and (b) school quality under the ablation settings. Sensitivity and Scale Analysis We first vary one parameter at a time while keeping the remaining parameters fixed. The analysis covers government inequality aversion, household preferences for school quality, sensitivity to housing prices, randomness in residential choice, and the contribution of student composition to school quality. Average access remains stable when inequality aversion, school-quality preference, and housing-price sensitivity are varied (MA: 0.5083–0.5137), while the equity measures respond more clearly. For example, increasing inequality aversion from 0 to 2 reduces GA from 0.0512 to 0.0261 without materially changing MA. This result confirms that the government objective can place greater weight on households with lower access without substantially reducing the overall access level. The remaining parameters reveal socially meaningful trade-offs. Stronger housing-price sensitivity raises access inequality while leaving average access nearly unchanged. Greater randomness in residential choice reduces ID (from 0.1253 to 0.0637) but also lowers MA (from 0.5101 to 0.4857). Increasing the contribution of student composition similarly lowers GA but produces a limited reduction in MA. Thus, the main access result is stable under several behavioral assumptions, whereas the distributional outcomes appropriately depend on how households respond to school quality and housing costs. Appendix D.3 reports all parameter settings and results. We also evaluate six environments containing 12 or 24 communities and 4, 8, or 12 schools. Increasing the number of communities has the largest effect on average access (approximately 0.477 to 0.368), indicating that maintaining educational access becomes more difficult as households are distributed across a larger residential system. Increasing the number of schools has a smaller effect on MA but a clearer effect on inequality and sorting. With 12 communities, increasing the number of schools from 4 to 12 raises GA from 0.030 to 0.084 and Income Dissimilarity from 0.145 to 0.258. These results show that expanding the number of schools does not by itself guarantee broader or more equal educational opportunity. In a residence-dependent system, a larger set of schools can create more differentiated access patterns and greater scope for household sorting. Educational planning should therefore consider the spatial distribution of households and schools together rather than treating school expansion as an independent solution. Complete results are provided in Appendix D.4. Disucssions and Conclusions In this work, we presented a dynamic multi-agent framework for allocating public-school investment under endogenous household responses. Its main contribution is to connect a tractable household-sorting equilibrium with sequential government decisions: investment changes school quality, which affects housing prices, residential sorting, enrollment, and future allocation needs. We further formulate the government problem as a POMDP and use RL to learn budget-feasible policies that balance aggregate access and equity. In simulations, the learned policy achieves the highest access level and the second-lowest access Gini among representative baselines, showing that explicitly accounting for the education–housing feedback can improve long-term allocation decisions. The PPO policy achieves a favorable balance between efficiency and equity by reducing disparities in school quality while preserving socioeconomic matching. This promotes more equitable access to schools while increasing per-student investment. Scalability experiments further show that spatial expansion poses greater challenges to accessibility, whereas increasing school quantity alone may intensify sorting and reduce equity. Overall, the proposed framework provides a computational foundation for evaluating educational investments whose effectiveness and distributional consequences evolve through household behavior over time. Several extensions provide directions for future work. The current setting focuses on public-school funding with fixed attendance boundaries and residential decisions made at school entry. This allows us to isolate the central investment–sorting feedback without incorporating every education and housing mechanism into one model. Future work could introduce student transfers and richer demographic dynamics, private or charter-school options, and additional policy instruments such as teacher allocation and boundary adjustment. Calibrating these extensions with regional data would also support location-specific policy analysis. References A. Abdulkadiroğlu, P. A. Pathak, J. Schellenberg, and C. R. Walters (2020) Do parents value school effectiveness?. American Economic Review 110 (5), p. 1502–1539. External Links: Document Cited by: School Access and Household Sorting.. A. Abdulkadiroğlu and T. Sönmez (2003) School choice: a mechanism design approach. American economic review 93 (3), p. 729–747. Cited by: Introduction, School Access and Household Sorting.. F. Agostinelli, M. Luflade, and P. Martellini (2024) On the spatial determinants of educational access. Working Paper Technical Report 32246, National Bureau of Economic Research. External Links: Document Cited by: School Access and Household Sorting., Closest Comparisons.. L. Barseghyan, D. Clark, and S. Coate (2019) Peer preferences, school competition, and the effects of public school choice. American Economic Journal: Economic Policy 11 (4), p. 124–158. Cited by: Introduction, School Access and Household Sorting.. P. Bayer, F. Ferreira, and R. McMillan (2007) A unified framework for measuring preferences for schools and neighborhoods. Journal of Political Economy 115 (4), p. 588–638. External Links: Document Cited by: School Access and Household Sorting.. P. Bayer, R. McMillan, and K. Rueben (2004) An equilibrium model of sorting in an urban housing market. Working Paper Technical Report 10865, National Bureau of Economic Research. External Links: Document Cited by: School Access and Household Sorting.. B. Biasi (2023) School finance equalization increases intergenerational mobility. Journal of Labor Economics 41 (1), p. 1–38. Cited by: Introduction, School Investment and Resource Planning.. S. E. Black (1999) Do better schools matter? parental valuation of elementary education. The quarterly journal of economics 114 (2), p. 577–599. Cited by: Introduction, School Access and Household Sorting.. G. Caetano (2019) Neighborhood sorting and the value of public school quality. Journal of Urban Economics 114, p. 103193. Cited by: Introduction, School Access and Household Sorting.. R. Chetty, N. Hendren, and L. F. Katz (2016) The effects of exposure to better neighborhoods on children: new evidence from the moving to opportunity experiment. American Economic Review 106 (4), p. 855–902. Cited by: Introduction. E. Dignum, E. Athieniti, W. Boterman, A. Flache, and M. Lees (2022) Mechanisms for increased school segregation relative to residential segregation: a model-based analysis. Computers, Environment and Urban Systems 93, p. 101772. External Links: Document Cited by: School Access and Household Sorting.. E. Dignum, W. Boterman, A. Flache, and M. Lees (2024) A data-driven agent-based model of primary school segregation in amsterdam. The Journal of Mathematical Sociology 48 (3), p. 362–392. External Links: Document Cited by: School Access and Household Sorting.. D. Epple and H. Sieg (1999) Estimating equilibrium models of local jurisdictions. Journal of Political Economy 107 (4), p. 645–681. External Links: Document Cited by: School Access and Household Sorting.. R. Fernández and R. Rogerson (1996) Income distribution, communities, and the quality of public education. The Quarterly Journal of Economics 111 (1), p. 135–164. External Links: Document Cited by: School Access and Household Sorting.. R. Fernández and R. Rogerson (1998) Public education and income distribution: a dynamic quantitative evaluation of education-finance reform. American Economic Review 88 (4), p. 813–833. Cited by: School Investment and Resource Planning.. N. Gillani, D. Beeferman, C. Vega-Pourheydarian, C. Overney, P. Van Hentenryck, and D. Roy (2023) Redrawing attendance boundaries to promote racial and ethnic diversity in elementary schools. Educational Researcher 52 (6), p. 348–364. External Links: Document Cited by: School Investment and Resource Planning.. H. Guan, N. Gillani, T. Simko, J. Mangat, and P. Van Hentenryck (2025) Contextual stochastic optimization for school desegregation policymaking. Proceedings of the AAAI Conference on Artificial Intelligence 39 (27), p. 28024–28032. External Links: Document Cited by: School Investment and Resource Planning., Closest Comparisons.. C. K. Jackson, R. C. Johnson, and C. Persico (2016) The effects of school spending on educational and economic outcomes: evidence from school finance reforms. The Quarterly Journal of Economics 131 (1), p. 157–218. External Links: Document Cited by: School Investment and Resource Planning.. C. K. Jackson and C. L. Mackevicius (2024) What impacts can we expect from school spending policy? evidence from evaluations in the united states. American Economic Journal: Applied Economics 16 (1), p. 412–446. External Links: Document Cited by: School Investment and Resource Planning.. J. Lafortune, J. Rothstein, and D. W. Schanzenbach (2018) School finance reform and the distribution of student achievement. American Economic Journal: Applied Economics 10 (2), p. 1–26. External Links: Document Cited by: School Investment and Resource Planning.. S. F. Mayerle, H. F. Rodrigues, J. N. de Figueiredo, and D. M. De Genaro Chiroli (2022) Optimal student/school/class/teacher/classroom matching to support efficient public school system resource allocation. Socio-Economic Planning Sciences 83, p. 101341. External Links: Document Cited by: School Investment and Resource Planning.. D. McFadden (1972) Conditional logit analysis of qualitative choice behavior. Cited by: §B.1. T. E. Monarrez (2023) School attendance boundaries and the segregation of public schools in the united states. American Economic Journal: Applied Economics 15 (3), p. 210–237. Cited by: Introduction, School Access and Household Sorting.. National Survey Research Center (2015) China Education Panel Survey (CEPS), 2013–2014 Baseline Survey. Note: Chinese National Survey Data Archive External Links: Link Cited by: §D.1, Household Model.. T. J. Nechyba (1999) School finance induced migration and stratification patterns: the impact of private school vouchers. Journal of Public Economic Theory 1 (1), p. 5–50. External Links: Document Cited by: School Access and Household Sorting.. A. Owens, S. F. Reardon, and C. Jencks (2016) Income segregation between schools and school districts. American Educational Research Journal 53 (4), p. 1159–1197. Cited by: Introduction, School Access and Household Sorting.. A. Owens (2017) Racial residential segregation of school-age children and adults: the role of schooling as a segregating force. RSF: The Russell Sage Foundation Journal of the Social Sciences 3 (2), p. 63–80. External Links: Document Cited by: School Access and Household Sorting.. A. Owens (2018) Income segregation between school districts and inequality in students’ achievement. Sociology of education 91 (1), p. 1–27. Cited by: Introduction. J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov (2017) Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347. Cited by: Learning Allocation Policy.. G. K. Turnbull and M. Zheng (2021) A meta-analysis of school quality capitalization in U.S. house prices. Real Estate Economics 49, p. 1120–1171. External Links: Document Cited by: School Access and Household Sorting.. D. Zhang, S. Mu, J. Mango, and X. Li (2026) Deep reinforcement learning for spatial resource allocation: a case study of school districting. Environment and Planning B: Urban Analytics and City Science 53 (2), p. 418–434. External Links: Document Cited by: School Investment and Resource Planning., Closest Comparisons.. Appendix A Model Specifications A.1 Household Parameters In Equation (2), we set αi=α(1+ξzi) _i=α(1+ξ z_i), which is increasing in parental education and measures household i’s preference for school quality. Price sensitivity is βi=β0/yi _i= _0/y_i, so an equal price increase places a greater utility burden on a lower-income household. Here, α, ξ, and β0 _0 are tunable parameters. This is the main channel from school investment to socioeconomic sorting: improved quality can increase local demand and prices, thereby limiting access for households with fewer resources. Parameter η weights fixed neighborhood amenities, and τ controls the dispersion of unobserved preferences. As τ→0τ→ 0, choices concentrate on the highest deterministic utility; larger τ gives flatter choice probabilities. All taste shocks are independent across households, alternatives, and periods. Child ability eie_i is persistent for a household throughout the simulation. A.2 Demographic Transitions The population transition from the end of period t to the start of period t+1t+1 proceeds in three steps: 1. Aging. Set cit+1=cit+1c_i^t+1=c_i^t+1 for every resident child. 2. Departures. Each eligible non-school-age household exits according to the specified departure process. Enrolled households cannot exit during the W-period schooling window. Each departure releases one unit in the household’s community. 3. In-migration. Draw incoming preschool-age household types from pθp_θ. In period t+1t+1, their locations are determined jointly with school-entry movers through the lower-level sorting equilibrium rather than assigned exogenously. At the beginning of period t+1t+1, the transition identifies the school-entry group ℐt+1I^t+1, the in-migrant group t+1J^t+1, and community vacancies t+1V^t+1. The government observes the resulting school and community summaries before selecting t+1b^t+1. In-migration is scaled so that aggregate expected fresh demand does not exceed vacancies and community capacity is preserved. A.3 School Enrollment Specifications Every school has positive enrollment at initialization. However, free competitions allow households decide to not enroll certain schools, resulting in zero enrollment. In this case, we use the last non-zero enrollment number to help government decide the investment allocation. We define ℓk(t)=maxs≤t:Nks>0 _k(t)= \s≤ t:N_k^s>0\. If Nkt=0N^t_k=0 for some school k and t>0t>0, we set the reference enrollment and composition as N~kt=Nkℓk(t),S~kt=Skℓk(t). N_k^t=N_k _k(t), S_k^t=S_k _k(t). (15) Thus, current values are used for a nonempty school, while an empty school uses its most recent nonempty data. Total funding remains gkt=bktBtg_k^t=b_k^tB^t, per-student investment is hkt=gkt/N~kth_k^t=g_k^t/ N_k^t. Appendix B Sorting-Equilibrium Characterization B.1 Logit Demand Derivation For household i, the logit demand on a community is the probability distribution of applying the softmax function to the utilities of all communities. It originates from the discrete choice theory in (McFadden 1972). We briefly introduce theory here. Suppose an agent chooses an object j from a finite set S based on the utility Uj=Vj+εjU_j=V_j+ _j, where VjV_j is a deterministic quantity and εj _j is random. The utility is defined for every object j∈Sj∈ S, and we assume that εj _j are i.i.d. for all j. The probability of the agent choosing the object i can be written as Pr(Ui>Uj,∀j)⇒Pr(Vi+εi>Vj+εj,∀j)⇒Pr(εj<εi+Vi−Vj,∀j):=Pr(i chosen).Pr(U_i>U_j,∀ j) (V_i+ _i>V_j+ _j,∀ j) ( _j< _i+V_i-V_j,∀ j):=Pr(i chosen). (16) When εj _j, j∈Sj∈ S, follows a Gumbel distribution Gumbel(0,τ)Gumbel(0,τ), its CDF and PDF are given by F(x)=e−e−x/τ,f(x)=1τe−(x/τ+e−x/τ).F(x)=e^-e^-x/τ, f(x)= 1τe^-(x/τ+e^-x/τ). Since all εj _j are independent, when i is chosen conditioned on the value of εi=t _i=t, we have Pr(i chosen)=∫−∞f(t)∏j≠iF(t+Vi−Vj)dt=∫−∞1τe−t/τe−et/τ∑je(Vj−Vi)/τt.Pr(i chosen)= _-∞^∞f(t) _j≠ iF(t+V_i-V_j)dt= _-∞^∞ 1τe^-t/τe^-e^t/τ _je^(V_j-V_i)/τdt. (17) Using a change of variable y=e−ty=e^-t, we can simplify (17) and obtain Pr(i chosen)=∫0∞e−y∑je(Vj−Vi)/τy=1∑je(Vj−Vi)/τ=eVi/τ∑jeVj/τ.Pr(i chosen)= _0^∞e^-y _je^(V_j-V_i)/τdy= 1 _je^(V_j-V_i)/τ= e^V_i/τ _je^V_j/τ. (18) Checking utilities (2)-(3) and using the result in (18), we obtain the logit demand results in (7)-(8). B.2 Convex-Program Characterization We characterize the sorting-equilibrium price vector as the solution of a convex program. Let =(Pm)m∈ℳtP=(P_m)_m ^t denotes the prices of communities with vacancies. Prices outside ℳtM^t do not enter the sorting problem. Define the potential function Φt()=∑i∈ℐtτβilog∑ℓ∈itexp(u¯iℓt()/τ)+∑i∈tτβilog∑ℓ∈ℳtexp(v¯iℓt()/τ)+∑m∈ℳtVmtPm. split ^t(P)= _i ^t τ _i _ _i^t ( u_i ^t(P)/τ )+ _i ^t τ _i _ ^t ( v_i ^t(P)/τ )+ _m ^tV_m^tP_m. split (19) The first two terms are the log-sum-exp potentials associated with school-entry households and in-migrants, respectively. The last term accounts for the available housing supply. Proposition 1 (Convex-program characterization). Under Assumption 1, suppose that τ>0τ>0 and βi>0 _i>0 for every active household. A feasible price vector t⋆P^t satisfies the market-clearing conditions in (10) if and only if t⋆∈argmin≥PminΦt().P^t ∈ _P≥ P_ 1 ^t(P). (20) A minimizer exists if ∑m∈ℳtVmt>|t|. _m ^tV_m^t>|J^t|. (21) The minimizer is unique whenever Φt ^t is strictly convex on the constraint set. In particular, a sufficient condition for strict convexity is that tJ^t is nonempty and at least one household in ℐtI^t has a feasible destination other than its current community. Proof. We first establish convexity and derive the gradient of Φt ^t. From (2) and (3), for m∈ℳtm ^t, ∂u¯iℓt()∂Pm ∂ u_i ^t(P)∂ P_m =−βi(ℓ=m)(m≠mit), =- _i1( =m)1(m≠ m_i^t), (22) ∂v¯iℓt()∂Pm ∂ v_i ^t(P)∂ P_m =−βi(ℓ=m). =- _i1( =m). (23) Thus, each deterministic utility is affine in P. Because log-sum-exp is convex and τ/βi>0τ/ _i>0, the first two terms in (19) are convex. The supply term is linear. Hence, Φt ^t is convex. Consider the contribution of household i∈ℐti ^t to the potential. Using (22) and the logit probability in (7), we obtain ∂Pm[τβilog∑ℓ∈itexp(u¯iℓt()/τ)]=τβiexp(u¯imt()/τ)∑ℓ∈itexp(u¯iℓt()/τ)−βiτ(m≠mit)=−σimt(;t)(m≠mit). split& ∂ P_m [ τ _i _ _i^t ( u_i ^t(P)/τ ) ]\\ =& τ _i ( u_im^t(P)/τ ) _ _i^t ( u_i ^t(P)/τ ) - _iτ1(m≠ m_i^t)=- _im^t(P;r^t)1(m≠ m_i^t). split (24) Similarly, for an in-migrant i∈ti ^t, equations (23) and (8) give ∂Pm[τβilog∑ℓ∈ℳtexp(v¯iℓt()/τ)]=−μimt(). ∂ P_m [ τ _i _ ^t ( v_i ^t(P)/τ ) ]=- _im^t(P). (25) Combining (24) and (25) with the derivative of the supply term yields ∂Φt()∂Pm=Vmt−∑i∈ℐtm≠mitσimt(;t)−∑i∈tμimt()=Vmt−Dmt(;t). ∂ ^t(P)∂ P_m=V_m^t- _ subarrayci ^t\\ m≠ m_i^t subarray _im^t(P;r^t)- _i ^t _im^t(P)=V_m^t-D_m^t(P;r^t). (26) Thus, the demand function in (9) arises directly from the gradient of the potential. Next, we show the equivalence between the convex program and the market-clearing conditions. Let λm≥0 _m≥ 0 be the multiplier associated with the constraint Pmin−Pm≤0P_ -P_m≤ 0. We obtain the Lagrangian ℒ(,)=Φt()+∑m∈ℳtλm(Pmin−Pm).L(P, λ)= ^t(P)+ _m ^t _m(P_ -P_m). The KKT conditions are therefore Pm P_m ≥Pmin, ≥ P_ , (27) λm _m ≥0, ≥ 0, (28) Vmt−Dmt(;t)−λm V_m^t-D_m^t(P;r^t)- _m =0, =0, (29) λm(Pm−Pmin) _m(P_m-P_ ) =0. =0. (30) Eliminating λm _m using (29) yields Dmt(;t)≤Vmt,Pm≥Pmin,(Pm−Pmin)[Vmt−Dmt(;t)]=0,D_m^t(P;r^t)≤ V_m^t, P_m≥ P_ , (P_m-P_ )[V_m^t-D_m^t(P;r^t)]=0, which are exactly the market-clearing conditions in (10). Note that the constraint set =:≥PminC=\P:P≥ P_ 1\ is a polyhedron and the Slater’s condition clearly holds. Therefore, the KKT conditions (27)-(30) are necessary and sufficient for optimality. Hence, a feasible price vector solves (20) if and only if it is a sorting-equilibrium price vector. Next, we show existence. Since the constraint set is closed but unbounded, convexity and continuity alone do not guarantee that the minimum is attained. Thus, we need to show that Φt ^t is coercive on the constraint set because a continuous coercive function can attain its minimum on a nonempty closed subset of a finite-dimensional space. That is to show Φt()⟶+∞whenever‖2⟶∞,≥Pmin. ^t(P) +∞ \|P\|_2 ∞, ≥ P_ 1. For each i∈ℐti ^t, staying in mitm_i^t is feasible, and its utility does not depend on the prices of vacant units. Therefore, we have τβilog∑ℓ∈itexp(u¯iℓt()/τ)≥u¯imittβi. τ _i _ _i^t ( u_i ^t(P)/τ )≥ u_im_i^t^t _i. (31) For each i∈ti ^t, choose k∈argminℓ∈ℳtPℓk∈ _ ^tP_ . The log-sum-exp is at least as large as any one of its terms, so τβilog∑ℓ∈ℳtexp(v¯iℓt()/τ)≥ηQkβi−Pk≥minℓ∈ℳtηQℓβi−minℓ∈ℳtPℓ. split τ _i _ ^t ( v_i ^t(P)/τ )≥ η Q_k _i-P_k≥ _ ^t η Q_ _i- _ ^tP_ . split (32) Consequently, there exists a finite constant CtC^t, independent of P, such that Φt()≥Ct+∑m∈ℳtVmtPm−|t|minm∈ℳtPm. ^t(P)≥ C^t+ _m ^tV_m^tP_m-|J^t| _m ^tP_m. (33) The lower bound in (33) diverges as prices become unbounded. To see this, let P−=minm∈ℳtPm,P+=maxm∈ℳtPm,a=∑m∈ℳtVmt−|t|>0,V¯=minm∈ℳtVmt>0.P_-= _m ^tP_m, P_+= _m ^tP_m, a= _m ^tV_m^t-|J^t|>0, V= _m ^tV_m^t>0. Then we have ∑mVmtPm−|t|P− _mV_m^tP_m-|J^t|P_- =aP−+∑mVmt(Pm−P−) =aP_-+ _mV_m^t(P_m-P_-) ≥aPmin+mina,V¯(P+−Pmin). ≥ aP_ + \a, V\(P_+-P_ ). Since the number of communities is finite and prices are bounded below by PminP_ , ‖2→∞\|P\|_2→∞ implies P+→∞P_+→∞. Hence, (33) implies Φt()→+∞ ^t(P)→+∞ as ‖2→∞\|P\|_2→∞ within the constraint set. Thus, Φt ^t is coercive. Since it is continuous and the constraint set is nonempty and closed, the convex program (20) has a minimizer. Finally, we prove the stated sufficient condition for uniqueness. For i∈ℐti ^t, define the vector of priced-move probabilities ~it()=(σimt(;t)(m≠mit))m∈ℳt. σ_i^t(P)= ( _im^t(P;r^t)1(m≠ m_i^t) )_m ^t. For i∈ti ^t, let it()=(μimt())m∈ℳt. μ_i^t(P)= ( _im^t(P) )_m ^t. Differentiating (26) again gives ∇2Φt()=∑i∈ℐtβiτ[Diag(~it)−~it(~it)⊤]+∑i∈tβiτ[Diag(it)−it(it)⊤]. split∇^2 ^t(P)= _i ^t _iτ [Diag ( σ_i^t )- σ_i^t ( σ_i^t ) ]+ _i ^t _iτ [Diag ( μ_i^t )- μ_i^t ( μ_i^t ) ]. split (34) All probabilities in the relevant choice sets are strictly positive because τ>0τ>0 and utilities are finite. For any direction ∈ℝ|ℳt|d ^|M^t|, ⊤∇2Φt()=∑i∈ℐtβiτ[∑m∈ℳtσ~imtdm2−(∑m∈ℳtσ~imtdm)2]+∑i∈tβiτ[∑m∈ℳtμimtdm2−(∑m∈ℳtμimtdm)2].d ∇^2 ^t(P)d= _i ^t _iτ [ _m ^t σ_im^td_m^2- ( _m ^t σ_im^td_m )^2 ]+ _i ^t _iτ [ _m ^t _im^td_m^2- ( _m ^t _im^td_m )^2 ]. (35) The bracketed expression for an in-migrant is the variance of dmd_m under the probability distribution it μ_i^t. For a school-entry household, it is also a variance after assigning the remaining probability 1−∑m∈ℳtσ~imt1- _m ^t σ_im^t to the staying option, whose value in the price direction is zero. Therefore, every bracketed expression is nonnegative. Suppose first that d is not constant across communities. Because every in-migrant assigns positive probability to every community in ℳtM^t, the variance in the second sum is strictly positive for any i∈ti ^t. Hence, ⊤∇2Φt()>0.d ∇^2 ^t(P)d>0. Now suppose that =cd=c1 for some c≠0c≠ 0. Let i∈ℐti ^t be a household with at least one feasible move, and define its total probability of moving by qit()=∑m∈ℳtm≠mitσimt(;t).q_i^t(P)= _ subarraycm ^t\\ m≠ m_i^t subarray _im^t(P;r^t). Because both staying and at least one moving option have positive probability, 0<qit()<1.0<q_i^t(P)<1. The contribution of this household to (35) is βiτc2qit()[1−qit()]>0. _iτc^2q_i^t(P) [1-q_i^t(P) ]>0. Thus, ⊤∇2Φt()>0for every ≠.d ∇^2 ^t(P)d>0 every d 0. The Hessian is positive definite, so Φt ^t is strictly convex. Therefore, its minimizer is unique. ∎ B.3 Projected Gradient Method For Equilibrium Computation We denote the constraint set in (20) as =:≥PminC=\P:P≥ P_ 1\. Given its simplicity, we can use projected gradient descent method to compute the minimizer of (20) (i.e., the equilibrium price vector). Projection onto this set can be computed componentwise: Π()=maxPmin,. _C(x)= \P_ 1,x\. Using (26), one projected-gradient step is (s+1)=Π((s)−ζ∇Φt((s)))=maxPmin,(s)+ζ[t((s);t)−t], splitP^(s+1)= _C (P^(s)-ζ∇ ^t(P^(s)) )= \P_ 1,P^(s)+ζ [D^t(P^(s);r^t)-V^t ] \, split (36) where ζ>0ζ>0 is the step size. The update raises the price of a community when demand exceeds its vacancies. It lowers the price when vacancies exceed demand, subject to the price floor. Define the projected-gradient residual as resζ()=1ζ[−Π(−ζ∇Φt())].res_ζ(P)= 1ζ [P- _C (P-ζ∇ ^t(P) ) ]. (37) The residual satisfies resζ()=res_ζ(P)=0 if and only if P satisfies the KKT conditions and hence the market-clearing conditions. Thus, we propose Algorithm 1 to compute the sorting equilibrium. The convergence result is established in Proposition 2 . Algorithm 1 Compute the lower-level sorting equilibrium 0: School quality tr^t, vacancies tV^t, groups ℐtI^t and tJ^t, feasible initial prices (0)P^(0), price floor PminP_ , fixed step size ζ, and tolerance εtol _ tol 1: Set s←0s← 0 2: repeat 3: for m∈ℳtm ^t do 4: Compute Dmt((s);t)D_m^t(P^(s);r^t) using (7)–(9) 5: end for 6: Update (s+1)P^(s+1) using (36) 7: Set res(s)←‖(s+1)−(s)‖∞/ζres^(s)←\|P^(s+1)-P^(s)\|_∞/ζ 8: Set s←s+1s← s+1 9: until res(s−1)≤εtolres^(s-1)≤ _ tol 10: Set t⋆←(s)P^t ^(s) 11: Compute t⋆ σ^t and t⋆ μ^t using (7)–(8) 12: return t⋆P^t , t⋆ σ^t , t⋆ μ^t Proposition 2 (Convergence of projected gradient descent). Suppose that the convex program (20) has a minimizer and that ∇Φt∇ ^t is L-Lipschitz continuous on C for some L>0L>0. Starting from any (0)∈P^(0) , let the fixed step size satisfy 0<ζ≤1L.0<ζ≤ 1L. Then the sequence generated by (36) converges to a minimizer of (20). Moreover, for any minimizer t⋆P^t and any S≥1S≥ 1, Φt((S))−Φt(t⋆)≤‖(0)−t⋆‖222ζS. ^t(P^(S))- ^t(P^t )≤ \|P^(0)-P^t \|_2^22ζ S. (38) If the minimizer is unique, then (S)⟶t⋆.P^(S) ^t . Proof. We first give an explicit Lipschitz bound for the gradient. For any nonnegative vector p satisfying q:=∑mpm≤1q:= _mp_m≤ 1 and any vector d, the Cauchy–Schwarz inequality gives (∑mpmdm)2≤(∑mpm)(∑mpmdm2)=q∑mpmdm2≤∑mpmdm2. ( _mp_md_m )^2≤ ( _mp_m ) ( _mp_md_m^2 )=q _mp_md_m^2≤ _mp_md_m^2. Therefore, 0≤⊤[Diag()−⊤]≤∑mpmdm2≤‖22.0 [Diag(p)-pp ]d≤ _mp_md_m^2≤\|d\|_2^2. For every i∈ℐti ^t, the vector ~it σ_i^t in (34) is a sub-probability vector, while for every i∈ti ^t, the vector it μ_i^t is a probability vector. Hence, every matrix appearing in (34) is positive semidefinite and has spectral norm at most one. It follows that ∥∇2Φt()∥2≤1τ(∑i∈ℐtβi+∑i∈tβi)=:L0.\|∇^2 ^t(P)\|_2≤ 1τ ( _i ^t _i+ _i ^t _i )=:L_0. Thus, ∇Φt∇ ^t is globally Lipschitz continuous. In particular, when L0>0L_0>0, one may take L=L0=1τ(∑i∈ℐtβi+∑i∈tβi).L=L_0= 1τ ( _i ^t _i+ _i ^t _i ). (39) If L0=0L_0=0, then ∇Φt∇ ^t is constant, and any L>0L>0 is a valid Lipschitz constant. Let t⋆P^t be any minimizer. Since (0)∈P^(0) and every update is a projection onto C, all iterates belong to C. The optimality condition for projection onto the closed convex set C gives, for every ∈P , ⟨(s+1)−[(s)−ζ∇Φt((s))],−(s+1)⟩≥0. ^(s+1)- [P^(s)-ζ∇ ^t(P^(s)) ],P-P^(s+1) ≥ 0. (40) Setting =t⋆P=P^t and using the identity 2⟨−,−⟩=‖−‖22−‖−‖22−‖−‖222 -b,c-a =\|b-c\|_2^2-\|a-c\|_2^2-\|a-b\|_2^2 gives ⟨∇Φt((s)),(s+1)−t⋆⟩≤12ζ[‖(s)−t⋆‖22−‖(s+1)−t⋆‖22−‖(s+1)−(s)‖22]. split ∇ ^t(P^(s)),P^(s+1)-P^t ≤ 12ζ [\|P^(s)-P^t \|_2^2-\|P^(s+1)-P^t \|_2^2-\|P^(s+1)-P^(s)\|_2^2 ]. split (41) Also by convexity, we have Φt((s))−Φt(t⋆)≤⟨∇Φt((s)),(s)−t⋆⟩. ^t(P^(s))- ^t(P^t )≤ ∇ ^t(P^(s)),P^(s)-P^t . Combining this inequality with the descent lemma yields Φt((s+1))−Φt(t⋆)≤⟨∇Φt((s)),(s+1)−t⋆⟩+L2‖(s+1)−(s)‖22. split ^t(P^(s+1))- ^t(P^t )≤ ∇ ^t(P^(s)),P^(s+1)-P^t + L2\|P^(s+1)-P^(s)\|_2^2. split (42) Combining (41) and (42) gives Φt((s+1))−Φt(t⋆)≤12ζ[‖(s)−t⋆‖22−‖(s+1)−t⋆‖22]−(12ζ−L2)‖(s+1)−(s)‖22. split ^t(P^(s+1))- ^t(P^t )≤ 12ζ [\|P^(s)-P^t \|_2^2-\|P^(s+1)-P^t \|_2^2 ]- ( 12ζ- L2 )\|P^(s+1)-P^(s)\|_2^2. split (43) Since ζ≤1/Lζ≤ 1/L, the final term is nonpositive and can be removed from the upper bound. Summing over s=0,…,S−1s=0,…,S-1 yields ∑s=0S−1[Φt((s+1))−Φt(t⋆)]≤‖(0)−t⋆‖222ζ. _s=0^S-1 [ ^t(P^(s+1))- ^t(P^t ) ]≤ \|P^(0)-P^t \|_2^22ζ. Next, we show that the objective values are nonincreasing. Setting =(s)P=P^(s) in (40) gives ⟨∇Φt((s)),(s+1)−(s)⟩≤−1ζ‖(s+1)−(s)‖22, ∇ ^t(P^(s)),P^(s+1)-P^(s) ≤- 1ζ\|P^(s+1)-P^(s)\|_2^2, which implies Φt((s+1))≤Φt((s))−(1ζ−L2)‖(s+1)−(s)‖22. ^t(P^(s+1))≤ ^t(P^(s))- ( 1ζ- L2 )\|P^(s+1)-P^(s)\|_2^2. Since ζ≤1/Lζ≤ 1/L, the coefficient is nonnegative. Thus, Φt((s))\ ^t(P^(s))\ is nonincreasing. Consequently, S[Φt((S))−Φt(t⋆)]≤∑s=0S−1[Φt((s+1))−Φt(t⋆)]≤‖(0)−t⋆‖222ζ, splitS [ ^t(P^(S))- ^t(P^t ) ]≤ _s=0^S-1 [ ^t(P^(s+1))- ^t(P^t ) ]≤ \|P^(0)-P^t \|_2^22ζ, split which proves (38). Finally, we show convergence of the iterates. Rearranging (43) gives ‖(s+1)−t⋆‖22≤‖(s)−t⋆‖22−2ζ[Φt((s+1))−Φt(t⋆)]−(1−ζL)‖(s+1)−(s)‖22.\|P^(s+1)-P^t \|_2^2≤\|P^(s)-P^t \|_2^2-2ζ [ ^t(P^(s+1))- ^t(P^t ) ]-(1-ζ L)\|P^(s+1)-P^(s)\|_2^2. Since ζ≤1/Lζ≤ 1/L and Φt()≥Φt(∗)∀∈ ^t(P)≥ ^t(P^*)\ , both subtracted terms are nonnegative and we have ‖(s+1)−t⋆‖2≤‖(s)−t⋆‖2.\|P^(s+1)-P^t \|_2≤\|P^(s)-P^t \|_2. Thus, the sequence P(s)\P^(s)\ is Fejér monotone with respect to the set of minimizers and is therefore bounded and has a convergent subsequence that belongs to C since C is closed. Moreover, by (38) we have Φt((S))⟶min∈Φt(). ^t(P^(S)) _P ^t(P). Then, the limit of any convergent subsequence converges to the minimum of Φt ^t since Φt ^t is continuous. The standard convergence theorem for Fejér-monotone sequences in finite-dimensional spaces then implies that the full sequence (s)P^(s) converges to a minimizer. If the minimizer is unique, the limit is t⋆P^t . ∎ B.4 From Equilibrium Probabilities to Assignments The sorting equilibrium (t⋆,t⋆,t⋆)(P^t , σ^t , μ^t ) specifies household choice probabilities and clears the vacancy market in expectation. We apply a capacity-feasible realization procedure to determine a discrete residential assignment for every household in each period. The enrollment and school composition are computed based on the assignment result. Throughout the procedure, the prices t⋆P^t remain fixed. Step 1: Initial Realization. Each household in group ℐI and J independently sample a tentative destination from its equilibrium probabilities: ait,0∼Categorical(σimt⋆m∈it),i∈ℐt,ajt,0∼Categorical(μjmt⋆m∈ℳt),j∈t.a_i^t,0 (\ _im^t \_m _i^t ),\ i ^t, a_j^t,0 (\ _jm^t \_m ^t ),\ j ^t. They form an assignment profile ta^t. Step 2: Local Overflow Rationing For an assignment profile ta^t, define the fresh-arrival set of community m as ℱmt(t)=i∈ℐt:ait=m,m≠mit∪j∈t:ajt=m.F_m^t(a^t)=\i ^t:a_i^t=m,\ m≠ m_i^t\∪\j ^t:a_j^t=m\. For each community m, let xmt=|ℱmt(t)|x_m^t=|F_m^t(a^t)| denote its realized fresh demand, and define its overflow by ξmt=(xmt−Vmt)+ _m^t=(x_m^t-V_m^t)^+. If ξmt=0 _m^t=0, all tentative fresh arrivals to m are accepted. If ξmt>0 _m^t>0, the procedure selects a subset ℛmt⊆ℱmt(t),|ℛmt|=ξmtR_m^t _m^t(a^t), |R_m^t|= _m^t uniformly among all subsets of this size. The selected households lose their tentative assignments and enter a pending pool. We denote the sets of displaced households as ℐ~t=(⋃mℛmt)∩ℐt,~t=(⋃mℛmt)∩t. I^t= ( _mR_m^t ) ^t, J^t= ( _mR_m^t ) ^t. After placing the households in ℱmt(t)\ℛmtF_m^t(a^t) _m^t for all m, the residual vacancies in community becomes V~mt=Vmt−|ℱmt(t)\ℛmt|. V_m^t=V_m^t-|F_m^t(a^t) _m^t|. Step 3: Reassigning Displaced Households. The procedure processes households in I~t I^t and J~t J^t in uniformly random order. For a pending household i∈I~ti∈ I^t, define the currently available community set ~it=mit∪m∈ℳt:V~mt>0 A_i^t=\m_i^t\∪\m ^t: V_m^t>0\. The household draws a new destination using its equilibrium probabilities conditioned on current availability: Pr(ait=m)=σimt⋆∑ℓ∈~itσiℓt⋆,m∈~it. (a_i^t=m)= _im^t _ ∈ A_i^t _i ^t , m∈ A_i^t. (44) If ait≠mita_i^t≠ m_i^t, the procedure decreases V~aitt V_a_i^t^t by one. If ait=mita_i^t=m_i^t, no vacancy is consumed. Thus, every displaced mover either reaches another community with available capacity or remains in its origin. Similarly, for a pending household j∈J~tj∈ J^t, define the currently available community set ℳ~jt=m∈ℳt:V~mt>0 M_j^t=\m ^t: V_m^t>0\. The household draws a new destination using its equilibrium probabilities conditioned on current availability: Pr(ajt=m)=μjmt⋆∑ℓ∈ℳ~jtμjℓt⋆,m∈ℳ~jt. (a_j^t=m)= _jm^t _ ∈ M_j^t _j ^t , m∈ M_j^t. (45) After assigning j, the procedure decreases V~ajtt V_a_j^t^t by one. Availability is recomputed before assigning the next household. The procedure satisfies capacity-feasible and discrete placement for every realization. The resulting assignment result update household locations and further determines the enrolled sets ℒktL_k^t, enrollment NktN_k^t, and peer composition SktS_k^t. Appendix C Government Decision Process and Algorithms C.1 Partially Observed Decision Process Let =⟨,ΔK,p,R,,,γ⟩G= , _K,p,R,Q,O,γ denote the government decision process. The full state xt∈x^t contains household types, ages and locations; school quality; housing occupancy and vacancies; the active groups; and the previous allocation required to evaluate the smoothing penalty. Given action tb^t, the transition kernel p(xt+1|xt,t)p(x^t+1|x^t,b^t) includes sorting, assignment, school production, and demographic turnover. The government observes qt=(xt)q^t=O(x^t) as defined in (13). In the implementation, this observation contains school quality, community occupancy relative to capacity, community mean income and ability, and entry-group features. It does not expose the full household microstate. The policy is therefore observation-based, with Dirichlet concentration parameters ϕ(qt)> κ_φ(q^t)>0. The reward is Rt=ϵ(t,+)−λ‖t−t−1‖22.R^t=W_ε( ρ^t,+)-λ\|b^t-b^t-1\|_2^2. (46) The expectation in (12) is over demographic transitions, household taste shocks and realized assignments, and stochastic policy actions. C.2 Training Procedure We summarize the complete training procedure in Algorithm 2. Algorithm 2 Dynamic system and government-policy training 0: Initial population ℋ0H^0, quality 0r^0, horizon T, budgets Bt\B^t\, and parameters γ,ϵ,λγ,ε,λ 1: Initialize policy πϕ _φ, value function VωV_ω, and −1=b^-1=0 2: for each training episode do 3: Reset the population and school qualities 4: for t=0,…,T−1t=0,…,T-1 do 5: Construct qt=(xt)q^t=O(x^t) from school and community summaries 6: Sample t∼πϕ(⋅∣qt)b^t _φ(· q^t) and set gkt=bktBtg_k^t=b_k^tB^t 7: Call Algorithm 1 using inherited quality tr^t 8: Compute enrollment NktN_k^t and composition SktS_k^t 9: Apply (15) and set hkt=gkt/N~kth_k^t=g_k^t/ N_k^t 10: Update quality to t+1r^t+1 using (5) 11: Compute t,+ ρ^t,+, t,+o^t,+, and reward (46) 12: Process turnover to form xt+1x^t+1 13: Store (qt,t,Rt,qt+1)(q^t,b^t,R^t,q^t+1) 14: end for 15: Update πϕ,Vω _φ,V_ω with PPO using discounted episode returns 16: end for 17: return Trained policy πϕ _φ Appendix D Experiment Setting D.1 Data Source We use the China Education Panel Survey (CEPS) to discipline the joint distribution of household characteristics in the simulation (National Survey Research Center 2015). The processed calibration sample contains 16,880 observations. For each observation, the calibration artifact records household income, bthe child’s ability, parental education level. Thus, the survey is not used as a static set of transitions for reinforcement learning. Instead, it determines the population distribution from which households are generated, while the state–action–next-state transitions used for policy learning are produced online by the dynamic simulator. The empirical joint probability array has dimensions 37 income levels × 5 ability levels × 9 parental-education levels. Let Y, E and LLdenote the corresponding discrete random variables. The normalized empirical frequency distribution is denoted by p^(y,e,z) p(y,e,z) and satisfies ∑y,e,z,j,ap^(y,e,z)=1. _y,e,z,j,a p(y,e,z)=1. (47) Occupation and assets are retained in the calibration artifact but do not enter the current household state. We therefore integrate out these two dimensions: pyez=Pr(Y=y,E=e,Z=z)=∑j∈∑a∈p^(y,e,z,j,a).p_yez= (Y=y,E=e,Z=z)= _j _a p(y,e,z,j,a). (48) The resulting model type space contains 37×5×9=166537× 5× 9=1665 joint income–ability–education types. Drawing types jointly from (48), rather than drawing the three characteristics from independent marginals, preserves their empirical dependence and, in particular, the income–ability sorting present in the survey. Table 4 summarizes the variables entering the model. Income has 37 observed support points ranging from 1 to 20 in the units of the processed survey variable. The five academic-performance categories are mapped to the normalized ability scores e∈0.0430, 0.1828, 0.4528, 0.7801, 0.9670.e∈\0.0430,\;0.1828,\;0.4528,\;0.7801,\;0.9670\. (49) Parental education consists, in ascending order, of no schooling, primary school, junior high school, technical secondary/vocational school, vocational high school, senior high school, junior college, university, and postgraduate education or above. These nine ordered categories are mapped linearly onto z∈0,0.125,0.25,…,1.z∈\0,0.125,0.25,…,1\. (50) Variable Symbol Support Role in the model Household income yiy_i 37 levels, [1,20][1,20] Price sensitivity βi=β0/yi _i= _0/y_i Child ability eie_i 5 normalized levels in [0,1][0,1] Peer composition and learning output Parental education ziz_i 9 ordered levels in [0,1][0,1] School-quality preference αi=α(1+ξzi) _i=α(1+ξ z_i) Table 4: CEPS variables used to construct the simulated household population. D.2 Metric Definitions This section provides the definitions of all evaluation metrics used in Section 8. These metrics quantify educational efficiency, equity, and socioeconomic sorting in the simulated education resource allocation environment. All metrics are computed based on the realized educational outcomes after household decisions and school quality evolution. Mean Access(MA): The mean educational access measures the average quality received by students: ρ¯t=1Nt∑iρit=∑k=1KNktrktNt. ρ^t= 1N^t _i _i^t= _k=1^KN_k^tr_k^tN^t. (51) Higher values indicate better average educational access. This metric is equivalent to W0(t)W_0( ρ^t). Gini Access(GA): Educational inequality is measured using the Gini coefficient of accessed quality: Gρt=∑k=1K∑ℓ=1KNktNℓt|rkt−rℓt|2(Nt)2ρ¯t.G_ρ^t= _k=1^K _ =1^KN_k^tN_ ^t|r_k^t-r_ ^t|2(N^t)^2 ρ^t. (52) The value satisfies Gρt∈[0,1]G_ρ^t∈[0,1]. A value of zero indicates that all students access the same educational quality, while larger values indicate greater inequality. When ρ¯t=0 ρ^t=0, the implementation returns zero. Income Access Gap(IA): To measure socioeconomic differences in educational access, students are ranked according to their income yiy_i. The lowest and highest income quartiles are denoted as ℐQ1tI_Q_1^t and ℐQ4tI_Q_4^t, respectively. The mean accessed quality of each quartile group is: ρ¯Qqt=4Nt∑i∈ℐQqtρit,q∈1,4. ρ_Q_q^t= 4N^t _i _Q_q^t _i^t, q∈\1,4\. (53) The income-based access gap is defined as: Δρ,yt=ρ¯Q4t−ρ¯Q1t. _ρ,y^t= ρ_Q_4^t- ρ_Q_1^t. (54) A positive value indicates that high-income students access higher-quality schools, while a value close to zero indicates similar educational access between income groups. The implementation handles discrete income types by splitting weights when a quartile boundary falls inside an income category. The metric is undefined only when no students are enrolled. Dissimilarity Income: Income segregation across schools is measured using the Duncan dissimilarity index. Let LktL_k^t and HktH_k^t denote the numbers of low- and high-income students enrolled in school k, respectively. The index is defined as: Dyt=12∑k=1K|LktLt−HktHt|.D_y^t= 12 _k=1^K | L_k^tL^t- H_k^tH^t |. (55) The index satisfies Dyt∈[0,1]D_y^t∈[0,1]. A value of zero indicates identical distributions of income groups across schools, while larger values indicate stronger income segregation. Income–Quality Correlation(IQ): To quantify the relationship between socioeconomic status and educational quality, we compute the population-weighted Pearson correlation between community income and assigned school quality. For community m, let nmtn_m^t denote the realized population, y¯mt y_m^t denote the average income, and rd(m)tr_d(m)^t denote the quality of the assigned school. The population weight is defined as: ωmt=nmt∑jnjt. _m^t= n_m^t _jn_j^t. (56) The weighted correlation coefficient is: Corryt=∑mωmt(y¯mt−μyt)(rd(m)t−μrt)∑mωmt(y¯mt−μyt)2∑mωmt(rd(m)t−μrt)2.Corr_y^t= _m _m^t( y_m^t- _y^t)(r_d(m)^t- _r^t) _m _m^t( y_m^t- _y^t)^2 _m _m^t(r_d(m)^t- _r^t)^2. (57) A positive value indicates that higher-income communities tend to access higher-quality schools, while a value close to zero indicates a weaker relationship between income and educational quality. Human Capital(HC): Following Eq. (11) of the paper, individual educational output is defined as: oit=ρiteiψ.o_i^t= _i^te_i^ψ. (58) The aggregate human capital is calculated as: Ht=∑i:ci is of school ageρiteiψ.H_t= _i:c_i is of school age _i^te_i^ψ. (59) Equivalently, when aggregated by ability type and school: Ht=∑e∑k=1KNektrkteψ.H_t= _e _k=1^KN_ek^tr_k^te^ψ. (60) A larger value indicates higher aggregate educational output. Since this is a total measure, it depends jointly on enrollment size, school quality, and the matching between student ability and educational resources. D.3 Sensitivity Analysis Experiments To examine the robustness of the proposed framework, we conduct a series of one-factor-at-a-time sensitivity analyses. In each experiment, one parameter is varied while keeping all other parameters fixed at their baseline values. The selected parameters cover different aspects of the proposed model, including government preference, household residential behavior, and school quality evolution. Specifically, we investigate the impact of the inequality-aversion parameter ϵε, the school-quality preference parameter α, the housing price sensitivity parameter β, the residential choice randomness parameter τ, and the peer-effect weight wsw_s. The sensitivity results demonstrate how these parameters influence the trade-off between educational efficiency, equity, and socioeconomic sorting. Sensitive Analysis. ϵε Analysis. The parameter ϵε controls the degree of inequality aversion in the Atkinson welfare function. Table 5 reports the sensitivity of the equilibrium outcomes with respect to ϵε. As ϵε increases, educational inequality decreases significantly. GA decreases from 0.0512 at ϵ=0ε=0 to 0.0261 at ϵ=2ε=2, while IA moves closer to zero, indicating improved equity across income groups. Meanwhile, IQ decreases from -0.5183 to values close to zero, suggesting that educational opportunities become less dependent on household socioeconomic status. However, excessively large values of ϵε provide limited additional equity benefits. When ϵε increases from 2 to 4, GA slightly increases to 0.0308 and IA becomes positive, indicating potential over-correction. In contrast, MA remains stable around 0.51 across different settings, while HC exhibits only minor fluctuations. These results suggest that moderate inequality aversion (ϵ≈1ε≈ 1–22) achieves a favorable balance between educational equity and overall performance. Metric 0 0.5 1 2 4 MA 0.5088 0.5109 0.5096 0.5101 0.5092 GA 0.0512 0.0364 0.0320 0.0261 0.0308 IA -0.0181 -0.0096 0.0007 -0.0018 0.0032 ID 0.1216 0.1229 0.1366 0.1253 0.1400 IQ -0.5183 -0.3775 0.0024 -0.0606 0.0976 HC 94.4947 96.1598 94.7289 94.6490 95.4126 Table 5: Sensitivity analysis with respect to ϵε. α Analysis. The parameter α controls the sensitivity of households to school quality differences in the residential choice process. Table 6 reports the sensitivity of equilibrium outcomes with respect to different values of α. The results show that MA remains relatively stable across different values of α (0.5083–0.5137), indicating that school-quality preference has limited impact on overall accessibility. However, it affects distributional outcomes. GA decreases from 0.0381 at α=0.25α=0.25 to 0.0213 at α=0.5α=0.5, but slightly increases for larger values, suggesting that moderate quality preference improves equity, while excessive quality-driven sorting may increase disparities. IQ exhibits a non-monotonic pattern, decreasing from 0.4640 to negative values at intermediate α and increasing to 0.3021 at α=4α=4. Meanwhile, HC remains relatively stable (94.2901–96.2011), suggesting that α mainly affects the distribution of educational opportunities rather than aggregate educational production. Overall, the sensitivity analysis shows that moderate school-quality preference achieves a better balance between educational matching and equity, whereas excessive quality-driven sorting may strengthen socioeconomic differences in school access. Metric 0.25 0.5 1 2 4 MA 0.5083 0.5102 0.5101 0.5137 0.5109 GA 0.0381 0.0213 0.0261 0.0313 0.0260 IA 0.0132 -0.0006 -0.0018 -0.0037 0.0069 ID 0.1279 0.1244 0.1253 0.1359 0.1452 IQ 0.4640 0.0015 -0.0606 -0.1654 0.3021 HC 94.9945 96.2011 94.6490 94.2901 95.2680 Table 6: Sensitivity analysis with respect to α. β Analysis. The parameter β captures the sensitivity of households to housing prices in the residential sorting process. A larger β indicates that housing costs play a more important role in household location decisions, potentially strengthening the interaction between housing markets and educational access. Table 7 reports the sensitivity of equilibrium outcomes with respect to different values of β. When β≤1β≤ 1, the equilibrium outcomes remain nearly unchanged. MA, GA, IA, and HC are identical across β=0.25β=0.25, 0.50.5, and 11, indicating that moderate variations in housing price sensitivity have limited effects on educational outcomes. As β increases beyond one, housing price sensitivity begins to affect educational distribution. GA increases from 0.0261 at β=1β=1 to 0.0377 at β=4β=4, suggesting that stronger housing price constraints amplify inequality in educational access. Meanwhile, IA remains close to zero, indicating limited changes in income-based access differences. The impact of β on efficiency-related outcomes is limited. MA decreases only slightly from 0.5101 to 0.5093, and HC changes from 94.6490 to 94.5725. These results suggest that housing price sensitivity mainly affects the distribution of educational resources rather than aggregate performance. Overall, the sensitivity analysis indicates that moderate housing price sensitivity has limited influence on the equilibrium outcomes, whereas excessive dependence on housing costs increases educational access inequality. This highlights the role of housing markets as a potential channel through which socioeconomic differences influence educational opportunities. Metric 0.25 0.5 1 2 4 MA 0.5101 0.5101 0.5101 0.5096 0.5093 GA 0.0261 0.0261 0.0261 0.0320 0.0377 IA -0.0018 -0.0018 -0.0018 0.0016 -0.0004 ID 0.1253 0.1253 0.1253 0.1345 0.1170 IQ -0.0606 -0.0606 -0.0606 -0.0007 -0.1015 HC 94.6490 94.6490 94.6490 94.5882 94.5725 Table 7: Sensitivity analysis with respect to β. τ Analysis. The parameter τ controls the degree of randomness in household school-choice behavior. deterministic utility differences and introduces more stochasticity into the residential sorting process. Table 8 reports the sensitivity of equilibrium outcomes with respect to different values of τ. As τ increases, MA decreases gradually from 0.5101 to 0.4857, indicating that stronger choice randomness reduces average accessibility. In contrast, HC increases from 94.6490 to 104.4688, suggesting that less deterministic sorting improves the utilization of educational resources. The impact of τ on socioeconomic sorting is also significant. DI decreases from 0.1253 to 0.0637, while IQ moves toward zero, indicating weaker associations between income and school quality. However, GA does not decrease monotonically, reaching its lowest value at τ=1τ=1 and increasing slightly for larger values. Overall, the sensitivity analysis reveals an efficiency–equity trade-off associated with τ. Higher choice randomness reduces average educational access but improves aggregate human capital and weakens socioeconomic sorting. Moderate randomness (τ≈1τ≈ 1–22) achieves a better balance between educational efficiency and distributional outcomes. Metric 0.25 0.5 1 2 4 MA 0.5101 0.5018 0.4959 0.4896 0.4857 GA 0.0261 0.0267 0.0121 0.0432 0.0410 IA -0.0018 -0.0006 -0.0004 0.0009 0.0002 ID 0.1253 0.0842 0.0738 0.0624 0.0637 IQ -0.0606 -0.0958 -0.0750 -0.0504 0.0348 HC 94.6490 97.6483 100.8233 101.5455 104.4688 Table 8: Sensitivity analysis with respect to τ. (ws,wv)(w_s,w_v) Analysis. The parameters (ws,wv)(w_s,w_v) determine the relative importance of student composition and government investment in the evolution of school quality. Specifically, wsw_s captures the contribution of peer effects, while wvw_v represents the effectiveness of financial investment in improving school quality. Table 9 reports the sensitivity of equilibrium outcomes under different combinations of these two weights. The results show that increasing wsw_s generally improves equity. As wsw_s increases from 0 to 1, GA decreases from 0.0726 to 0.0212, indicating that stronger peer effects reduce inequality in school-quality access. In contrast, increasing wvw_v mainly improves efficiency-related outcomes. When the weight of government investment increases, HC rises from 94.1940 under (ws,wv)=(1,0)(w_s,w_v)=(1,0) to 95.1909 under (ws,wv)=(0,1)(w_s,w_v)=(0,1). This occurs because a larger wvw_v strengthens the impact of resource investment on school quality. However, prioritizing investment effectiveness may weaken equity improvements, as reflected by higher GA. Overall, the weighting parameters reveal a trade-off between efficiency and equity. Larger wvw_v favors HC accumulation, whereas larger wsw_s promotes more equitable access through lower GA. Metric (0,1) (0.25,0.75) (0.5,0.5) (0.75,0.25) (1,0) MA 0.5098 0.5108 0.5063 0.5016 0.4999 GA 0.0726 0.0389 0.0273 0.0294 0.0212 IA 0.0081 -0.0104 -0.0022 0.0075 0.0021 ID 0.1352 0.1088 0.1302 0.1284 0.1143 IQ 0.1295 -0.3919 -0.1130 0.3483 0.0742 HC 95.1909 93.1327 93.8852 94.2137 94.1940 Table 9: Sensitivity analysis with respect to the weighting coefficients (ws,wv)(w_s,w_v). D.4 Scalability Experiments To evaluate the scalability of the proposed framework under different spatial and educational configurations, we conduct experiments with varying numbers of communities and schools. Specifically, we consider six configurations by changing the number of communities from 12 to 24 and the number of schools from 4 to 12. Table 10 reports the resulting performance under different environment scales. The results demonstrate that the number of communities has a more significant impact on MA than the number of schools. When the number of communities increases from 12 to 24, MA decreases substantially from approximately 0.477 to 0.368, while changing the number of schools within the same community scale has only a limited effect (e.g., 0.477, 0.477, and 0.471 under 4, 8, and 12 schools with 12 communities). This indicates that spatial expansion and household dispersion introduce greater challenges for maintaining educational accessibility than increasing the number of educational providers. In contrast, increasing the number of schools mainly affects the distributional properties of educational opportunities. As the number of schools increases, GA tends to increase. For example, under 12 communities, GA rises from 0.030 with 4 schools to 0.084 with 12 schools. Similarly, DI increases from 0.145 to 0.258, indicating stronger socioeconomic segregation across schools. These results suggest that simply increasing the number of schools does not necessarily improve educational equity. A larger number of schools may provide more differentiated educational environments, but can also intensify household sorting and amplify disparities in school access. The scalability experiments further reveal that the relationship between school quantity and educational outcomes is not monotonic. While increasing the number of schools may improve educational diversity, excessive fragmentation of educational resources can strengthen sorting mechanisms and increase inequality. Therefore, expanding school quantity alone is insufficient to guarantee improved educational outcomes, and effective resource allocation requires jointly considering spatial structure, household distribution, and school configuration. (12,4) (12,8) (12,12) (24,4) (24,8) (24,12) MA 0.477 0.477 0.471 0.368 0.367 0.367 GA 0.030 0.032 0.084 0.015 0.037 0.047 IA 0.007 -0.007 -0.026 0.002 -0.0003 0.007 DI 0.145 0.195 0.258 0.085 0.160 0.226 IQ 0.289 -0.288 -0.452 0.206 -0.030 0.228 HC 106.366 105.801 105.613 162.425 163.465 161.777 Table 10: Performance under different community and school configurations. D.5 Comparative Experiments In the comparative experiments, we evaluate the proposed reinforcement learning (RL)-based resource allocation policy against several representative baseline strategies, including equal-split budgeting, proportional-to-enrollment allocation, and compensatory funding. The allocation rule for each baseline is defined as follows: • Equal-split. The total education budget is equally distributed across all schools, bkt=1K,k=1,…,K.b_k^t= 1K, k=1,…,K. (61) • Proportional-to-enrollment. The budget is allocated according to school enrollment, bkt=Nkt∑j=1KNjt,b_k^t= N_k^t _j=1^KN_j^t, (62) corresponding to equal per-student funding and representing a common allocation rule in public education systems. • Compensatory funding. Schools with lower educational quality receive a larger budget share, bkt=exp(−λrkt)∑j=1Kexp(−λrjt),b_k^t= (-λ r_k^t) _j=1^K (-λ r_j^t), (63) where λ controls the compensation intensity and rktr_k^t denotes the current quality of school k. This heuristic represents an equity-oriented funding strategy that prioritizes disadvantaged schools. D.6 Parameter Setting Component Parameter Baseline Interpretation Geography M,KM,K 12,412,4 Communities and schools CmC_m 100100 Housing capacity per community QmQ_m [0,1]U[0,1] Initial community amenity rk0r_k^0 [0.1,0.9]U[0.1,0.9] Initial school quality Household choice α 1.01.0 Baseline preference for school quality ξ 1.01.0 Parental-education preference gradient β0 _0 1.01.0 Price-sensitivity scale D,λD,λ 1.0,1.01.0,1.0 Relocation cost and its weight η 1.01.0 Amenity weight τ 0.250.25 Logit temperature PminP_ 0 Housing-price floor School dynamics δ 0.40.4 Quality adjustment rate wv,wsw_v,w_s 0.8,0.20.8,0.2 Investment and peer weights g(v)g(v) v v Concave investment technology ψ 1.01.0 Ability exponent in learning output Government B 100100 Annual education budget ϵε 2.02.0 Atkinson inequality aversion κ 0 Policy-stability penalty γ 0.950.95 Intertemporal discount factor Population π 0.20.2 Annual departure probability aentry,Wa_entry,W 6,66,6 Entry age and schooling duration χin _in 1.01.0 Inflow-to-departure ratio ω0 _0 0.950.95 Initial occupancy rate Simulation T,BburnT,B_burn 50,1050,10 Horizon and burn-in periods S 100100 Number of evaluation seeds Table 11: Baseline model and simulation parameters. Hyperparameter Value Description Learning rate 3×10−33× 10^-3 Adam step size Rollout length 100100 Environment steps per update Batch size 2020 Minibatch size Training epochs 1010 Passes over each rollout GAE coefficient 0.950.95 Bias–variance trade-off PPO clip range 0.20.2 Policy-update clipping threshold Entropy coefficient 0 Entropy regularization weight Discount factor 0.950.95 Inherited from the government objective Training steps 200,000200,000 Total environment interactions Table 12: PPO training hyperparameters.