Skip to content

Potential Bug in _transform_to_neighborhood Function when sight is Smaller than center #35

@LLLLLH76

Description

@LLLLLH76

I’ve been working with the function _transform_to_neighborhood and I think I’ve encountered a potential issue related to how the agent perceives its position when sight is smaller than the center in any dimension.

For instance, if we set:

  • sight = 2
  • center = (3, 3)

It seems that the agent may not correctly observe its absolute position when it's located near or at the center. This might be because the current logic uses min(sight, center[0]), which could cause the agent’s position to be incorrectly transformed when sight is smaller than the center.

I would expect that the function should allow the agent to still observe its position correctly within its local neighborhood, even when the sight is smaller than the center values. It seems like the current logic might not handle this edge case properly.

Is this behavior expected or might this be a bug? Could there be a better way to handle cases where sight is smaller than center? Maybe an adjustment in the logic would help ensure the agent can always observe its position relative to its neighborhood?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions