You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Comparability between mesa and mesa-frames models are crucial for validating the correctness of model implementations.
To achieve this given the same seed and initial conditions, we need:
A compatibility layer that transforms a mesa.Model into a mesa-frames.ModelDF (this can be implemented relatively easily, I have already done some work on a local branch)
Consistent randomized operations (also including shuffling of agents) across frameworks. This is more challenging because of the different random number generators (mesa uses random.Random and mesa-frames uses numpy.random.Generator) and different shuffling (mesa uses random.Random.shuffle and mesa-frames uses the native DFs shuffle operation). Maybe with an appropriate decorator, we could substitute random operations for mesa-frames models at runtime, at the cost of performance but gaining the reproducibility.
The text was updated successfully, but these errors were encountered:
For migrating then scaling up, I think writing qualitative test cases that ensure specific behavior outcomes (see e.g. https://github.com/projectmesa/mesa-examples/blob/main/examples/sugarscape_g1mt/tests.py) and check that both versions have the same outcome, is a more effective use of the modeler's time, than trying to reproduce down to the floating points of the original Mesa model. The latter gets much harder the more complex the model is. mesa-frames' activation is order-independent, and can only have an equivalent in Mesa if the latter uses staged activation that is carefully designed to be order independent. Any random activation won't be translatable due to the first mover advantage.
Comparability between
mesa
andmesa-frames
models are crucial for validating the correctness of model implementations.To achieve this given the same seed and initial conditions, we need:
mesa.Model
into amesa-frames.ModelDF
(this can be implemented relatively easily, I have already done some work on a local branch)mesa
usesrandom.Random
andmesa-frames
usesnumpy.random.Generator
) and different shuffling (mesa
usesrandom.Random.shuffle
andmesa-frames
uses the native DFs shuffle operation). Maybe with an appropriate decorator, we could substitute random operations for mesa-frames models at runtime, at the cost of performance but gaining the reproducibility.The text was updated successfully, but these errors were encountered: