-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allowing factories to create worlds with different agent types
- Previously, a world factory was limited in two ways: 1. OneShotWorldFactory had agent_type and agent_params as members. This meant that we need to pass the type when creating the factory but the parameters of the OneShotRLAgent should include the factory. They necessitated creating the factory twice when training and testing on a different world even from the same factory. Moreover, this parameter meant that the factory is always assigned to the same test agent type which is not necessary. 2. There can be a single world controlled externally (e.g. from an RL policy). This is limiting us to use RL but we cannot use MARL. We resolved that by allowing __call__ (and make()) to take a tuple of types/params to use for multiple external agents. For RL applications, this should be a single-valued tuple. Both of these issues are resolved now by removing agent_type/agent_params from all WorldFactories and passing the types/params to the __call__() method.
- Loading branch information
1 parent
1ee6f42
commit 281ee9e
Showing
4 changed files
with
267 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.