SearcharxivSearch

arXiv subjects

Ahmed Khalifa

Publications and source records attributed to Ahmed Khalifa.

At least 19 recordsLinked to original sources

Programmable Cellular Automata

Cellular automata is a local computation paradigm where complex behavior can arise from local interactions between simple functions. This paradigm has been used to explain many systems such as biological processes, traffic simulation, computer networks, etc. In games, cellular automata have been used in games such as SimCity and for the generation of spatial content such as caves or dungeons. However, creating effective local rules is hard and unintuitive. Cellular automata can be effectively evolved, but may still be hard to interpret. In this work, we introduce the concept of programmable cellular automata, where we represent the system as Python code. We also modularize the cellular automata into local functions and a decision function. Local functions take a local neighborhood and return a value, while the decision function takes the output of the local functions and decides the value of the next state. Separating the cellular automata into modules written in Python helps with understanding how these systems are working. We also explore adding global functions where they take the whole state and compute a function from it. We tested generating levels for three different games from the PCG Benchmark. The results showed that global functions decrease the number of iterations that cellular automata need to solve a problem, and that we cannot find solutions for some problems with purely local functions. Looking into the generated functions, we can see common functions that have been used in different experiments, which not only helps us understand the generator but also helps us understand these games better and what is important for them.

cs.NE

Procedural Content Metageneration via Program Search and Continual Abstraction Discovery

Large language models can generate executable programs, which makes it possible to search directly over procedural content generators rather than individual levels. We study this approach in Sokoban, Zelda, Dangerous Dave, and Lode Runner. Each run evolves complete Python generators through language-model mutation and crossover. We introduce Continual Abstraction Discovery, or CAD, which extracts reusable primitives from high-fitness programs into a run-specific helper module. A 2x2 experiment crosses CAD with access to a fixed hand-written domain API. The completed data set contains 160 complete runs, with at least ten 50-generation runs in every cell. CAD raises mean final best fitness in all eight domain and API comparisons. Across all CAD runs, learned libraries are adopted by most later programs and repeatedly rediscover validation, reachability, and structural utilities. These results support that discovering reusable primitives improves evolutionary program search for content generators.

cs.AI

The Time Value of Evolution

In evolutionary search, a weak child can be a valuable ancestor that makes high-fitness regions reachable. Immediate-return control is blind to this delayed utility, penalizing mutations through their immediate offspring even when they open productive future lineages. We formalize this hidden dynamic as the time value of evolution within a finite-horizon Markov decision process. To exploit it, we introduce Lineage-Value Policy Gradients (LVPG), a long-horizon actor-critic framework for automated trading policy discovery. Our architecture decouples search control into specialized policy heads over a shared generative backbone: a bootstrapped critic head estimates the value of finite-horizon lineage potential from multi-step mutation trees, while an actor head dynamically modulates mutation intensity over the remaining search budget. We isolate the impact of long-horizon credit assignment against immediate-return optimization across 90 paired runs under matched operators, lineage supervision, folds, seeds, and budgets. Path-based credit assignment substantially accelerates finite-budget search, increasing validation best-so-far AUC by 0.394 Sharpe units. LVPG also produces fewer temporary regressions than immediate-return optimization and recovers from them more often. Finite-horizon lineage value yields more selective non-monotonic search and stronger policies within identical resource constraints.

cs.LG

ELMER: Evolutionary Language Model that Explores and Refines

Program evolution can measure whether a mutation helped, but it rarely controls how far the mutation moves in behavior space. Syntactic edit size is an unreliable proxy: a small code change can alter nearly every action, while a larger rewrite can preserve the same execution trace. We introduce an Evolutionary Language Model that searches over natural-language policy descriptions and compiles typed programs for execution. A fully fine-tuned Qwen3-8B model learns three task-conditioned operations: conditional semantic mutation, natural language to domain-specific language (GPTL) compilation, and GPTL to natural language translation. The model is fine-tuned with conditional input on the mutation strength (low, medium, high) using Direct Preference Optimization (oDPO). Across 252 fixed-budget evolutionary searches, oDPO improves both behavioral calibration and finite-budget search efficiency. Natural-language attains the highest observed held-out fitness. Our analysis shows that the condition input (mutation strength) systematically changes semantic edit composition and that language mutations preserve more parent fitness at matched small-to-moderate behavioral displacement. These results show that language can serve as a steerable, execution-grounded search representation over executable program space.

cs.LG

Evolutionary Wave Function Collapse

Wave Function Collapse (WFC) is a widely used procedural content generation method that learns local adjacency constraints from example inputs to generate larger outputs. In this paper, we explore combining WFC with evolutionary search by evolving the small input examples used by WFC rather than directly evolving complete levels. In this approach, WFC acts as a genotype-to-phenotype mapping. The generated levels are then evaluated through domain-specific fitness functions. We evaluate the method in two domains with different relationships between local and global structure: Maze connectivity maps and Zelda-style dungeon layouts. Our results show that evolutionary optimization over WFC inputs improves generation quality in domains where properties emerge from local relationships, while domains requiring global constraints remain challenging. These findings suggest that evolutionary search can effectively guide WFC generation when target objectives align with local structure.

cs.NE

Learning Local Constraints for Reinforcement-Learned Content Generators

Constraint-based game content generators that learn local constraints from existing content, such as Wave Function Collapse (WFC), can generate visually satisfying game levels but face challenges in guaranteeing global properties, such as playability. On the other hand, reinforcement-learning trained generators can guarantee global properties -- because such properties can easily be included in reward functions -- but the results can be visually dissatisfying. In this paper, we explore ways to combine these methods. Specifically, we constrain the action space of a PCGRL generator with constraints learned by WFC, effectively allowing the PCGRL generator to achieve global properties while forced to adhere to local constraints. To better analyze how this hybrid content generation method operates, we vary the number and type of inputs, and we test whether to randomly collapse the starting state and exclude rare patterns. While the method is sensitive to hyperparameter tuning, the best of our trained generators produce visually satisfying and playable puzzle-platform game levels -- such as Lode Runner levels -- with desired global properties.

cs.AI

Ground states of quantum XY dipoles on the Archimedean lattices

We report numerical ground states for the dipolar XY spin model, which describes extended antiferromagnetic interactions in two-dimensional arrays of polar molecules and two-level Rydberg atoms. Carrying out large-scale density matrix renormalization group (DMRG) calculations, we compute ground state properties on nine of the eleven Archimedean lattices--tilings of the plane by regular polygons. Four of these host trivial paramagnets, while another four develop collinear Neel magnetic order, as was found previously for the square lattice. For the ordered states, we calculate the hydrodynamic parameters (magnetization, susceptibility, and stiffness) and compare to linear spin wave theory. We also investigate the triangular lattice, for which we find several competing phases including coplanar magnetism, stripe density wave order, and a possible spin liquid; their relative stability is sensitive to the long-range couplings present in our dipolar model. Finally, the Archimedean classification is completed by the kagome lattice, which we argue in a companion work is likely to be a Dirac spin liquid.

cond-mat.str-el

Fluctuation-driven chiral ferromagnetism

Quantum fluctuations are often suppressed in ferromagnetic materials because they admit a simple unfrustrated ground state, greatly limiting the scope of the phenomena that can be observed. In this work, we show how naturally occurring magnetization-non-conserving couplings fundamentally alter this paradigm by demonstrating the existence of a chiral ferromagnet that is stabilized by quantum fluctuations. More specifically, we show how these spin-orbit interactions modify the classical phase diagram; whereas a classical analysis predicts only achiral collinear states, we observe fluctuation-stabilized phases, including a ferromagnet with large orbital chirality and a chiral stripe. We elucidate how such couplings generate a scalar orbital chirality spontaneously, in contrast to conventional mechanisms which rely upon a field-induced canting of vector chiral order. The resultant chiral states exhibit distinct transport signatures, namely an enhanced thermal Hall effect, and are of direct relevance to moir\'e heterostructures, Rydberg-atom arrays, and solid-state materials featuring non-Kramers spins

cond-mat.str-el

Continuous Program Search

Genetic Programming yields interpretable programs, but small syntactic mutations can induce large, unpredictable behavioral shifts, degrading locality and sample efficiency. We frame this as an operator-design problem: learn a continuous program space where latent distance has behavioral meaning, then design mutation operators that exploit this structure without changing the evolutionary optimizer. We make locality measurable by tracking action-level divergence under controlled latent perturbations, identifying an empirical trust region for behavior-local continuous variation. Using a compact trading-strategy DSL with four semantic components (long/short entry and exit), we learn a matching block-factorized embedding and compare isotropic Gaussian mutation over the full latent space to geometry-compiled mutation that restricts updates to semantically paired entry--exit subspaces and proposes directions using a learned flow-based model trained on logged mutation outcomes. Under identical $(\mu+\lambda)$ evolution strategies and fixed evaluation budgets across five assets, the learned mutation operator discovers strong strategies using an order of magnitude fewer evaluations and achieves the highest median out-of-sample Sharpe ratio. Although isotropic mutation occasionally attains higher peak performance, geometry-compiled mutation yields faster, more reliable progress, demonstrating that semantically aligned mutation can substantially improve search efficiency without modifying the underlying evolutionary algorithm.

cs.LG

Direct visualization of gate-tunable flat bands in twisted double bilayer graphene

The symmetry-broken correlated states in twisted double bilayer graphene (TDBG) can be tuned via several external knobs, including twist angle, displacement field, and carrier density. However, a direct, momentum-resolved characterization of how these parameters reshape the flat-band structure remains limited. In this study, we employ micro focused angle-resolved photoemission spectroscopy to investigate the flat-band dispersion of TDBG at a twist angle of 1.6, systematically varying the displacement field and carrier density via electrostatic gating. We directly observe multiple flat moir'e minibands near charge neutrality, including a flat remote valence band residing below the low-energy flat-band manifold. Furthermore, the dominant Coulomb repulsive energy over the flat- band bandwidth suggests favorable conditions for the emergence of interaction-driven correlated phenomena in TDBG. These findings establish that the formation and evolution of flat bands in TDBG arises from the interplay between the electron filling and the displacement field.

cond-mat.mes-hall

PuzzleJAX: A Benchmark for Reasoning and Learning

We introduce PuzzleJAX, a GPU-accelerated puzzle game engine and description language designed to support rapid benchmarking of tree search, reinforcement learning, and LLM reasoning abilities. Unlike existing GPU-accelerated learning environments that provide hard-coded implementations of fixed sets of games, PuzzleJAX allows dynamic compilation of any game expressible in its domain-specific language (DSL). This DSL follows PuzzleScript, which is a popular and accessible online game engine for designing puzzle games. In this paper, we validate in PuzzleJAX several hundred of the thousands of games designed in PuzzleScript by both professional designers and casual creators since its release in 2013, thereby demonstrating PuzzleJAX's coverage of an expansive, expressive, and human-relevant space of tasks. By analyzing the performance of search, learning, and language models on these games, we show that PuzzleJAX can naturally express tasks that are both simple and intuitive to understand, yet often deeply challenging to master, requiring a combination of control, planning, and high-level insight.

cs.AI

Strong Correlation Driven Quadrupolar to Dipolar Exciton Transitions in a Trilayer Moir\'e Superlattice

The additional layer degree of freedom in trilayer moir\'e superlattices of transition metal dichalcogenides enables the emergence of novel excitonic species, such as quadrupolar excitons, which exhibit unique excitonic interactions and hold promise for realizing intriguing excitonic phases and their quantum phase transitions. Concurrently, the presence of strong electronic correlations in moir\'e superlattices, as exemplified by the observations of Mott insulators and generalized Wigner crystals, offers a direct route to manipulate these new excitonic states and resulting collective excitonic phases. Here, we demonstrate that strong exciton-exciton and electron-exciton interactions, both stemming from robust electron correlations, can be harnessed to controllably drive transitions between quadrupolar and dipolar excitons. This is achieved by tuning either the exciton density or electrostatic doping in a trilayer semiconducting moir\'e superlattice. Our findings not only advance the fundamental understanding of quadrupolar excitons but also usher in new avenues for exploring and engineering many-body quantum phenomena through novel correlated excitons in semiconducting moir\'e systems.

cond-mat.mes-hall

Spin-orbital magnetism in moir\'e Wigner molecules

The interplay of spin and orbital degrees of freedom offers a versatile playground for the realization of a variety of correlated phases of matter. However, the types of spin-orbital interactions are often limited and challenging to tune. Here, we propose and analyze a new platform for spin-orbital interactions based upon a lattice of Wigner molecules in moir\'e transition metal dichalcogenides (TMDs). Leveraging the spin-orbital degeneracy of the low-energy Hilbert space of each Wigner molecule, we demonstrate that TMD materials can host a general spin-orbital Hamiltonian that is tunable via the moir\'e superlattice spacing and dielectric environments. We study the phase diagram for this model, revealing a rich landscape of phases driven by spin-orbital interactions, ranging from ferri-electric valence bond solids to a helical spin liquid. Our work establishes moir\'e Wigner molecules in TMD materials as a prominent platform for correlated spin-orbital phenomena.

cond-mat.str-el

Evolutionary Level Repair

We address the problem of game level repair, which consists of taking a designed but non-functional game level and making it functional. This might consist of ensuring the completeness of the level, reachability of objects, or other performance characteristics. The repair problem may also be constrained in that it can only make a small number of changes to the level. We investigate search-based solutions to the level repair problem, particularly using evolutionary and quality-diversity algorithms, with good results. This level repair method is applied to levels generated using a machine learning-based procedural content generation (PCGML) method that generates stylistically appropriate but frequently broken levels. This combination of PCGML for generation and search-based methods for repair shows great promise as a hybrid procedural content generation (PCG) method.

cs.AI

ScriptDoctor: Automatic Generation of PuzzleScript Games via Large Language Models and Tree Search

There is much interest in using large pre-trained models in Automatic Game Design (AGD), whether via the generation of code, assets, or more abstract conceptualization of design ideas. But so far this interest largely stems from the ad hoc use of such generative models under persistent human supervision. Much work remains to show how these tools can be integrated into longer-time-horizon AGD pipelines, in which systems interface with game engines to test generated content autonomously. To this end, we introduce ScriptDoctor, a Large Language Model (LLM)-driven system for automatically generating and testing games in PuzzleScript, an expressive but highly constrained description language for turn-based puzzle games over 2D gridworlds. ScriptDoctor generates and tests game design ideas in an iterative loop, where human-authored examples are used to ground the system's output, compilation errors from the PuzzleScript engine are used to elicit functional code, and search-based agents play-test generated games. ScriptDoctor serves as a concrete example of the potential of automated, open-ended LLM-based workflows in generating novel game content.

cs.AI

The Procedural Content Generation Benchmark: An Open-source Testbed for Generative Challenges in Games

This paper introduces the Procedural Content Generation Benchmark for evaluating generative algorithms on different game content creation tasks. The benchmark comes with 12 game-related problems with multiple variants on each problem. Problems vary from creating levels of different kinds to creating rule sets for simple arcade games. Each problem has its own content representation, control parameters, and evaluation metrics for quality, diversity, and controllability. This benchmark is intended as a first step towards a standardized way of comparing generative algorithms. We use the benchmark to score three baseline algorithms: a random generator, an evolution strategy, and a genetic algorithm. Results show that some problems are easier to solve than others, as well as the impact the chosen objective has on quality, diversity, and controllability of the generated artifacts.

cs.AI

Quadrotor Manipulation System: Development of a Robust Contact Force Estimation and Impedance Control Scheme Based on DOb and FTRLS

The research on aerial manipulation systems has been increased rapidly in recent years. These systems are very attractive for a wide range of applications due to their unique features. However, dynamics, control and manipulation tasks of such systems are quite challenging because they are naturally unstable, have very fast dynamics, have strong nonlinearities, are very susceptible to parameters variations due to carrying a payload besides the external disturbances, and have complex inverse kinematics. In addition, the manipulation tasks require estimating (applying) a certain force of (at) the end-effector as well as the accurate positioning of it. Thus, in this article, a robust force estimation and impedance control scheme is proposed to address these issues. The robustness is achieved based on the Disturbance Observer (DOb) technique. Then, a tracking and performance low computational linear controller is used. For teleoperation purpose, the contact force needs to be identified. However, the current developed techniques for force estimation have limitations because they are based on ignoring some dynamics and/or requiring of an indicator of the environment contact. Unlike these techniques, we propose a technique based on linearization capabilities of DOb and a Fast Tracking Recursive Least Squares (FTRLS) algorithm. The complex inverse kinematics problem of such a system is solved by a Jacobin based algorithm. The stability analysis of the proposed scheme is presented. The algorithm is tested to achieve tracking of task space reference trajectories besides the impedance control. The efficiency of the proposed technique is enlightened via numerical simulation.

cs.RO

Field-induced magnon decays in dipolar quantum magnets

We investigate the spontaneous disintegration of magnons in two-dimensional ferromagnets and antiferromagnets dominated by long-range dipolar interactions. Analyzing kinematic constraints, we show that the unusual dispersion of dipolar ferromagnets in a uniform magnetic field precludes magnon-decay at all fields, in sharp contrast to short-range exchange-driven magnets. However, in a staggered magnetic field, magnons can decay in both dipolar ferromagnets and antiferromagnets. Remarkably, such decays do not require a minimum threshold field, and happen over a nearly fixed fraction of the Brillouin Zone in the XY limit, highlighting the significant role played by dipolar interactions. In addition, topological transitions in the decay surfaces lead to singularities in the magnon spectrum. Regularizing such singular behavior via a self-consistent approach, we make predictions for dynamical spin correlations accessible to near-term quantum simulators and sensors.

cond-mat.str-el