Skip to content

Random seed in agents functions #1088

Closed Answered by Robadob
daniele-baccega asked this question in Q&A
Discussion options

You must be logged in to vote

No.

Random state is per-thread, rather than per-agent within FLAMEGPU, therefore a thread's random state is not attached to a single agent unless a model only has 1 agent type, with 1 state and a fixed number of agents which are never sorted (e.g. not using spatial messaging).

If implementing a model in C/C++ you could implement per-agent random state/generation manually, by having curand states stored behind a __device__ global array accessed with an agent's unique ID.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by daniele-baccega
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants