Evolution + Heuristics#1
Conversation
More development into evolutionary operators such as deterministic crowding, island distributions, and more fitness metrics such as 2d images from morphogen gradients, entropy maximization, and frequency fitting. Also added entropy metrics and fourier decomposition of chemical kinetics in editor window
| def series_entropy(series, decimals = 0): | ||
| p = np.unique(np.round(series, decimals=decimals), return_counts=True)[1] / series.size | ||
| entr = (-p*np.log(p)).sum() | ||
| return entr |
There was a problem hiding this comment.
The new series_entropy function shadows the renamed symbol_entropy function (line 101), but code in Display.py (line 247) and GRN_analysis.py (line 528) still calls series_entropy expecting the symbol-based entropy calculation. The new function computes a different type of entropy (continuous data entropy) which will produce incorrect results for symbol sequences.
Impact: Heuristics and analysis will return wrong entropy values, breaking the evolutionary fitness calculations.
Spotted by Graphite Agent
Is this helpful? React 👍 or 👎 to let us know.
| if index >= self.gene_volume: | ||
| return | ||
| if random() < rate: | ||
| self.gene_volume -= 1 | ||
| del self.gene_strings[index] |
There was a problem hiding this comment.
The delete_gene method modifies the list while potentially iterating over it in the caller (line 524-526). When a gene is deleted at index i, all subsequent indices shift, but the loop continues with the next index, potentially skipping genes or causing index out of bounds errors.
Fix: Iterate in reverse order or collect indices to delete first:
def mutate_genome(self, mutation_rate, dup_rate, del_rate):
for i in range(self.gene_volume):
self.mutate_gene(i, mutation_rate)
for i in range(self.gene_volume):
self.duplicate_gene(i, dup_rate)
# Iterate in reverse to avoid index shifting issues
for i in range(self.gene_volume - 1, -1, -1):
if self.gene_volume > self.signal_vol + self.target_vol:
self.delete_gene(i, del_rate)
return selfSpotted by Graphite Agent
Is this helpful? React 👍 or 👎 to let us know.

Evolution + Heuristics
More development into evolutionary operators such as deterministic crowding, island distributions, and more fitness metrics such as 2d images from morphogen gradients, entropy maximization, and frequency fitting. Also added entropy metrics and fourier decomposition of chemical kinetics in editor window
Add activity feed API