File size: 26,407 Bytes
48d617a
 
 
 
 
058fcf5
48d617a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1d7f912
 
48d617a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d33ff6a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48d617a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
058fcf5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48d617a
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.js"></script>
    <title>Evolutionary Computing Systems: Adaptive Evolution & Selection Mechanisms</title>
    <style>
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            line-height: 1.6;
            margin: 0;
            padding: 20px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #333;
        }
        .container {
            max-width: 1200px;
            margin: 0 auto;
            background: white;
            padding: 30px;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        }
        h1 {
            color: #2c3e50;
            text-align: center;
            margin-bottom: 30px;
            font-size: 2.5em;
        }
        h2 {
            color: #34495e;
            border-bottom: 3px solid #3498db;
            padding-bottom: 10px;
            margin-top: 40px;
        }
        h3 {
            color: #2980b9;
            margin-top: 30px;
        }
        .process-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
            margin: 30px 0;
        }
        .process-card {
            background: #f8f9fa;
            border: 2px solid #e9ecef;
            border-radius: 10px;
            padding: 20px;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        .process-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0,0,0,0.15);
        }
        .process-title {
            font-weight: bold;
            color: #2c3e50;
            margin-bottom: 10px;
            font-size: 1.1em;
        }
        .process-description {
            color: #555;
            font-size: 0.9em;
            line-height: 1.5;
        }
        .mermaid {
            background: white;
            border: 2px solid #ddd;
            border-radius: 10px;
            padding: 20px;
            margin: 20px 0;
            text-align: center;
        }
        .color-key {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 10px;
            margin: 20px 0;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 10px;
            border: 2px solid #e9ecef;
        }
        .color-item {
            text-align: center;
            padding: 10px;
            border-radius: 5px;
            font-weight: bold;
            font-size: 0.9em;
        }
        .red { background: #ff6b6b; color: white; }
        .yellow { background: #ffd43b; color: black; }
        .green { background: #51cf66; color: white; }
        .blue { background: #74c0fc; color: white; }
        .violet { background: #b197fc; color: white; }
        .stats {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            margin: 30px 0;
        }
        .stat-card {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px;
            border-radius: 10px;
            text-align: center;
        }
        .stat-number {
            font-size: 2em;
            font-weight: bold;
            display: block;
        }
        .stat-label {
            font-size: 0.9em;
            opacity: 0.9;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>🧬 Evolutionary Computing Systems: Adaptive Evolution & Selection Mechanisms</h1>
        
        <div class="stats">
            <div class="stat-card">
                <span class="stat-number">8</span>
                <span class="stat-label">Evolutionary Processes</span>
            </div>
            <div class="stat-card">
                <span class="stat-number">4</span>
                <span class="stat-label">Categories</span>
            </div>
            <div class="stat-card">
                <span class="stat-number">Complete</span>
                <span class="stat-label">Status</span>
            </div>
            <div class="stat-card">
                <span class="stat-number">Universal</span>
                <span class="stat-label">System</span>
            </div>
        </div>

        <h2>🎯 Overview</h2>
        <p>This collection demonstrates how biological systems implement evolutionary computing through natural selection, mutation, and adaptation. These systems show how populations can solve complex problems through iterative optimization and selection mechanisms.</p>

        <div class="color-key">
            <div class="color-item red">πŸ”΄ Triggers & Inputs</div>
            <div class="color-item yellow">🟑 Structures & Objects</div>
            <div class="color-item green">🟒 Processing & Operations</div>
            <div class="color-item blue">πŸ”΅ Intermediates & States</div>
            <div class="color-item violet">🟣 Products & Outputs</div>
        </div>

        <h2>🧬 Evolutionary Processes</h2>
        
        <div class="process-grid">
            <div class="process-card">
                <div class="process-title">1. Natural Selection Algorithm</div>
                <div class="process-description">Fitness-based selection system that preferentially reproduces individuals with higher fitness, demonstrating optimization through differential survival.</div>
            </div>
            
            <div class="process-card">
                <div class="process-title">2. Mutation Generation System</div>
                <div class="process-description">Random genetic variation system using DNA replication errors, environmental damage, and mobile genetic elements to generate diversity.</div>
            </div>
            
            <div class="process-card">
                <div class="process-title">3. Genetic Drift Mechanism</div>
                <div class="process-description">Stochastic allele frequency changes in small populations demonstrating random sampling effects on genetic diversity.</div>
            </div>
            
            <div class="process-card">
                <div class="process-title">4. Adaptive Evolution Process</div>
                <div class="process-description">Environment-driven selection system that optimizes phenotypes for specific ecological niches through iterative improvement.</div>
            </div>
            
            <div class="process-card">
                <div class="process-title">5. Co-evolutionary Arms Race</div>
                <div class="process-description">Reciprocal adaptation system between interacting species demonstrating competitive optimization and escalation.</div>
            </div>
            
            <div class="process-card">
                <div class="process-title">6. Sexual Selection Algorithm</div>
                <div class="process-description">Mate choice-based selection system using phenotypic preferences to drive evolution of elaborate traits and behaviors.</div>
            </div>
            
            <div class="process-card">
                <div class="process-title">7. Population Bottleneck Recovery</div>
                <div class="process-description">Genetic diversity restoration system following population crashes using mutation accumulation and selection.</div>
            </div>
            
            <div class="process-card">
                <div class="process-title">8. Speciation Decision Tree</div>
                <div class="process-description">Reproductive isolation system using geographic, behavioral, and genetic barriers to create new species.</div>
            </div>
        </div>

        <h2>πŸ”¬ Featured Process: Natural Selection Algorithm</h2>
        <p>This flowchart demonstrates how natural selection implements an evolutionary computing algorithm. The system iteratively optimizes populations through differential survival and reproduction based on fitness.</p>

        <div class="mermaid">
graph TD
    A[Environmental Pressure] --> B[Population Generation]
    C[Genetic Variation] --> B
    D[Resource Availability] --> B
    
    B --> E[Individual Phenotypes]
    E --> F[Fitness Assessment]
    F --> G{Survival Threshold?}
    
    G -->|No| H[Individual Death]
    G -->|Yes| I[Reproductive Success]
    
    H --> J[Population Reduction]
    I --> K[Offspring Production]
    
    K --> L[Genetic Inheritance]
    L --> M[Mutation Events]
    M --> N[New Genetic Variants]
    
    N --> O[Next Generation]
    O --> P[Population Size Check]
    
    P -->|Stable| Q[Selection Pressure]
    P -->|Declining| R[Extinction Risk]
    P -->|Growing| S[Competition Increase]
    
    Q --> T[Fitness Landscape]
    R --> U[Adaptation Pressure]
    S --> V[Resource Limitation]
    
    T --> W[Optimal Phenotypes]
    U --> X[Survival Strategies]
    V --> Y[Selection Intensity]
    
    W --> Z[Population Optimization]
    X --> Z
    Y --> Z
    
    Z --> AA[Evolutionary Progress]
    AA --> BB[Environmental Change]
    BB --> A
    
    style A fill:#ff6b6b,stroke:#333,stroke-width:2px,color:#fff
    style C fill:#ff6b6b,stroke:#333,stroke-width:2px,color:#fff
    style D fill:#ff6b6b,stroke:#333,stroke-width:2px,color:#fff
    style B fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style E fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style F fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style G fill:#ffd43b,stroke:#333,stroke-width:2px,color:#000
    style H fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style I fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style J fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style K fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style L fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style M fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style N fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style O fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style P fill:#ffd43b,stroke:#333,stroke-width:2px,color:#000
    style Q fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style R fill:#ff6b6b,stroke:#333,stroke-width:2px,color:#fff
    style S fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style T fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style U fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style V fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style W fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style X fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style Y fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style Z fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style AA fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style BB fill:#ff6b6b,stroke:#333,stroke-width:2px,color:#fff
        </div>

        <h2>🧬 Complete Evolutionary Computing Flowcharts</h2>
        
        <h3>2. Mutation Generation</h3>
        <div class="mermaid">
graph TD
    A[DNA Replication] --> B[Replication Errors]
    B --> C[Point Mutations]
    B --> D[Insertions/Deletions]
    B --> E[Chromosomal Rearrangements]
    
    C --> F[Single Base Changes]
    D --> G[Frame Shifts]
    E --> H[Structural Variations]
    
    F --> I[Mutation Rate]
    G --> I
    H --> I
    
    I --> J{Beneficial Mutation?}
    J -->|Yes| K[Positive Selection]
    J -->|No| L[Neutral or Deleterious]
    
    K --> M[Fitness Increase]
    L --> N[Fitness Decrease or Neutral]
    
    M --> O[Population Spread]
    N --> P[Selection Against]
    
    style A fill:#ff6b6b,stroke:#333,stroke-width:2px,color:#fff
    style B fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style C fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style D fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style E fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style F fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style G fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style H fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style I fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style J fill:#ffd43b,stroke:#333,stroke-width:2px,color:#000
    style K fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style L fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style M fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style N fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style O fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style P fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
        </div>

        <h3>3. Genetic Drift</h3>
        <div class="mermaid">
graph TD
    A[Small Population] --> B[Random Sampling]
    B --> C[Allele Frequency Changes]
    C --> D[Genetic Variation Loss]
    D --> E[Population Bottleneck]
    
    E --> F{Population Size?}
    F -->|Very Small| G[Genetic Drift Dominant]
    F -->|Large| H[Selection Dominant]
    
    G --> I[Random Fixation]
    H --> J[Adaptive Evolution]
    
    I --> K[Loss of Diversity]
    J --> L[Maintained Diversity]
    
    K --> M[Inbreeding Effects]
    L --> N[Outbreeding Benefits]
    
    style A fill:#ff6b6b,stroke:#333,stroke-width:2px,color:#fff
    style B fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style C fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style D fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style E fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style F fill:#ffd43b,stroke:#333,stroke-width:2px,color:#000
    style G fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style H fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style I fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style J fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style K fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style L fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style M fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style N fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
        </div>

        <h3>4. Adaptive Evolution</h3>
        <div class="mermaid">
graph TD
    A[Environmental Change] --> B[Selection Pressure]
    B --> C[Phenotypic Variation]
    C --> D[Fitness Assessment]
    D --> E{Adaptive Advantage?}
    
    E -->|Yes| F[Positive Selection]
    E -->|No| G[Negative Selection]
    
    F --> H[Allele Frequency Increase]
    G --> I[Allele Frequency Decrease]
    
    H --> J[Population Adaptation]
    I --> K[Population Decline]
    
    J --> L[Environmental Fitness]
    K --> M[Extinction Risk]
    
    L --> N[Evolutionary Success]
    M --> O[Evolutionary Failure]
    
    style A fill:#ff6b6b,stroke:#333,stroke-width:2px,color:#fff
    style B fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style C fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style D fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style E fill:#ffd43b,stroke:#333,stroke-width:2px,color:#000
    style F fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style G fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style H fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style I fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style J fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style K fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style L fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style M fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style N fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style O fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
        </div>

        <h3>5. Co-evolutionary Arms Race</h3>
        <div class="mermaid">
graph TD
    A[Host-Pathogen Interaction] --> B[Host Defense Evolution]
    A --> C[Pathogen Counter-Evolution]
    
    B --> D[Immune System Enhancement]
    C --> E[Evasion Mechanisms]
    
    D --> F[Pathogen Recognition]
    E --> G[Recognition Avoidance]
    
    F --> H[Host Advantage]
    G --> I[Pathogen Advantage]
    
    H --> J[Selection on Pathogen]
    I --> K[Selection on Host]
    
    J --> L[Pathogen Adaptation]
    K --> M[Host Adaptation]
    
    L --> N[New Arms Race Cycle]
    M --> N
    
    style A fill:#ff6b6b,stroke:#333,stroke-width:2px,color:#fff
    style B fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style C fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style D fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style E fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style F fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style G fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style H fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style I fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style J fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style K fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style L fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style M fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style N fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
        </div>

        <h3>6. Sexual Selection</h3>
        <div class="mermaid">
graph TD
    A[Mating Competition] --> B[Sexual Traits]
    B --> C[Mate Choice]
    C --> D{Preferred Trait?}
    
    D -->|Yes| E[Reproductive Success]
    D -->|No| F[Reproductive Failure]
    
    E --> G[Trait Inheritance]
    F --> H[Trait Loss]
    
    G --> I[Next Generation]
    H --> J[Reduced Representation]
    
    I --> K[Trait Amplification]
    J --> L[Trait Diminution]
    
    K --> M[Sexual Selection Pressure]
    L --> M
    
    style A fill:#ff6b6b,stroke:#333,stroke-width:2px,color:#fff
    style B fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style C fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style D fill:#ffd43b,stroke:#333,stroke-width:2px,color:#000
    style E fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style F fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style G fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style H fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style I fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style J fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style K fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style L fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style M fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
        </div>

        <h3>7. Population Bottleneck Recovery</h3>
        <div class="mermaid">
graph TD
    A[Population Bottleneck] --> B[Genetic Diversity Loss]
    B --> C[Inbreeding Depression]
    C --> D[Fitness Decline]
    D --> E{Recovery Possible?}
    
    E -->|Yes| F[Genetic Rescue]
    E -->|No| G[Extinction Risk]
    
    F --> H[New Genetic Variation]
    G --> I[Population Decline]
    
    H --> J[Fitness Recovery]
    I --> K[Population Collapse]
    
    J --> L[Population Growth]
    K --> M[Extinction]
    
    L --> N[Genetic Diversity Restoration]
    
    style A fill:#ff6b6b,stroke:#333,stroke-width:2px,color:#fff
    style B fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style C fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style D fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style E fill:#ffd43b,stroke:#333,stroke-width:2px,color:#000
    style F fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style G fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style H fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style I fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style J fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style K fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style L fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style M fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style N fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
        </div>

        <h3>8. Speciation Decision Tree</h3>
        <div class="mermaid">
graph TD
    A[Population Isolation] --> B{Isolation Type?}
    B -->|Geographic| C[Allopatric Speciation]
    B -->|Ecological| D[Sympatric Speciation]
    B -->|Temporal| E[Parapatric Speciation]
    
    C --> F[Geographic Barriers]
    D --> G[Ecological Niches]
    E --> H[Environmental Gradients]
    
    F --> I[Genetic Divergence]
    G --> J[Adaptive Divergence]
    H --> K[Gradual Divergence]
    
    I --> L{Reproductive Isolation?}
    J --> L
    K --> L
    
    L -->|Yes| M[New Species Formation]
    L -->|No| N[Continued Divergence]
    
    M --> O[Speciation Complete]
    N --> L
    
    style A fill:#ff6b6b,stroke:#333,stroke-width:2px,color:#fff
    style B fill:#ffd43b,stroke:#333,stroke-width:2px,color:#000
    style C fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style D fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style E fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style F fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style G fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style H fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style I fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style J fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style K fill:#51cf66,stroke:#333,stroke-width:2px,color:#fff
    style L fill:#ffd43b,stroke:#333,stroke-width:2px,color:#000
    style M fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
    style N fill:#74c0fc,stroke:#333,stroke-width:2px,color:#fff
    style O fill:#b197fc,stroke:#333,stroke-width:2px,color:#fff
        </div>

        <div class="color-key">
            <div class="color-item red">πŸ”΄ Triggers & Inputs</div>
            <div class="color-item yellow">🟑 Structures & Objects</div>
            <div class="color-item green">🟒 Processing & Operations</div>
            <div class="color-item blue">πŸ”΅ Intermediates & States</div>
            <div class="color-item violet">🟣 Products & Outputs</div>
        </div>

        <h2>πŸ§ͺ Computational Analysis</h2>
        <p>This evolutionary computing system demonstrates several key computational principles:</p>
        <ul>
            <li><strong>Iterative Optimization:</strong> The system repeatedly improves solutions through selection and variation</li>
            <li><strong>Fitness-based Selection:</strong> Better solutions are preferentially retained and reproduced</li>
            <li><strong>Random Variation:</strong> Mutations provide exploration of the solution space</li>
            <li><strong>Population Dynamics:</strong> Multiple solutions compete and cooperate simultaneously</li>
            <li><strong>Environmental Adaptation:</strong> The system responds to changing problem constraints</li>
        </ul>

        <h2>πŸ”¬ Experimental Implications</h2>
        <p>This evolutionary system provides insights for computational applications:</p>
        <ul>
            <li><strong>Genetic Algorithms:</strong> Demonstrates principles for optimization algorithms</li>
            <li><strong>Machine Learning:</strong> Shows how systems can learn through selection</li>
            <li><strong>Robotics:</strong> Provides templates for adaptive control systems</li>
            <li><strong>Drug Discovery:</strong> Shows how evolution can find novel solutions</li>
        </ul>

        <h2>🧬 Evolutionary Algorithm Components</h2>
        <table style="width:100%; border-collapse: collapse; margin: 20px 0;">
            <tr style="background: #f8f9fa;">
                <th style="border: 1px solid #ddd; padding: 10px;">Component</th>
                <th style="border: 1px solid #ddd; padding: 10px;">Biological Implementation</th>
                <th style="border: 1px solid #ddd; padding: 10px;">Computational Function</th>
            </tr>
            <tr>
                <td style="border: 1px solid #ddd; padding: 10px;">Selection</td>
                <td style="border: 1px solid #ddd; padding: 10px;">Differential survival & reproduction</td>
                <td style="border: 1px solid #ddd; padding: 10px;">Choose best solutions</td>
            </tr>
            <tr>
                <td style="border: 1px solid #ddd; padding: 10px;">Variation</td>
                <td style="border: 1px solid #ddd; padding: 10px;">Mutation & recombination</td>
                <td style="border: 1px solid #ddd; padding: 10px;">Generate new solutions</td>
            </tr>
            <tr>
                <td style="border: 1px solid #ddd; padding: 10px;">Population</td>
                <td style="border: 1px solid #ddd; padding: 10px;">Multiple individuals</td>
                <td style="border: 1px solid #ddd; padding: 10px;">Maintain diversity</td>
            </tr>
            <tr>
                <td style="border: 1px solid #ddd; padding: 10px;">Fitness</td>
                <td style="border: 1px solid #ddd; padding: 10px;">Survival & reproduction success</td>
                <td style="border: 1px solid #ddd; padding: 10px;">Evaluate solution quality</td>
            </tr>
        </table>

        <p><em>Generated using the Programming Framework methodology</em></p>
    </div>
    <script>
        mermaid.initialize({ 
            startOnLoad: true, 
            theme: "default", 
            flowchart: { 
                useMaxWidth: false, 
                htmlLabels: true, 
                curve: "linear", 
                nodeSpacing: 30, 
                rankSpacing: 40, 
                padding: 10 
            }, 
            themeVariables: { 
                fontFamily: "Arial, sans-serif", 
                fontSize: "14px", 
                primaryColor: "#ff6b6b", 
                lineColor: "#333333", 
                secondaryColor: "#feca57", 
                tertiaryColor: "#4ecdc4" 
            },
            securityLevel: "loose"
        });
    </script>
</body>
</html>