Skip to content

Mikarina13/Protocell.sim.v3

Repository files navigation

Protocell Evolution Simulation Platform

An advanced protocell evolution simulation platform that enables interactive and data-driven exploration of complex biological system dynamics through sophisticated modeling and visualization tools.

🔬 Overview

This simulation models the evolution of protocells within a customizable environment, visualizing their behaviors and patterns through dynamic charts. Users can monitor resource levels and population dynamics in real-time while exploring different evolutionary conditions.

🚀 Features

  • Interactive Streamlit Interface: Real-time monitoring and parameter adjustment
  • Mathematical Constants Integration:
    • Pi-based 31-step resource cycles
    • √2 pulse scaling (capped at 5x) for resource variability
    • Golden ratio (φ) influenced pattern stability bonuses
  • Advanced Resource Management:
    • Dynamic allocation with 5x boost for critically low populations
    • Increased regeneration rate (15 units/step)
    • Periodic resource pulses for environmental challenges
  • Optimized Protocell Parameters:
    • Reduced maintenance costs (~45% reduction to 0.0225)
    • Enhanced energy acquisition rate (0.25)
    • φ-based division threshold (≈80.9 units)
  • AI-Powered Scenario Generation: Automatic exploration of different evolutionary conditions
  • Pattern Analysis: Reaction-diffusion patterns that influence protocell behavior
  • Data Export Capabilities: Comprehensive analysis and monitoring features

🛠️ Technologies

  • Python for core simulation logic
  • Streamlit for interactive web interface
  • NumPy/Pandas for data processing
  • Matplotlib for visualization
  • PostgreSQL for data persistence
  • Advanced mathematical modeling with constants integration

📊 Key Optimizations (Latest Updates)

Resource System

  • Base regeneration: 15 units/step (increased from 10)
  • Resource cap: 100 units
  • Dynamic population-based allocation with emergency 5x boost
  • Pi-based 31-step resource cycles with sinusoidal variation

Energy Management

  • Maintenance cost reduction: 25% decrease (0.03 → 0.0225)
  • Enhanced φ-based pattern bonuses with reduced distance penalty
  • Energy acquisition rate: 0.25 (25% conversion rate)
  • Adaptive energy conservation during low-energy states

Pattern Diversity

  • Enhanced φ-based stability bonuses with 50% increased impact
  • Special bonuses for rare patterns (spots: +15%, mazes: +5%)
  • Reduced penalty for patterns near golden ratio stability
  • Stronger selection pressure for diverse, stable patterns

🎯 Monitoring Goals

The simulation aims to maintain:

  • Population Stability: Near 30 protocells (preventing drops to ~13)
  • Energy Levels: Above 30 units average (improved from ~21-22)
  • Pattern Diversity: Encouraging spots, stripes, and mazes over "unknown"
  • Resource Cycles: Effective 31-step Pi-based periodicity

🔧 Quick Start

  1. Start the Streamlit application:

    streamlit run app.py --server.port 5000
  2. Use Manual Setup with default settings:

    • Initial Population: 30 protocells
    • Maximum Steps: 150 steps (for initial testing)
    • All optimizations are pre-configured
  3. Monitor key metrics at steps: 0, 31, 62, 100, 150

📁 Project Structure

├── app.py                    # Main Streamlit application
├── environment.py            # Environment and resource management
├── protocell.py             # Protocell class with evolution logic
├── simulation.py            # Core simulation engine
├── reaction_diffusion.py    # Pattern analysis and generation
├── visualization.py         # Plotting and data visualization
├── database.py              # PostgreSQL integration
├── ai_scenario_generator.py # AI-powered scenario creation
├── environment_presets.py   # Pre-configured environments
├── utils.py                 # Utility functions
└── data/                    # Simulation data and exports

🧬 Research Applications

This platform is designed for protocell evolution research with applications in:

  • Studying emergent biological patterns
  • Testing evolutionary hypotheses
  • Exploring resource competition dynamics
  • Analyzing pattern stability and diversity
  • Understanding mathematical constants in biological systems

📈 Performance Targets

Based on recent optimizations, simulations should achieve:

  • Population maintenance above 20 protocells
  • Average energy levels above 30 units
  • Resource levels sustained above 20-30 units
  • Diverse pattern distribution with reduced "unknown" patterns

🔄 Latest Updates (March 2025)

  • Implemented team-requested optimizations for resource regeneration
  • Enhanced φ-based pattern selection mechanisms
  • Reduced maintenance costs for improved energy sustainability
  • Set optimal default parameters for immediate simulation starts
  • Integrated mathematical constants for more realistic biological modeling

📊 Monitoring Protocol

For optimal results, track these metrics at key simulation steps:

  • Step 0: Initial conditions baseline
  • Step 31: First Pi-cycle completion
  • Step 62: Second cycle analysis
  • Step 100: Mid-simulation assessment
  • Step 150: Short-term outcome evaluation

This simulation platform represents cutting-edge research in computational biology and artificial life systems.

Releases

No releases published

Packages

 
 
 

Contributors