|
|
|
|
|
|
|
|
|
|
@property |
|
|
|
def discrete_branches(self) -> Tuple[int, ...]: |
|
|
|
""" |
|
|
|
Returns a Tuple of int corresponding to the number of possible actions |
|
|
|
for each branch (only for discrete actions). Will return None in |
|
|
|
for continuous actions. |
|
|
|
""" |
|
|
|
""" |
|
|
|
Returns a an int corresponding to the number of discrete branches. |
|
|
|
""" |
|
|
|
""" |
|
|
|
Returns a an int corresponding to the number of continuous actions. |
|
|
|
""" |
|
|
|
""" |
|
|
|
Generates a numpy array corresponding to an empty action (all zeros) |
|
|
|
for a number of agents. |
|
|
|
:param n_agents: The number of agents that will have actions generated |
|
|
|
""" |
|
|
|
""" |
|
|
|
Generates a numpy array corresponding to a random action (either discrete |
|
|
|
or continuous) for a number of agents. |
|
|
|
:param n_agents: The number of agents that will have actions generated |
|
|
|
""" |
|
|
|
if self.is_continuous(): |
|
|
|
action = np.random.uniform( |
|
|
|
low=-1.0, high=1.0, size=(n_agents, self.continuous_size) |
|
|
|