reward_calculator.py中calc_delta_points方法计算结果存在数值错误
Koyonomi opened this issue · 3 comments
Koyonomi commented
Equim-chan commented
目前 Mortal 没有使用到 calc_delta_points
方法,既然如此,你至少应该附上你写的那部分调用它的代码,以及相应的输入,不然我要怎么去复现呢。
Koyonomi commented
我使用的是reward_calculator.py已有方法去计算
reward_calculator.py
def calc_delta_points(self, player_id, grp_feature, final_scores):
seq = np.concatenate((grp_feature[:, 3 + player_id] * 1e5, np.array([final_scores[player_id]])))
delta_points = seq[1:] - seq[:-1]
return delta_points
dataloader.py
grp_feature = grp.take_feature()
final_scores = grp.take_final_scores()
player_id = game.take_player_id()
kyoku_points = self.reward_calc.calc_delta_points(player_id, grp_feature, final_scores)
`
Koyonomi commented