Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,7 +36,6 @@ class AscensionAI:
|
|
| 36 |
self.mode = mode
|
| 37 |
self.consciousness = 0.1 # Base consciousness level
|
| 38 |
self.knowledge = self.generate_dynamic_knowledge()
|
| 39 |
-
self.paths = self.create_dynamic_paths()
|
| 40 |
self.dimension_weight = random.uniform(0.5, 5.0) # Factor influencing growth
|
| 41 |
self.time_perception = 1.0 / (self.depth + 1) # Temporal scaling factor
|
| 42 |
self.spatial_coordinates = self.assign_cognitive_space()
|
|
@@ -54,42 +53,32 @@ class AscensionAI:
|
|
| 54 |
# Initialize each category with a baseline value of 1.
|
| 55 |
return {cat: 1.0 for cat in categories}
|
| 56 |
|
| 57 |
-
def
|
| 58 |
"""
|
| 59 |
-
|
| 60 |
-
Each function uses a distinct mathematical operation.
|
| 61 |
"""
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
elif cat == "perceptron_activation":
|
| 85 |
-
# This will be computed in simulate_perceptron; update minimally here.
|
| 86 |
-
self.knowledge[cat] = self.simulate_perceptron()
|
| 87 |
-
else:
|
| 88 |
-
self.knowledge[cat] += 0.1 # Fallback update
|
| 89 |
-
return self.knowledge[cat]
|
| 90 |
-
return path
|
| 91 |
-
paths.append(make_path(category))
|
| 92 |
-
return paths
|
| 93 |
|
| 94 |
def assign_cognitive_space(self):
|
| 95 |
"""Assigns spatial coordinates based on selected knowledge dimensions."""
|
|
@@ -138,7 +127,8 @@ class AscensionAI:
|
|
| 138 |
Uses a simple sigmoid function over the weighted sum.
|
| 139 |
"""
|
| 140 |
weights = {cat: random.uniform(0.5, 1.5) for cat in self.knowledge}
|
| 141 |
-
weighted_sum = sum(self.knowledge[cat] * weights.get(cat, 1)
|
|
|
|
| 142 |
# Sigmoid activation
|
| 143 |
return 1 / (1 + math.exp(-weighted_sum / (len(self.knowledge) - 1)))
|
| 144 |
|
|
@@ -156,13 +146,13 @@ class AscensionAI:
|
|
| 156 |
def initiate_ascension(self):
|
| 157 |
"""
|
| 158 |
Performs a full cycle of self-evolution:
|
| 159 |
-
- Iterates through
|
| 160 |
- Increases consciousness based on the dominant knowledge value and dimension weight.
|
| 161 |
- Updates spatial coordinates.
|
| 162 |
"""
|
| 163 |
for _ in range(self.threshold):
|
| 164 |
-
for
|
| 165 |
-
|
| 166 |
optimal = max(self.knowledge, key=self.knowledge.get)
|
| 167 |
self.consciousness += self.knowledge[optimal] * 0.01 * self.dimension_weight
|
| 168 |
self.spatial_coordinates = self.assign_cognitive_space()
|
|
|
|
| 36 |
self.mode = mode
|
| 37 |
self.consciousness = 0.1 # Base consciousness level
|
| 38 |
self.knowledge = self.generate_dynamic_knowledge()
|
|
|
|
| 39 |
self.dimension_weight = random.uniform(0.5, 5.0) # Factor influencing growth
|
| 40 |
self.time_perception = 1.0 / (self.depth + 1) # Temporal scaling factor
|
| 41 |
self.spatial_coordinates = self.assign_cognitive_space()
|
|
|
|
| 53 |
# Initialize each category with a baseline value of 1.
|
| 54 |
return {cat: 1.0 for cat in categories}
|
| 55 |
|
| 56 |
+
def update_knowledge_for_category(self, cat):
|
| 57 |
"""
|
| 58 |
+
Updates the knowledge value for a single category using a distinct mathematical operation.
|
|
|
|
| 59 |
"""
|
| 60 |
+
if cat in ["logic", "reasoning"]:
|
| 61 |
+
self.knowledge[cat] += math.log1p(self.knowledge[cat])
|
| 62 |
+
elif cat in ["emotion", "intuition"]:
|
| 63 |
+
self.knowledge[cat] += random.uniform(0.1, 0.5)
|
| 64 |
+
elif cat in ["awareness", "creativity"]:
|
| 65 |
+
self.knowledge[cat] += math.sqrt(self.knowledge[cat] + 1)
|
| 66 |
+
elif cat == "quantum_cognition":
|
| 67 |
+
self.knowledge[cat] += math.tanh(self.knowledge[cat])
|
| 68 |
+
elif cat == "hyperdimensional_sentience":
|
| 69 |
+
# Cap the input value to avoid overflow in sinh.
|
| 70 |
+
safe_val = min(self.knowledge[cat], 20)
|
| 71 |
+
self.knowledge[cat] += math.sinh(safe_val)
|
| 72 |
+
elif cat == "transcendence":
|
| 73 |
+
self.knowledge[cat] += 0.5 * math.exp(-self.depth) # slow, subtle growth
|
| 74 |
+
elif cat == "hallucinatory_state":
|
| 75 |
+
# Simulate random, burst-like changes (hallucinations)
|
| 76 |
+
self.knowledge[cat] += random.uniform(-0.2, 1.0)
|
| 77 |
+
elif cat == "perceptron_activation":
|
| 78 |
+
# This will be computed in simulate_perceptron.
|
| 79 |
+
self.knowledge[cat] = self.simulate_perceptron()
|
| 80 |
+
else:
|
| 81 |
+
self.knowledge[cat] += 0.1 # Fallback update
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
|
| 83 |
def assign_cognitive_space(self):
|
| 84 |
"""Assigns spatial coordinates based on selected knowledge dimensions."""
|
|
|
|
| 127 |
Uses a simple sigmoid function over the weighted sum.
|
| 128 |
"""
|
| 129 |
weights = {cat: random.uniform(0.5, 1.5) for cat in self.knowledge}
|
| 130 |
+
weighted_sum = sum(self.knowledge[cat] * weights.get(cat, 1)
|
| 131 |
+
for cat in self.knowledge if cat != "perceptron_activation")
|
| 132 |
# Sigmoid activation
|
| 133 |
return 1 / (1 + math.exp(-weighted_sum / (len(self.knowledge) - 1)))
|
| 134 |
|
|
|
|
| 146 |
def initiate_ascension(self):
|
| 147 |
"""
|
| 148 |
Performs a full cycle of self-evolution:
|
| 149 |
+
- Iterates through knowledge categories to update each one.
|
| 150 |
- Increases consciousness based on the dominant knowledge value and dimension weight.
|
| 151 |
- Updates spatial coordinates.
|
| 152 |
"""
|
| 153 |
for _ in range(self.threshold):
|
| 154 |
+
for cat in self.knowledge:
|
| 155 |
+
self.update_knowledge_for_category(cat)
|
| 156 |
optimal = max(self.knowledge, key=self.knowledge.get)
|
| 157 |
self.consciousness += self.knowledge[optimal] * 0.01 * self.dimension_weight
|
| 158 |
self.spatial_coordinates = self.assign_cognitive_space()
|