|
|
|
|
|
|
) |
|
|
|
|
|
|
|
fake_action_outputs = { |
|
|
|
"action": [0.1, 0.1], |
|
|
|
"action": {"continuous_action": [0.1, 0.1]}, |
|
|
|
"log_probs": [0.1, 0.1], |
|
|
|
"log_probs": {"continuous_log_probs": [0.1, 0.1]}, |
|
|
|
} |
|
|
|
mock_decision_steps, mock_terminal_steps = mb.create_mock_steps( |
|
|
|
num_agents=2, |
|
|
|
|
|
|
fake_action_info = ActionInfo( |
|
|
|
action=[0.1, 0.1], |
|
|
|
action={"continuous_action": [0.1, 0.1]}, |
|
|
|
value=[0.1, 0.1], |
|
|
|
outputs=fake_action_outputs, |
|
|
|
agent_ids=mock_decision_steps.agent_id, |
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
fake_action_outputs = { |
|
|
|
"action": [0.1], |
|
|
|
"action": {"continuous_action": [0.1]}, |
|
|
|
"log_probs": [0.1], |
|
|
|
"log_probs": {"continuous_log_probs": [0.1]}, |
|
|
|
} |
|
|
|
mock_decision_step, mock_terminal_step = mb.create_mock_steps( |
|
|
|
num_agents=1, |
|
|
|
|
|
|
done=True, |
|
|
|
) |
|
|
|
fake_action_info = ActionInfo( |
|
|
|
action=[0.1], |
|
|
|
action={"continuous_action": [0.1]}, |
|
|
|
value=[0.1], |
|
|
|
outputs=fake_action_outputs, |
|
|
|
agent_ids=mock_decision_step.agent_id, |
|
|
|
|
|
|
processor.add_experiences( |
|
|
|
mock_decision_step, mock_terminal_step, _ep, fake_action_info |
|
|
|
) |
|
|
|
add_calls.append(mock.call([get_global_agent_id(_ep, 0)], [0.1])) |
|
|
|
add_calls.append( |
|
|
|
mock.call([get_global_agent_id(_ep, 0)], {"continuous_action": [0.1]}) |
|
|
|
) |
|
|
|
processor.add_experiences( |
|
|
|
mock_done_decision_step, mock_done_terminal_step, _ep, fake_action_info |
|
|
|
) |
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
fake_action_outputs = { |
|
|
|
"action": [0.1], |
|
|
|
"action": {"continuous_action": [0.1]}, |
|
|
|
"log_probs": [0.1], |
|
|
|
"log_probs": {"continuous_log_probs": [0.1]}, |
|
|
|
} |
|
|
|
mock_decision_step, mock_terminal_step = mb.create_mock_steps( |
|
|
|
num_agents=1, |
|
|
|
|
|
|
fake_action_info = ActionInfo( |
|
|
|
action=[0.1], |
|
|
|
action={"continuous_action": [0.1]}, |
|
|
|
value=[0.1], |
|
|
|
outputs=fake_action_outputs, |
|
|
|
agent_ids=mock_decision_step.agent_id, |
|
|
|