It can, however, generate outputs that are indistinguishable from those generated by non-deterministic processes. To mimic randomness (and hence indeterminancy), NetLogo uses a pseudorandom number generator to output a sequence of "statistically" random numbers which is then used to determine the order of agents called or whenever the appearance of non-determinism is needed. Statistically random in this case means that the sequence appears random in that the next number in the sequence cannot be accurately predicted, no matter how many previous numbers are known. Additionally, each single digit appears in the sequence with the same frequency as all others (in a binary sequence, 1's and 0's have a frequency of about 50%). Similarly, the frequency of pairs of digits are the same for others, and so on (00's, 01's, 10's, and 11's have a frequency of about 25%). The sequence is not truly random but is rather pseudorandom because using the same seed in the algorithm will always yield the same sequence.It appears that including any call to native code in my NetLogo monitor causes NetLogo to crash with a malloc: Heap corruption detected error (see full trace below). It is unclear whether this is a result of the monitor code calling the native code too often for Java/JNI to be able to handle, or something to do with how I have coded it, but the problem does seem to be related to the monitor.
0 Comments
Leave a Reply. |