get_agent_sample
Sample random agents from a breed and return selected variables as a markdown table. Specify agent breed, sample size, and attributes to inspect.
Instructions
Return a sample of agents with selected variables as a markdown table.
Filling the gap between get_world_state (aggregates only) and
hand-crafted report calls. Picks N random agents from the named
breed (or all turtles when breed is None) and reports the requested
per-agent attributes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | Number of agents to sample (1-200). When N exceeds the agentset size, every agent is returned. | |
| breed | No | Agentset name, e.g. ``"sheep"``, ``"wolves"``. ``None`` means ``turtles``. Must be a valid NetLogo identifier — letters, digits, ``-``, ``_``, ``.``, ``?``, ``!`` — same rule as ``set_parameter``. | |
| attributes | No | Per-agent variables to report. Each entry must also be a valid NetLogo identifier. Defaults to ``who``, ``xcor``, ``ycor``, ``color``, ``heading``. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |