mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 00:14:00 +00:00
feat(*): Log live goal rate to TensorBoard during training
This commit is contained in:
@@ -290,6 +290,7 @@ func _physics_process(_delta):
|
||||
for agent in _agents:
|
||||
agent.reward -= draw_penalty
|
||||
agent.done = true
|
||||
agent.goal_scored_this_episode = false
|
||||
_reset_episode()
|
||||
return
|
||||
|
||||
@@ -320,6 +321,7 @@ func _on_goal_scored(conceding_team: int) -> void:
|
||||
for agent in _agents:
|
||||
agent.reward += goal_reward if agent.ship.team != conceding_team else -goal_reward
|
||||
agent.done = true
|
||||
agent.goal_scored_this_episode = true
|
||||
_reset_episode()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user