Skip to content

Conversation

@daveey
Copy link
Contributor

@daveey daveey commented Dec 25, 2025

TL;DR

Added an observer_agent_id parameter to the obs_features() method to support agent-specific observations.

What changed?

  • Modified the GridObject::obs_features() virtual method to accept an optional observer_agent_id parameter (defaulting to UINT_MAX to indicate no specific observer)
  • Added documentation explaining that this parameter is used by Assembler to report agent-specific cooldowns
  • Updated all derived class implementations of obs_features() to include the new parameter
  • Added (void)observer_agent_id to implementations that don't use the parameter to prevent unused variable warnings
  • Included <climits> header to support the UINT_MAX constant

How to test?

  • Verify that all existing code using obs_features() continues to work without changes
  • Create a test case where an Assembler reports different cooldown values to different agents
  • Ensure that agent-specific observations are correctly generated when the parameter is used

Why make this change?

This change enables objects to provide different observation features depending on which agent is observing them. This is particularly useful for Assemblers that need to report agent-specific cooldown information, allowing for more personalized and accurate observations in the grid environment.

Copy link
Contributor Author

daveey commented Dec 25, 2025

@daveey daveey changed the title Add observer_agent_id parameter to obs_features Add observer_agent_id parameter to obs_features for agent-specific observations Dec 25, 2025
@openhands-ai
Copy link

openhands-ai bot commented Dec 25, 2025

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • Test and Benchmark

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #4539 at branch `daveey-observer-obs`

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants