Terminate episode if sdc reaches goal in replay mode'#495
Open
riccardosavorgnan wants to merge 2 commits into
Open
Terminate episode if sdc reaches goal in replay mode'#495riccardosavorgnan wants to merge 2 commits into
riccardosavorgnan wants to merge 2 commits into
Conversation
| } | ||
| } | ||
|
|
||
| if (env->terminate_on_goal == 1 && env->simulation_mode == SIMULATION_REPLAY |
There was a problem hiding this comment.
it doesn't seem like it makes sense to gate this on CONTROL_SDC_ONLY?
Collaborator
Author
There was a problem hiding this comment.
It can be extended to all of replay mode, with a criteria on when the episode should terminate. I can add a threshold of % of cars that have completed their goals to trigger it, but it will come with no guarantees on what's the best value for now.
| } | ||
| } | ||
|
|
||
| if (env->terminate_on_goal == 1 && env->simulation_mode == SIMULATION_REPLAY |
There was a problem hiding this comment.
I think it would be fine for this to be on in both simulation modes?
eugenevinitsky
approved these changes
Jun 27, 2026
eugenevinitsky
left a comment
There was a problem hiding this comment.
Approved but I recommend adding a test so no one else can break this feature on you
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When in replay mode and SDC control only it might be desirable to terminate the episode once the SDC reaches its goal. This PR implements that in drive.h, and it is controlled by a config parameter.