Skip to contents

Creates random starting positions for walkers, avoiding the center pixel and any black pixels.

Usage

generate_walker_positions(n_walkers, grid, avoid_black = TRUE)

Arguments

n_walkers

Integer. Number of walkers to create.

grid

Numeric matrix. The simulation grid.

avoid_black

Logical. If TRUE, avoids placing walkers on black pixels.

Value

A list of integer vectors, each of length 2 (row, col).

Examples

grid <- initialize_grid(10)
#> INFO [2026-02-03 16:36:04] Initializing grid of size 10x10
positions <- generate_walker_positions(5, grid)