-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
User Story
As a developer, I want the ratio of challenge and hindrance stress events to be balanced so that resilience growth does not unrealistically saturate to 1.0 due to overrepresentation of challenge stress.
Description
Currently, the model produces too many challenge stress events, leading to excessive resilience increase and eventual saturation at 1.0. To correct this imbalance, stress events should be classified as challenge or hindrance with equal probability. This can be implemented using a binomial distribution with p=0.5 for each event. This ensures an equal chance of either type of stress, creating a more realistic stress-resilience dynamic.
Proposed Flow
- Update stress event generation logic in
src/python/model.py(or relevant module):- Use
np.random.binomial(1, 0.5)to assign challenge (1) or hindrance (0) - Replace existing bias toward challenge stress
- Use
- Ensure challenge and hindrance stress are equally probable across agents and iterations
- Update tests to:
- Verify approximate 50/50 distribution across large number of simulations
- Confirm resilience no longer saturates to 1.0 under balanced stress exposure
- Validate integration with existing affect and resilience update mechanisms
Reference
- Current stress event assignment logic in the model
- Observed issue: resilience steadily rising to 1.0
- Binomial distribution:
np.random.binomial(1, 0.5)for fair assignment
Notes:
- Ensure reproducibility by seeding random generator from model configuration.
- Long-run simulations should show stable resilience levels, not monotonic increase.
- Consider adding a configuration parameter for
CHALLENGE_PROBABILITYin.envfor flexibility, with default0.5.