Dilraj07

Results issues of Dilraj07

### Describe the bug Following PR #3853 and PR #3860 which added float fraction validation in `select()`, negative integers and boolean inputs are still not validated in `AbstractAgentSet.select()` and `CellCollection.select()`....

bug

### Summary In `Grid.__init__`, Mesa automatically creates a built-in `"empty"` property layer (`self.create_property_layer("empty", default_value=True, dtype=bool)`). This internal layer backs `grid.empty`, `cell.empty`, and the fallback coordinate selection in `grid.select_random_empty_cell()`. While `_attach_property_layer()`...

bug

### Bug Description In `mesa.discrete_space.VoronoiGrid`, `self._kdtree` is constructed once during `__init__` from the initial centroids. When a cell is dynamically removed using `remove_cell(cell)` (inherited from `DiscreteSpace`), the cell is removed...

bug

### Bug Description In `_HardKeyAgentSet` (which backs `model.agents` and `model.agents_by_type[...]`), views returned to the user must be downgraded to standard `AgentSet` (which uses weak references via `WeakKeyDictionary`) when `inplace=False` to...

bug

### Pre-PR Checklist - [x] This is a bug report, not a feature request or discussion. ### Summary Attempting to move an unplaced moving agent (`CellAgent`, `Grid2DMovingAgent`, or `HexGridMovingAgent`) crashes...

bug
enhancement

**What's the problem this feature will solve?** `_HardKeyAgentSet` implements `.copy()` and `.__copy__()` which safely return a standard `AgentSet` (weak references): ```python # mesa/agentset.py:930 def copy(self) -> AgentSet[A]: """Return a shallow...

docs

### Describe the bug In Mesa, `agent.remove()` is expected to be idempotent across agent classes: calling `remove()` once deletes the agent from the model and space, while subsequent calls safely...

bug

### Describe the bug `AgentSet` and `_HardKeyAgentSet` inherit from `collections.abc.MutableSet`. In Python, all set operations (`__and__`, `__or__`, `__sub__`, `__xor__`) construct their return value by calling `self._from_iterable(...)`. Because neither `AbstractAgentSet` nor...

bug