Skip to content

Instantly share code, notes, and snippets.

@MX-2000
Created March 26, 2025 11:00
Show Gist options
  • Save MX-2000/0df6e03c35a6c80bc2c490ff82932a82 to your computer and use it in GitHub Desktop.
Save MX-2000/0df6e03c35a6c80bc2c490ff82932a82 to your computer and use it in GitHub Desktop.
void c_step(CCpr *env) {
memset(env->rewards, 0, env->num_agents * sizeof(float));
memset(env->interactive_food_agent_count, 0,
(env->width * env->height + 7) / 8);
for (int i = 0; i < env->num_agents; i++) {
step_agent(env, i);
}
spawn_foods(env);
compute_observations(env);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment