1.0.5
BiosimRust v1.0.5
Performance Improvements
- Major parallelization optimization: Replaced inefficient task-per-individual spawning with efficient parallel iterators using
into_par_iter().for_each(). This provides a 2-3x speedup and better CPU utilization, bringing Rust performance much closer to the C++ version. The new implementation uses Rayon's work-stealing scheduler for optimal load distribution across CPU cores.
Features
- Connection deduplication: Implemented automatic deduplication of neural network connections during genome-to-network conversion. Duplicate connections (same source-sink pairs) are now merged by summing their weights and clamping to i16 range. This prevents genomes from growing indefinitely by adding redundant connections, making evolution more biologically realistic. This addresses the issue where genomes could grow by simply duplicating existing connections without functional benefit.
Variable-Length Genome Stability
-
Enhanced fitness normalization: Increased default
fitnesslengthnormalizationfrom0.01to0.03to better prevent selection pressure favoring longer genomes. The normalization formulanormalized_score = score / (1 + beta * genome_length)now applies a stronger penalty for longer genomes. -
Strengthened length penalty weights: Updated genome similarity calculations to use a triple penalty system (30% similarity, 35% relative length ratio, 35% absolute length bonus) instead of the previous 40/30/30 split. This creates stronger selection pressure to maintain genome lengths near the initial value.
Technical Details
- Changed parallelization from
rayon::scopewith individual task spawning tointo_par_iter().for_each()for efficient work-stealing chunking - Updated default
fitness_length_normalizationparameter to0.03in code and config files - Added
deduplicate_connections()function that merges duplicate source-sink pairs during neural network construction - Connection deduplication applies to both Rust and C++ versions for consistency
This release significantly improves simulation speed while enhancing variable-length genome stability and preventing artificial genome growth through redundant connections.