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?
I’ve been working with the function
_transform_to_neighborhoodand I think I’ve encountered a potential issue related to how the agent perceives its position whensightis smaller than thecenterin any dimension.For instance, if we set:
sight = 2center = (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 usesmin(sight, center[0]), which could cause the agent’s position to be incorrectly transformed whensightis smaller than thecenter.I would expect that the function should allow the agent to still observe its position correctly within its local neighborhood, even when the
sightis smaller than thecentervalues. 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
sightis smaller thancenter? Maybe an adjustment in the logic would help ensure the agent can always observe its position relative to its neighborhood?