Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Commit

Permalink
ball position reward
Browse files Browse the repository at this point in the history
  • Loading branch information
yasuohayashibara committed Mar 7, 2024
1 parent 6a61dd7 commit 35a7e5f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion controllers/mat_train/runner/soccer_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ def run(self):
self.log_train(train_infos, total_num_steps)

num = self.episode_length * self.log_interval
print("rewards: {}".format(sum_episode_rewards[0]/num))
self.writter.add_scalars("train_episode_rewards", {"total_rewards": sum_episode_rewards[0]/num}, total_num_steps)
sum_episode_rewards = [0 for _ in range(self.n_rollout_threads)]
self.writter.add_scalars("train_episode_rewards", {"ball_distance_reward": sum_ball_distance_reward[0]/self.num_agents/num}, total_num_steps)
Expand Down
2 changes: 1 addition & 1 deletion controllers/mat_train/soccer/soccer.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def step(self, action):
velocity_reward = 10.0
out_of_field_reward = -100.0
collision_reward = -1.0
ball_position_reward = 2.0
ball_position_reward = 4.0
ball_tracking_reward = 0.1

rew_ball_distance = dict(zip(self.agents, [0.0 for _ in self.agents]))
Expand Down

0 comments on commit 35a7e5f

Please sign in to comment.