Open flee598 opened 2 days ago
Right, yeah this is a bug. It must have crept in somewhere during the transition to v6, as it required a lot of refactoring. The reason this bug exists is because we haven't tested this particular function in the test suite.
If you would like to have a crack at fixing the bug via a Pull Request, it would be appreciated. From the error messages we just have to make sure offsets_within_radius_no_0(::GridSpace{2, true}, ::Tuple{Int64, Int64})
works.
I had a look at the code, but it is a little over my head. I'm new to Julia and Agents, and I am not confident I could fix the bug without creating more issues.
I'm trying to return
nearby_positions()
of an agent, searching different distances for each of the dimensions in my GridSpace. When I changer = 3
tor = (1, 3)
I get an error. I also get an error withnearby_ids()
.Minimal Working Example
nearby_positions()
error:ERROR: MethodError: no method matching offsets_within_radius_no_0(::GridSpace{2, true}, ::Tuple{Int64, Int64})
nearby_ids()
error:ERROR: MethodError: no method matching bound_range(::UnitRange{Int64}, ::Int64, ::GridSpace{2, true})
Agents.jl version 6.0.16 Julia version 1.10.4