Adaptive evolutionary games extend classical evolutionary game theory by allowing strategies to evolve through trait-mediated eco-evolutionary feedbacks rather than assuming fixed payoff structures. However, existing implementations are often limited in flexibility and accessibility for modeling complex multispecies interactions. Here, we present AEG, an open-source Python framework for simulating trait-mediated and density-dependent interactions in systems with an arbitrary number of interacting players. The framework integrates ecological dynamics and adaptive trait evolution within a unified system of ordinary differential equations, enabling dynamic modification of interaction strengths through evolving traits. The modular package design of the framework, combined with a user-friendly notebook interface, facilitates reproducible simulations, flexible model specification, and straightforward extension to diverse interaction structures. Illustrative examples and computational benchmarking comparing adaptive and non-adaptive dynamic regimes demonstrate that incorporating trait evolution leads to qualitatively distinct eco-evolutionary outcomes, including more flexible interaction structures and altered coexistence patterns. Despite the additional computational cost associated with adaptive dynamics, the framework remains computationally efficient across a range of system sizes. By combining efficient vectorized implementation with transparent and reproducible workflows, AEG provides a versatile computational tool for research in theoretical and evolutionary ecology, while also offering a general foundation for studying adaptive interactions in broader complex systems.
Kubyana et al. (Mon,) studied this question.