Fixed Agent Counts to align with gigaflow feature set#288
Conversation
…nd removed everything else to prevent redundencies
Greptile OverviewGreptile SummaryRefactored agent counting system by consolidating redundant variables into clearer names: Key changes:
Issues found:
Confidence Score: 2/5
Important Files Changed
|
Additional Comments (1)
|
There was a problem hiding this comment.
Pull request overview
This pull request refactors the agent counting system in the drive simulation to align with the gigaflow feature set. It removes the max_controlled_agents parameter and consolidates agent counts into three clear categories: num_agents (max controlled agents), max_agents_in_sim (max agents in simulation), and num_created_agents (actual agents created).
Changes:
- Removed
max_controlled_agentsparameter from Python, C binding, and C header files - Renamed agent count variables for clarity:
num_actors→num_created_agents,num_max_agents→max_agents_in_sim - Increased MAX_AGENTS constant from 32 to 64
- Replaced stack arrays with dynamic allocation in
set_active_agents()function
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pufferlib/ocean/drive/drive.py | Removed max_controlled_agents parameter from __init__ signature and all binding.env_init() calls |
| pufferlib/ocean/drive/drive.h | Renamed agent count struct fields, updated MAX_AGENTS to 64, changed stack arrays to malloc'd arrays in set_active_agents(), added clarifying comments |
| pufferlib/ocean/drive/binding.c | Removed extraction of max_controlled_agents from kwargs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Changed counts to max supported by sim, max_controlled, num_created and removed everything else to prevent redundencies