Skip to content

Commit 207951d

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 7520f65 commit 207951d

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

hashes/chaos_machine.py

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""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),"""
55

66
""" Chaos Machine (K, t, m)
77
K --> Initial values for the buffer space.
@@ -22,8 +22,10 @@
2222
machine_time = 0
2323

2424
"""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,
2626
which ensure values to stay within controlled chaotic limits. Finally, it increments machine_time."""
27+
28+
2729
def push(seed):
2830
global buffer_space, params_space, machine_time, K, m, t
2931

@@ -50,9 +52,11 @@ def push(seed):
5052
machine_time += 1
5153

5254

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.
5557
Finally, it selects two chaotic values, applies Xorshift, and returns a 32-bit random number."""
58+
59+
5660
def pull():
5761
global buffer_space, params_space, machine_time, K, m, t
5862

@@ -113,4 +117,4 @@ def reset():
113117
print(f"{format(pull(), '#04x')}")
114118
print(buffer_space)
115119
print(params_space)
116-
inp = input("(e)exit? ").strip()
120+
inp = input("(e)exit? ").strip()

0 commit comments

Comments
 (0)