ethicalgardeners.algorithmsΒΆ
Utilities to train and evaluate RL agents using Stable Baselines3 on the EthicalGardeners PettingZoo AEC environment.
- members:
Functions
|
Evaluate a trained agent vs a random agent |
|
Retrieve the most recently saved policy file for the given environment and algorithm. |
|
Create a Stable Baselines3 compatible environment with action masking. |
|
Return a thunk that creates a Stable Baselines3 compatible environment. |
|
Return the function that provides the action mask for the current agent. |
|
Predict the next action using the model, considering the action mask if needed. |
|
Save the trained model with a timestamped filename. |
|
Train a given model and save it. |
Classes
|
Wrapper to adapt a PettingZoo AEC environment to be compatible with Stable Baselines3. - Only returns the observation (without action mask) for the current agent. - the observation_space and action_space are aligned with the current agent. |