simulation: added TODO regarding choosing neighbours for p2

This commit is contained in:
2026-03-10 22:21:43 +00:00
parent fabd593eff
commit 0e1229569a

View File

@@ -31,6 +31,9 @@ void thread_pick(struct ThreadState *state)
{
continue;
}
// TODO: Instead of picking a RANDOM p2, why not choose a neighbour of p1?
// This way programs that are likely to replicate are replicating closer to
// themselves, and thus have a higher chance of further replication.
u64 p2 = rand() % (SIMULATION_SIZE / SIZEOF_PROGRAM);
while (p1 * 8 <= ((p2 * 8) + SIZEOF_PROGRAM) &&
p2 * 8 <= ((p1 * 8) + SIZEOF_PROGRAM))