Fix typos

This commit is contained in:
Marek Wolan
2024-02-02 14:48:49 +00:00
parent c163fb37ea
commit 4c6ae135cd
3 changed files with 14 additions and 13 deletions

View File

@@ -218,7 +218,7 @@ class RewardFunction:
self.current_reward: float = 0.0
self.total_reward: float = 0.0
def regsiter_component(self, component: AbstractReward, weight: float = 1.0) -> None:
def register_component(self, component: AbstractReward, weight: float = 1.0) -> None:
"""Add a reward component to the reward function.
:param component: Instance of a reward component.
@@ -260,5 +260,5 @@ class RewardFunction:
weight = rew_component_cfg.get("weight", 1.0)
rew_class = cls.__rew_class_identifiers[rew_type]
rew_instance = rew_class.from_config(config=rew_component_cfg.get("options", {}), game=game)
new.regsiter_component(component=rew_instance, weight=weight)
new.register_component(component=rew_instance, weight=weight)
return new