()
| 40 | |
| 41 | |
| 42 | def pull(): |
| 43 | global buffer_space, params_space, machine_time, K, m, t |
| 44 | |
| 45 | # PRNG (Xorshift by George Marsaglia) |
| 46 | def xorshift(x, y): |
| 47 | x ^= y >> 13 |
| 48 | y ^= x << 17 |
| 49 | x ^= y >> 5 |
| 50 | return x |
| 51 | |
| 52 | # Choosing Dynamical Systems (Increment) |
| 53 | key = machine_time % m |
| 54 | |
| 55 | # Evolution (Time Length) |
| 56 | for _ in range(t): |
| 57 | # Variables (Position + Parameters) |
| 58 | r = params_space[key] |
| 59 | value = buffer_space[key] |
| 60 | |
| 61 | # Modification (Transition Function) - Flow |
| 62 | buffer_space[key] = round(float(r * value * (1 - value)), 10) |
| 63 | params_space[key] = (machine_time * 0.01 + r * 1.01) % 1 + 3 |
| 64 | |
| 65 | # Choosing Chaotic Data |
| 66 | x = int(buffer_space[(key + 2) % m] * (10**10)) |
| 67 | y = int(buffer_space[(key - 2) % m] * (10**10)) |
| 68 | |
| 69 | # Machine Time |
| 70 | machine_time += 1 |
| 71 | |
| 72 | return xorshift(x, y) % 0xFFFFFFFF |
| 73 | |
| 74 | |
| 75 | def reset(): |
no test coverage detected