Skip to content

Conversation

@J-Rojas
Copy link
Contributor

@J-Rojas J-Rojas commented May 6, 2022

No description provided.

@J-Rojas J-Rojas requested a review from hartut May 6, 2022 07:16
return features[self.PUCK_GOAL_DISTANCE] No newline at end of file
return features[self.PUCK_GOAL_DISTANCE]

class OpponentFeatures(Features):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this was created to avoid breaking things, but it needs to be integrated into soccer features. Just create new features for the opponent distance(s) and opponent angles.


# Act
action = agent(**agent_data)
if self.focus == 'puck':
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a new kart state for other carts to the agent arguments, no focus necessary

plt.plot(steer)
plt.show()

viz_rollout_soccer = Rollout.remote(400, 300, mode="soccer")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

avoid creating rollouts per call, this forces jobs to get created and destroy per rollout.

viz_rollout_soccer = None
def run_soccer_agent(...):
    global viz_rollout_soccer
    if viz_rollout_soccer is None:
       viz_rollout_soccer = ... initialize it here...
   ....

show_graph(data)
return data

viz_rollouts = [Rollout.remote(50, 50, hd=False, render=False, frame_skip=5, mode="soccer") for i in range(4)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

*slice_net,
actor,
train=True,
extractor=OpponentFeatures()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

avoid branching here... OpponentFeatures will not be used (as stated before)
instead of making a conditional for opponent, use the rollout_initializer to set the state. Maybe it's so simple given the need to initialize the race?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants