1
- """example of simple chaos machine
2
- Simple Chaos Machine refers to computational model that demonstrates chaotic behavior.
3
- It takes input values, applies a chaotic transformation using control theory principles, and generates
4
- unpredictable output ( meaning small changes in input lead to drastically different outputs over time),"""
1
+ """ example of simple chaos machine
2
+ Simple Chaos Machine refers to computational model
3
+ that demonstrates chaotic behavior. It takes input values,
4
+ applies a chaotic transformation using control theory
5
+ principles, and generates unpredictable output ( meaning
6
+ small changes in input lead to drastically different outputs
7
+ over time),"""
5
8
6
9
""" Chaos Machine (K, t, m)
7
10
K --> Initial values for the buffer space.
12
15
t = 3
13
16
m = 5
14
17
15
- # Buffer Space (with Parameters Space) --> Stores values undergoing chaotic transformation.
18
+ # Buffer Space (with Parameters Space)
19
+ # --> Stores values undergoing chaotic transformation.
16
20
buffer_space : list [float ] = []
17
21
18
22
# Stores parameters controlling the transformation.
19
23
params_space : list [float ] = []
20
24
21
- # Machine Time --> Keeps track of execution time.
25
+ # Machine Time
26
+ # --> Keeps track of execution time.
22
27
machine_time = 0
23
28
24
- """The push() function updates the buffer_space and params_space by applying chaotic transformations
25
- based on control theory. It modifies all values in the buffer_space using an orbit change and trajectory change formula,
26
- which ensure values to stay within controlled chaotic limits. Finally, it increments machine_time."""
29
+ """The push() function updates the buffer_space and
30
+ params_space by applying chaotic transformations
31
+ based on control theory. It modifies all values in the
32
+ buffer_space using an orbit change and trajectory
33
+ change formula, which ensure values to stay within
34
+ controlled chaotic limits. Finally, it increments
35
+ machine_time."""
27
36
def push (seed ):
28
37
global buffer_space , params_space , machine_time , K , m , t
29
38
@@ -50,9 +59,13 @@ def push(seed):
50
59
machine_time += 1
51
60
52
61
53
- """The pull() function generates a chaotic pseudo-random number using a logistic map transformation
54
- and the Xorshift algorithm. It updates buffer_space and params_space over multiple iterations, ensuring chaotic evolution.
55
- Finally, it selects two chaotic values, applies Xorshift, and returns a 32-bit random number."""
62
+ """The pull() function generates a chaotic pseudo-random
63
+ number using a logistic map transformation and the
64
+ Xorshift algorithm. It updates buffer_space and params_space
65
+ over multiple iterations, ensuring chaotic evolution. Finally,
66
+ it selects two chaotic values, applies Xorshift, and returns a
67
+ 32-bit random number."""
68
+
56
69
def pull ():
57
70
global buffer_space , params_space , machine_time , K , m , t
58
71
0 commit comments