-
Notifications
You must be signed in to change notification settings - Fork 0
unfinished changes #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| return features[self.PUCK_GOAL_DISTANCE] No newline at end of file | ||
| return features[self.PUCK_GOAL_DISTANCE] | ||
|
|
||
| class OpponentFeatures(Features): |
There was a problem hiding this comment.
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': |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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)] |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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?
No description provided.