Right now if the grid is too big and the RAM too small, the simulation won't work, as the offsets can't be precomputed and stored. Should there be a fallback, that a search alternatively is initiated for every node that is simulated, which will increase simulation time massively, but works when no big RAM is available. Or we could cap the radius of precomputed offsets, or take a hybrid approach. We only need to search large areas of the grid for the nearest neighbors, if it has a low density of already informed points. If 1% or so is already filled in, a capped radius in combination with the random simulation path I think would suffice.
Right now if the grid is too big and the RAM too small, the simulation won't work, as the offsets can't be precomputed and stored. Should there be a fallback, that a search alternatively is initiated for every node that is simulated, which will increase simulation time massively, but works when no big RAM is available. Or we could cap the radius of precomputed offsets, or take a hybrid approach. We only need to search large areas of the grid for the nearest neighbors, if it has a low density of already informed points. If 1% or so is already filled in, a capped radius in combination with the random simulation path I think would suffice.