#2869 - Updates to agents to make sure they can be generated from a given config. Updates to test suite to reflect code changes
This commit is contained in:
@@ -55,15 +55,25 @@ def test_probabilistic_agent():
|
||||
observation_space = ObservationManager(NestedObservation(components={}))
|
||||
reward_function = RewardFunction()
|
||||
|
||||
pa = ProbabilisticAgent(
|
||||
agent_name="test_agent",
|
||||
action_space=action_space,
|
||||
observation_space=observation_space,
|
||||
reward_function=reward_function,
|
||||
settings={
|
||||
"action_probabilities": {0: P_DO_NOTHING, 1: P_NODE_APPLICATION_EXECUTE, 2: P_NODE_FILE_DELETE},
|
||||
},
|
||||
)
|
||||
# pa = ProbabilisticAgent(
|
||||
# agent_name="test_agent",
|
||||
# action_space=action_space,
|
||||
# observation_space=observation_space,
|
||||
# reward_function=reward_function,
|
||||
# settings={
|
||||
# "action_probabilities": {0: P_DO_NOTHING, 1: P_NODE_APPLICATION_EXECUTE, 2: P_NODE_FILE_DELETE},
|
||||
# },
|
||||
# )
|
||||
|
||||
pa_config = {"agent_name":"test_agent",
|
||||
"action_manager": action_space,
|
||||
"observation_manager": observation_space,
|
||||
"reward_function": reward_function,
|
||||
"agent_settings": {
|
||||
"action_probabilities": {0: P_DO_NOTHING, 1: P_NODE_APPLICATION_EXECUTE, 2: P_NODE_FILE_DELETE},
|
||||
}}
|
||||
|
||||
pa = ProbabilisticAgent.from_config(config=pa_config)
|
||||
|
||||
do_nothing_count = 0
|
||||
node_application_execute_count = 0
|
||||
|
||||
Reference in New Issue
Block a user