Apply suggestions from code review.
This commit is contained in:
@@ -68,6 +68,8 @@ class DummyReward(AbstractReward):
|
|||||||
|
|
||||||
:param config: dict of options for the reward component's constructor. Should be empty.
|
:param config: dict of options for the reward component's constructor. Should be empty.
|
||||||
:type config: dict
|
:type config: dict
|
||||||
|
:return: The reward component.
|
||||||
|
:rtype: DummyReward
|
||||||
"""
|
"""
|
||||||
return cls()
|
return cls()
|
||||||
|
|
||||||
@@ -230,7 +232,12 @@ class WebpageUnavailablePenalty(AbstractReward):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_config(cls, config: dict) -> AbstractReward:
|
def from_config(cls, config: dict) -> AbstractReward:
|
||||||
"""Build the reward component object from config."""
|
"""
|
||||||
|
Build the reward component object from config.
|
||||||
|
|
||||||
|
:param config: Configuration dictionary.
|
||||||
|
:type config: Dict
|
||||||
|
"""
|
||||||
node_hostname = config.get("node_hostname")
|
node_hostname = config.get("node_hostname")
|
||||||
return cls(node_hostname=node_hostname)
|
return cls(node_hostname=node_hostname)
|
||||||
|
|
||||||
|
|||||||
@@ -307,7 +307,8 @@
|
|||||||
"The blue agent's reward is calculated using two measures:\n",
|
"The blue agent's reward is calculated using two measures:\n",
|
||||||
"1. Whether the database file is in a good state (+1 for good, -1 for corrupted, 0 for any other state)\n",
|
"1. Whether the database file is in a good state (+1 for good, -1 for corrupted, 0 for any other state)\n",
|
||||||
"2. Whether each green agents' most recent webpage request was successful (+1 for a `200` return code, -1 for a `404` return code and 0 otherwise).\n",
|
"2. Whether each green agents' most recent webpage request was successful (+1 for a `200` return code, -1 for a `404` return code and 0 otherwise).\n",
|
||||||
"The file status reward and the two green-agent-related reward are averaged to get a total step reward.\n"
|
"\n",
|
||||||
|
"The file status reward and the two green-agent-related rewards are averaged to get a total step reward.\n"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user