1
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),"""
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),"""
5
5
6
6
""" Chaos Machine (K, t, m)
7
7
K --> Initial values for the buffer space.
22
22
machine_time = 0
23
23
24
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,
25
+ based on control theory. It modifies all values in the buffer_space using an orbit change and trajectory change formula,
26
26
which ensure values to stay within controlled chaotic limits. Finally, it increments machine_time."""
27
+
28
+
27
29
def push (seed ):
28
30
global buffer_space , params_space , machine_time , K , m , t
29
31
@@ -50,9 +52,11 @@ def push(seed):
50
52
machine_time += 1
51
53
52
54
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
+ """The pull() function generates a chaotic pseudo-random number using a logistic map transformation
56
+ and the Xorshift algorithm. It updates buffer_space and params_space over multiple iterations, ensuring chaotic evolution.
55
57
Finally, it selects two chaotic values, applies Xorshift, and returns a 32-bit random number."""
58
+
59
+
56
60
def pull ():
57
61
global buffer_space , params_space , machine_time , K , m , t
58
62
@@ -113,4 +117,4 @@ def reset():
113
117
print (f"{ format (pull (), '#04x' )} " )
114
118
print (buffer_space )
115
119
print (params_space )
116
- inp = input ("(e)exit? " ).strip ()
120
+ inp = input ("(e)exit? " ).strip ()
0 commit comments