Skip to content

Add DroneEnv environment#10

Open
jameswniu wants to merge 1 commit into
mainfrom
codex/create-droneenv-class-in-gym.env
Open

Add DroneEnv environment#10
jameswniu wants to merge 1 commit into
mainfrom
codex/create-droneenv-class-in-gym.env

Conversation

@jameswniu

Copy link
Copy Markdown
Owner

Summary

  • introduce DroneEnv gym environment with configurable grid, action/observation spaces, and integrity validation
  • expose DroneEnv via env package

Testing

  • PYTHONPATH=src pytest (fails: ModuleNotFoundError: No module named 'numpy')

https://chatgpt.com/codex/tasks/task_e_68beb2fea844832b8301bda59c53e04d

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment thread src/env/drone_env.py
Comment on lines +39 to +45
# Observation: [x, y, goal_x, goal_y, steps_remaining]
self.observation_space = spaces.Box(
low=0.0,
high=float(self.grid_size),
shape=(5,),
dtype=np.float32,
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Define observation bounds for steps_remaining

The observation space uses spaces.Box(low=0.0, high=float(self.grid_size), shape=(5,), dtype=np.float32), which applies the grid size as the upper bound to all five features. However _get_obs() returns steps_remaining = self.max_steps - self.steps as the last element, and max_steps defaults to 100 while grid_size defaults to 10. In any normal run steps_remaining will be >10, so the validator reports an observation drift on every step and tests/test_env_integrity_validator_clean_run will fail. The space needs per‑component bounds (e.g., separate high for the step counter) so that valid states are considered in-range.

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant