-
Notifications
You must be signed in to change notification settings - Fork 15
Joint action sampling with jerk dynamics #156
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
Conversation
nadarenator
commented
Nov 28, 2025
- Mirroring fix for classic dynamics to jerk.
Greptile OverviewGreptile SummaryThis PR migrates the jerk dynamics model from a 2-dimensional multi-discrete action space to a joint action space, matching the pattern already used for classic dynamics. The change treats the longitudinal and lateral jerk actions as dependent (joint sampling) rather than independent. Key changes:
The implementation correctly mirrors the classic dynamics approach (lines 1571-1579 in Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Agent as RL Agent
participant DriveNet as DriveNet (drivenet.h)
participant Env as Drive Environment (drive.py)
participant Physics as Physics Engine (drive.h)
Note over Agent,Physics: Jerk Dynamics - Joint Action Space
Agent->>DriveNet: Forward pass with observations
Note over DriveNet: action_dim=1<br/>logit_sizes[0]=12<br/>(4 long × 3 lat)
DriveNet->>Agent: Single logit vector [12]
Agent->>Agent: Sample action from [0-11]
Agent->>Env: Step(action)
Note over Env: MultiDiscrete([12])
Env->>Physics: move_dynamics(action_idx)
Physics->>Physics: action_val = action_array[action_idx]
Physics->>Physics: a_long_idx = action_val / 3<br/>a_lat_idx = action_val % 3
Note over Physics: Decode joint action:<br/>12 possibilities from<br/>4 longitudinal × 3 lateral
Physics->>Physics: a_long = JERK_LONG[a_long_idx]<br/>a_lat = JERK_LAT[a_lat_idx]
Physics->>Physics: Update acceleration, velocity, position
Physics->>Env: Updated agent state
Env->>Agent: observation, reward, done, info
|
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.
3 files reviewed, no comments
… kj/joint_jerk_action