DNA Civ v10: Biological Edition RESEARCH READY
DNA Civ v10 is a browser-based agent-based modeling platform implementing evolutionary genetics, horizontal gene transfer, adaptive immunity, predator-prey dynamics, and emergent deme formation. The platform employs standard biological terminology throughout, mapping directly to vocabulary used in peer-reviewed population genetics and evolutionary ecology literature. Version 10 introduces Closed System Mode for controlled experiments with defined founder populations, complementing the automated batch experimentation system with headless execution. The platform features deterministic seeded random number generation for full reproducibility, comprehensive data export (JSON/CSV), and statistical summary generation.
1. System Overview
1.1 Research Applications
DNA Civ v10 provides a platform for investigating:
- Population genetics: Allele frequency dynamics, genetic drift, selective sweeps
- Host-pathogen coevolution: Arms race dynamics, virulence evolution
- Immunology: Innate vs. adaptive immunity, herd immunity thresholds
- Horizontal gene transfer: Viral integration, endogenous retrovirus formation
- Social evolution: Deme formation, kin selection, cooperation
- Predator-prey dynamics: Trophic interactions, niche partitioning
- Speciation: Reproductive isolation, hybrid zones
1.2 Version History
| Version | Major Additions |
|---|---|
| v5 | Core genetics, DNA lab, microorganisms, demes |
| v6 | Epistasis, predation, speciation, environmental zones |
| v7 | Microbe evolution, adaptive immunity, HGT |
| v8 | Seeded RNG, run metadata, data export |
| v9 | Batch experiment runner, headless mode |
| v10 | Biological terminology, Closed System Mode |
2. Terminology Mapping v10
Version 10 replaces all game-style terminology with standard biological vocabulary suitable for peer-reviewed publication.
2.1 Core Gene Names
| Previous | Biological Term | Definition |
|---|---|---|
| Speed | Motility | Movement velocity |
| Social | Sociality | Group affinity |
| Aggro | Aggression | Predation tendency |
| Metabol | Metabolism | Energy efficiency |
| Fertil | Fecundity | Reproductive rate |
| Longev | Lifespan | Maximum longevity |
| Curious | Exploration | Dispersal drive |
| Hardy | Hardiness | Pathogen resistance |
2.2 Latent Gene Names
| Previous | Biological Term | Effect |
|---|---|---|
| Camo | Crypsis | Detection evasion |
| Toxic | Toxicosis | Anti-pathogen defense |
| Tele | Chemosense | Resource detection |
| Morph | Plasticity | Phenotypic drift |
| Psi | Quorum | Group awareness |
| Regen | Regeneration | Self-healing |
| Immort | Senescence⁻ | Reduced aging |
| Transcend | ApexGene | Ultimate evolution |
2.3 Social & Environmental Terms
| Previous | Biological Term | Standard Usage |
|---|---|---|
| Tribe | Deme | Population genetics (Wright) |
| Sun Clan, Moon Folk | Deme-α, Deme-β, Deme-γ | Systematic naming |
| Oasis | Nutrient⁺ | High resource density |
| Desert | Nutrient⁻ | Low resource density |
| Tundra | Low-Stress | Reduced metabolic cost |
| Volcanic | Mutagen | Mutagenic zone |
3. Genetic Architecture
3.1 Genome Structure
Each organism carries a 64-bit binary genome organized into 16 loci of 4 bits each (values 0-15, normalized to 0.0-1.0).
Bit Position: 0 16 32 48 64
|----+----|----+----|----+----|----+----|
[ ACTIVE GENES ] [ LATENT GENES ]
Loci 0-7 (express) Loci 8-15 (require unlock)
3.2 Active Genes (Loci 0-7)
3.3 Latent Genes (Loci 8-15)
Latent genes require activation via mutagen exposure. Once unlocked, they are heritable with 70% transmission probability.
| Gene | Bits | Activation Effect |
|---|---|---|
| Crypsis | 32-35 | 70% microbe/predator detection evasion |
| Toxicosis | 36-39 | 80% kill chance on infection attempt |
| Chemosense | 40-43 | Up to 2.5× resource detection range |
| Plasticity | 44-47 | Phenotypic drift every 50 ticks |
| Quorum | 48-51 | Enhanced group awareness (reserved) |
| Regeneration | 52-55 | +0.5 × trait value energy/tick |
| Senescence⁻ | 56-59 | Lifespan × (1 + trait value) |
| ApexGene | 60-63 | Virus immunity, +0.3 energy/tick |
3.4 Genetic Operators
Crossover (Meiotic Recombination)
CONFIG.CROSSOVER_POINTS = 2
Parent A: 1111000011110000111100001111000011110000111100001111000011110000
Parent B: 0000111100001111000011110000111100001111000011110000111100001111
↑ ↑
Crossover points (random)
Child: 1111000011001111000011110000111100001111000011110000111100001111
Point Mutation
MUTATION_RATE = 0.02 (2% per bit)
Expected mutations per offspring: 64 × 0.02 = 1.28
4. Environmental Systems
4.1 Resource Dynamics
| Parameter | Default | Description |
|---|---|---|
| RESOURCE_CLUSTERS | 6 | Number of food zones |
| RESOURCE_BASE_RICHNESS | 1.2 | Maximum richness value |
| Depletion rate | 0.001/tick | When organism forages |
| Regeneration rate | 0.002/tick | Passive recovery |
4.2 Seasonal Modulation
| Season | Resource Modifier | Energy Decay Modifier |
|---|---|---|
| Spring | 1.3× | 0.9× |
| Summer | 1.4× | 0.8× |
| Autumn | 0.8× | 1.1× |
| Winter | 0.6× | 1.15× |
TICKS_PER_SEASON = 80 → Full year = 320 ticks
4.3 Environmental Zones v10
| Zone | Resource Mod | Decay Mod | Selection Pressure |
|---|---|---|---|
| Nutrient⁺ | 1.5× | 0.7× | Refuge, high carrying capacity |
| Nutrient⁻ | 0.5× | 1.4× | Resource limitation, competition |
| Low-Stress | 0.8× | 1.2× | Reduced metabolic cost |
| Mutagen | 1.2× | 1.3× | Mutagenic, 0.2% damage/tick |
5. Microorganism Ecology
5.1 Microbe Types
Corrupts target gene locus via bit-flipping. Causes energy drain during infection. Carries 4-bit genetic payload for HGT.
Temporarily boosts one trait (+0.3) while reducing another (-0.2). Models mutualistic endosymbiosis.
Unlocks latent genes (loci 8-15). Once unlocked, genes are heritable. Models transposon activation.
5.2 Microbe Genome (v7+)
Microbes have their own heritable traits that evolve over generations:
| Trait | Range | Effect |
|---|---|---|
| virulence | 0.05-0.5 | Damage/corruption strength |
| infectivity | 0.1-0.9 | Base infection success rate |
| targetBias | 0-7 | Preferred host gene target |
| mutationRate | 0.01-0.3 | Offspring variation rate |
| payload | 4 bits | Viral DNA for HGT (viruses only) |
5.3 Horizontal Gene Transfer
When viruses infect, there is a 15% chance of HGT—viral genetic payload integrates into host genome:
if (random() < 0.15) {
viralInsert = {
sequence: micro.genome.payload, // 4 bits
insertPoint: targetGene.bits[0],
sourceStrainId: micro.strainId
};
entity.viralDNA.push(viralInsert);
entity.dna = integrateViralDNA(entity.dna, viralInsert);
}
Integrated viral DNA is heritable (80% transmission) and becomes a permanent part of the lineage—analogous to endogenous retroviruses in vertebrate genomes.
6. Immune System Modeling
6.1 Innate Immunity (Hardiness Gene)
innate_resistance = Hardiness × 0.5
// Maximum 50% resistance from genetics alone
6.2 Adaptive Immunity (Immune Memory)
Organisms build strain-specific resistance from surviving infections:
entity.immuneMemory = Map<strainId, {
resistance: 0.0-0.9, // Learned resistance
encounters: count, // Times exposed
lastEncounter: tick, // For decay calculation
strainType: 'virus'|'symbiont'|'mutagen'
}>
6.3 Combined Resistance
total_resistance = min(0.95, innate_resistance + adaptive_resistance)
// 95% cap prevents complete immunity
6.4 Maternal Antibody Transfer
Offspring inherit 30% of mother's resistance for strains where maternal resistance exceeds 0.3:
for each [strainId, memory] in parent.immuneMemory:
if memory.resistance > 0.3:
child.immuneMemory.set(strainId, {
resistance: memory.resistance × 0.3,
inherited: true
})
7. Behavioral & Social Systems
7.1 Goal-Directed Behavior
| Condition | Goal | Behavior |
|---|---|---|
| energy < 40 | food | Seek nearest resource |
| Sociality > 0.5, no deme | socialize | Seek other organisms |
| Exploration > 0.6 | explore | Random destination |
| else | idle | Local wandering |
7.2 Deme Formation v10 TERM
Requirements:
- Sociality > 0.4
- ≥ DEME_MIN_SIZE (3) organisms within DEME_DISTANCE (18)
- All unaffiliated
Demes are named systematically: Deme-α, Deme-β, Deme-γ, etc.
7.3 Predator-Prey System
// Trigger: Aggression > 0.4, random check passes
hunt_chance = Aggression × 0.02
// Target selection: Nearest non-deme member
target = nearest(entities.filter(e => e.deme !== predator.deme))
// Attack roll
attack_power = Aggression × phenotype_bonuses
defense = target.Hardiness + target.Motility × 0.5
success = random() < (attack_power / (attack_power + defense))
// Energy transfer on successful kill
if success:
damage = 10 + attack_power × 15
energy_gained = damage × 0.4
7.4 Speciation
hamming_distance = count_different_bits(dna1, dna2)
can_mate = hamming_distance <= SPECIATION_THRESHOLD (20)
// Exception: Hybridizer phenotype bypasses threshold
8. Epistasis & Phenotype Expression
Gene-gene interactions produce emergent phenotypes when trait thresholds are met:
9. Closed System Mode v10
Closed System Mode disables primordial emergence, creating a controlled experimental environment where populations can go extinct.
| Mode | Spontaneous Generation | Extinction Possible | Use Case |
|---|---|---|---|
| Open (default) | ✅ Yes | No (life re-emerges) | Ecological observation |
| Closed | ❌ No | ✅ Yes | Controlled experiments |
9.1 Experimental Applications
- Founder effect studies: Start with specific genotypes, observe drift
- Competition experiments: Two defined lineages competing
- Lineage tracking: Follow descendants of specific individuals
- Extinction dynamics: Identify conditions causing population collapse
9.2 Workflow for Lab-Created Populations
CLOSED_SYSTEM in Config panel10. Batch Experiment Runner
10.1 Configuration Options
| Setting | Description | Example |
|---|---|---|
| Variable to Test | CONFIG parameter to vary | MUTATION_RATE |
| Values to Test | Comma-separated values | 0.01, 0.02, 0.05, 0.1 |
| Runs per Value | Replicates for statistics | 25 |
| Ticks per Run | Simulation duration | 5000 |
10.2 Testable Variables
- MUTATION_RATE (0.005 - 0.1)
- ENERGY_DECAY (0.1 - 0.5)
- SPECIATION_THRESHOLD (10 - 40)
- INITIAL_POPULATION (3 - 50)
- RESOURCE_CLUSTERS (3 - 12)
- MICROBE_SPAWN_CHANCE (0.001 - 0.01)
10.3 Headless Execution
tickHeadless() runs full simulation logic with zero rendering—10-100× faster than visual mode. Browser remains responsive via chunked execution yielding every 50ms.
11. Data Formats & Export
11.1 Export Buttons
| Button | Output | Use |
|---|---|---|
| 📊 JSON | Full run data | Complete analysis |
| 📈 CSV | Time series | Spreadsheet/statistics |
| 💾 Save | Save file | Resume later |
| 📂 Load | Import save | Restore state |
11.2 JSON Export Structure
{
"meta": {
"id": "run-m4k7x2-a3b9c",
"seed": "experiment-42",
"configHash": "3f8a2b1c",
"version": "10.0.0"
},
"config": { ... },
"summary": {
"finalPopulation": 45,
"totalBorn": 523,
"demes": 3
},
"timeSeries": [ ... ],
"genePoolHistory": [ ... ],
"events": [ ... ],
"finalCensus": [ ... ],
"microbes": [ ... ]
}
11.3 Batch Summary CSV
variable_value,runs,avg_final_pop,std_final_pop,avg_max_gen,extinction_rate
0.01,25,45.30,12.40,8.50,0.04
0.02,25,42.10,15.60,9.20,0.08
0.05,25,38.40,18.20,11.30,0.12
12. Experimental Protocols
12.1 Protocol: Mutation Rate Effect
VARIABLE: MUTATION_RATE
VALUES: 0.005, 0.01, 0.02, 0.04, 0.08
RUNS_PER_VALUE: 30
TICKS_PER_RUN: 5000
MEASUREMENTS:
- Final genetic diversity
- Extinction rate
- Average max generation
ANALYSIS:
- One-way ANOVA for diversity
- Chi-square for extinction rate
12.2 Protocol: Founder Effect (Closed System)
VARIABLE: INITIAL_POPULATION
VALUES: 3, 5, 10, 25
SETUP: CLOSED_SYSTEM = true
RUNS_PER_VALUE: 50
TICKS_PER_RUN: 4000
MEASUREMENTS:
- Time to first extinction
- Diversity at tick 2000 vs 4000
- Trait variance reduction
ANALYSIS:
- Survival analysis
- ANOVA for diversity
12.3 Protocol: Speciation Threshold
VARIABLE: SPECIATION_THRESHOLD
VALUES: 10, 15, 20, 25, 30, 40
RUNS_PER_VALUE: 25
TICKS_PER_RUN: 6000
MEASUREMENTS:
- Reproductively isolated clusters
- Within-cluster diversity
- Hybridizer phenotype frequency
ANALYSIS:
- Cluster analysis on final DNA
- ANOVA for species count
13. Glossary
Adaptive immunity
Learned resistance from surviving infection; strain-specific
Chemosense
Latent gene enabling enhanced resource detection (analogous to chemotaxis)
Closed System
Experimental mode disabling primordial emergence; population can go extinct
Crypsis
Latent gene providing camouflage/detection evasion
Deme
Local breeding population; standard term in population genetics (Wright, 1943)
Epistasis
Gene-gene interaction producing emergent phenotypes
Fecundity
Reproductive capacity; affects offspring probability
Hardiness
Innate pathogen resistance; contrasts with adaptive immunity
HGT
Horizontal Gene Transfer; genetic material moving between organisms outside reproduction
Hybridizer
Phenotype enabling mating across speciation barrier
K-Strategist
Phenotype emphasizing longevity and exploration over reproduction (r/K selection theory)
Motility
Movement velocity trait
Plasticity
Latent gene enabling phenotypic drift over lifespan
Senescence⁻
Latent gene reducing aging effects (negative senescence)
Sociality
Trait governing deme affinity and group joining behavior
Toxicosis
Latent gene enabling toxic defense against pathogens
14. Configuration Reference
CONFIG = {
// World
WORLD_WIDTH: 280,
WORLD_HEIGHT: 200,
// Population
INITIAL_POPULATION: 25,
MAX_POPULATION: 150,
// Time
TICK_INTERVAL: 120,
TICKS_PER_SEASON: 80,
// DNA
GENOME_LENGTH: 64,
MUTATION_RATE: 0.02,
CROSSOVER_POINTS: 2,
// Survival
BASE_ENERGY: 80,
MAX_ENERGY: 120,
REPRODUCTION_THRESHOLD: 60,
REPRODUCTION_COST: 30,
ENERGY_DECAY: 0.25,
// Resources
RESOURCE_CLUSTERS: 6,
RESOURCE_BASE_RICHNESS: 1.2,
// Microorganisms
MAX_MICROBES: 20,
MICROBE_SPAWN_CHANCE: 0.003,
// Social (Demes)
DEME_DISTANCE: 18,
DEME_MIN_SIZE: 3,
// Predation
PREDATION_ENABLED: true,
PREDATION_ENERGY_TRANSFER: 0.4,
// Speciation
SPECIATION_ENABLED: true,
SPECIATION_THRESHOLD: 20,
// Environmental Zones
BIOMES_ENABLED: true,
// System Mode (v10)
CLOSED_SYSTEM: false,
// Research
SEED: null,
TIME_SERIES_INTERVAL: 10,
GENE_POOL_INTERVAL: 100,
}