-
Notifications
You must be signed in to change notification settings - Fork 0
LLM Version #32
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
base: main
Are you sure you want to change the base?
LLM Version #32
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Pull Request Overview
This PR adds support for custom agent positioning and angle initialization, along with enhanced visualization capabilities for multiple agents. The changes enable users to specify custom starting positions and angles for agents instead of relying solely on random or default positioning.
- Custom agent positioning and angle support through new optional parameters
- Enhanced visualization to handle multiple agents with partition visualization
- Configuration updates to simplify curriculum levels for LLM integration
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 7 comments.
Show a summary per file
File | Description |
---|---|
terra/viz/main_manual.py | Adds custom position and angle parameters to environment reset |
terra/viz/game/game.py | Implements multi-agent visualization with partition support and agent configuration handling |
terra/state.py | Adds custom position and angle parameters to State creation methods |
terra/env.py | Updates environment reset to support custom positioning parameters |
terra/config.py | Simplifies curriculum configuration to focus on foundations maps |
terra/agent.py | Implements comprehensive custom positioning logic with validation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
def use_custom_position(k): | ||
# Create position based on custom args or defaults | ||
temp_pos = IntMap(jnp.array(custom_pos)) if custom_pos is not None else IntMap(jnp.array([-1, -1])) | ||
temp_angle = jnp.full((1,), custom_angle, dtype=IntMap) if custom_angle is not None else jnp.full((1,), -1, dtype=IntMap) |
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.
The sentinel value -1 for unset angle should be defined as a constant to improve code clarity.
temp_angle = jnp.full((1,), custom_angle, dtype=IntMap) if custom_angle is not None else jnp.full((1,), -1, dtype=IntMap) | |
temp_angle = jnp.full((1,), custom_angle, dtype=IntMap) if custom_angle is not None else jnp.full((1,), UNSET_ANGLE, dtype=IntMap) |
Copilot uses AI. Check for mistakes.
@@ -82,6 +143,58 @@ def new( | |||
return Agent(agent_state=agent_state, width=width, height=height, moving_dumped_dirt=moving_dumped_dirt), key | |||
|
|||
|
|||
def _validate_agent_position( |
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.
The function docstring should document the expected types and ranges for the parameters, particularly the Array types and what constitutes valid position/angle values.
Copilot uses AI. Check for mistakes.
This PR includes the following:
The executables
and
should work as before