Run Walker Until Termination (Worker Task)
worker_run_walker.RdExecutes a complete walker simulation until termination. This is the function pushed to crew workers as a task.
Usage
worker_run_walker(
walker,
grid_state,
pub_address = NULL,
neighborhood = "4-hood",
boundary = "terminate",
max_steps = 10000L
)Details
This function represents a complete worker task:
Initialize worker (create subscriber socket, cache)
Step walker repeatedly until termination
Clean up worker resources
Return final walker state
The worker maintains a local cache of black pixels and subscribes to updates from the main process. This allows independent execution while staying reasonably synchronized with the global grid state.
Examples
if (FALSE) { # \dontrun{
# This function is called by crew workers, not directly by users
# Controller pushes this task:
controller$push(
command = worker_run_walker(walker, grid_state, pub_address, ...),
data = list(walker = walker, grid_state = grid_state, ...)
)
} # }