Compact Drive agent storage - #578
Draft
vcharraut wants to merge 12 commits into
Draft
Conversation
- Updated references from `active_agent_count` and `active_agent_indices` to `num_agents` and direct indexing in various functions to streamline agent management. - Adjusted logic in rendering and observation functions to accommodate the new agent indexing scheme. - Modified tests to reflect changes in agent handling, ensuring consistency across the codebase. - Improved clarity and maintainability by reducing reliance on active agent tracking and simplifying loops and conditions related to agent processing.
vcharraut
marked this pull request as ready for review
August 28, 2026 12:38
…ts for consistency
Victorbares
reviewed
Aug 28, 2026
| agent->controller = resolve_agent_controller(env, i, 1, 0); | ||
| if (env->goal_source == GOAL_SOURCE_MAP) { | ||
| if (!generate_new_goals_from_map(env, agent)) { | ||
| fprintf(stderr, "[GIGAFLOW WARNING] -> Failed to generate map goals for agent %d\n", agent->id); |
Collaborator
There was a problem hiding this comment.
Add the map_id to this error ?
|
|
||
| env->timestep = env->init_step; | ||
|
|
||
| begin_episode_rng(env); |
Collaborator
There was a problem hiding this comment.
I think remove begin_episode_rng() makes env->episode_seed not correct anymore after a reset
| int womd_track_idx = env->tracks_to_predict[i]; | ||
| for (int i = 0; i < env->num_agents; i++) { | ||
| int agent_idx = i; | ||
| int womd_track_idx = env->agents[agent_idx].id; |
Collaborator
There was a problem hiding this comment.
Are all active agent, track to predict agent ?
vcharraut
marked this pull request as draft
September 3, 2026 12:40
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.
What
num_max_agentsand distinguish controllablenum_agentsfrom totalnum_sim_agents.initnow only loads map, andresethandles episode setup (agents' position, goals, traffic light states, etc) (issue Gigaflow reset: agents keep init positions between resamples; resample forces sync resets #540)Why
Agent bookkeeping used several parallel index arrays and overlapping count fields. Contiguous storage makes ownership and iteration order explicit, reduces indirection, and gives capacity handling one consistent source of truth.