Skip to content

Update agents.py - #1293

Closed
Moreauju wants to merge 1 commit into
aimacode:masterfrom
Moreauju:patch-2
Closed

Moreauju wants to merge 1 commit into
aimacode:masterfrom
Moreauju:patch-2

Conversation

@Moreauju

Copy link
Copy Markdown

No description provided.

weasdown added a commit to weasdown/aima-python that referenced this pull request Feb 5, 2025
@dmeoli

dmeoli commented Jun 26, 2026

Copy link
Copy Markdown
Member

Thanks @Moreauju. This targets the same XYEnvironment off-by-one that has since been fixed at the source in #1303: the default bounds are now (width-1, height-1), so is_inbounds is already correct as written. Applying an extra -1 here on top of that fix would double-correct and drop the last row/column (valid range would become [0, width-2]). #1303 also fixes random_location_inbounds, which this patch didn't cover. Closing as superseded by #1303 - thanks for spotting the issue!

@dmeoli dmeoli closed this Jun 26, 2026
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