- Open
apps/ai-tools/recursive-self-portrait.htmlin a browser - Click "Start Observation"
- Move your mouse around to generate behavioral data
- Watch the "Ancestral Memory" panel in the sidebar
- Start observation
- Move mouse in circular patterns for 30 seconds
- Check sidebar - you should see:
- Generation: 1
- Dominant Genes: "circular-motion" should appear
- Genome Sequence: Should show DNA-like codes (ATG-GCC-TTA...)
- Unlocked Memory: "Your ancestors drew circles in the sand..."
- Refresh the page
- Start observation again
- Move mouse in circular patterns again
- Check sidebar:
- Generation: 2
- Heritability: Should increase (green bar grows)
- Dominant Genes: "circular-motion" should be marked as DOMINANT
- Refresh the page
- Start observation
- Move mouse in straight lines (left to right, up to down)
- Check sidebar:
- Recent Mutations: Should show "straight-lines (emergence)"
- Heritability: May decrease as behavior differs
- Unlocked Memory: "They moved with purpose, direct and unwavering..."
- Move cursor very fast (>250 speed) while staying near predicted areas
- Watch "Primal Instincts" section - Fight box should highlight
- Move cursor very fast (>200 speed) while avoiding predicted areas
- Watch "Primal Instincts" section - Flight box should highlight
- Move cursor very slowly or stop moving
- Watch "Primal Instincts" section - Freeze box should highlight
- Move at moderate speed (50-150), exploring different areas
- Watch "Primal Instincts" section - Explore box should highlight
- Draw circles with your cursor
- Should unlock: "Your ancestors drew circles in the sand..."
- Move, pause, move, pause repeatedly
- Should unlock: "They paused before the hunt, measuring risk..."
- Click rapidly multiple times (< 300ms between clicks)
- Should unlock: "In moments of danger, they moved without thought..."
- Keep cursor in center of screen (middle 50%)
- Should unlock: "They claimed this space, marking boundaries..."
- Move cursor all over the screen, covering all areas
- Should unlock: "They were nomads, never settling in one place..."
- After generating some behavioral data
- Click "Export Behavioral Genome" button
- A JSON file should download
- Open the file - it should contain:
- Generation number
- Genome sequence (DNA codes)
- Dominant/recessive genes
- Family tree data
- Primal instinct profile
- Unlocked memories
- Generation Number: Increments with each session
- Heritability Meter: Green bar shows 0-100%
- Dominant Genes: Green rounded tags
- Mutations: Red pulsing tags
- Primal Instincts: Active instinct gets highlighted border
- Genome Sequence: Updates as new genes are detected
- Unlocked Memories: Purple badges appear with poetic text
Open browser console (F12) and look for:
- "Generation X begins..."
- "Mutation detected: [gene] emerging"
- "Ancestral memory unlocked: [memory text]"
Check browser devtools → Application → localStorage:
- Key:
recursive-self-portrait-ancestral - Should contain JSON with genes, stability, generations, etc.
- Check browser console for errors
- Verify you clicked "Start Observation"
- Scroll down in sidebar to find "Ancestral Memory" panel
- Make sure you've moved mouse for at least 20 actions
- Try more pronounced patterns (bigger circles, longer lines)
- Wait at least 30 seconds of movement
- This is normal for first session (no ancestral data yet)
- Refresh and start another session with similar behavior
- Mutations only check every 30 seconds
- Try completely different movement patterns
- Wait longer in the session
- Check browser console for errors
- Verify you have some behavioral data
- Try a different browser if download fails
- Original file: ~15,784 lines, ~642KB
- With Ancestral Memory: ~19,074 lines, ~716KB
- Added: ~3,290 lines, ~74KB
Should have minimal performance impact:
- Gene extraction: Only when 20+ actions exist
- Mutation detection: Throttled to every 30 seconds
- Commentary: Throttled to every 20 seconds
- UI updates: Once per frame (integrated with existing loop)
Tested with:
- Chrome 90+
- Firefox 88+
- Edge 90+
- Safari 14+
Requires:
- localStorage support
- ES6 support (Map, arrow functions)
- Modern CSS (flexbox, grid)
After 3 sessions of varied movement:
- Generation number is 3
- At least 5 genes detected
- At least 2 dominant genes
- At least 1 mutation recorded
- Heritability shows a percentage > 0
- At least 2 memories unlocked
- All 4 primal instincts triggered at some point
- Genome sequence is visible
- Export produces valid JSON
- Run 10 sessions with consistent behavior
- Check if genes reach max stability (100%)
- Verify family tree grows
- Test if extinct traits are tracked
- Session 1: Circles only
- Session 2: Lines only
- Session 3: Random chaos
- Session 4: Slow deliberate movements
- Session 5: Fast erratic movements
- Verify that mutations and heritability reflect this
- Generate significant ancestral data
- Close browser completely
- Reopen and start observation
- Verify all ancestral data loads correctly
- Export genome
- Clear localStorage
- Manually construct import (future feature)
- Verify data restoration
- Green tags with bold: Dominant genes (>70% stability)
- Orange tags with italic: Recessive genes (<30% stability)
- Red pulsing tags: Recent mutations
- Purple → Blue → Green gradient: Visual appeal
- 0%: No similarity to ancestors
- 50%: Moderate similarity
- 100%: Identical to ancestral average
- Normal: Dark background
- Active: Gold background with glowing border
- Format: Triplet codes separated by hyphens
- Example: ATG-GCC-TTA-CAG-GGT
- Scrollable: For long genomes
- Generation: 1
- Heritability: Will be 0% or undefined (no ancestors yet)
- Family Tree: Empty
- This is expected!
- Heritability calculation activates
- Genetic comparison begins
- Mutations can be detected
- Rich family tree
- Clear dominant genes
- Stable heritability
- Extinct traits may appear
- Complex genome sequence
Every ~20 seconds during observation, you may see/hear:
- Log entry with ancestral commentary
- Voice synthesis (if enabled)
- Contextual messages about genes, mutations, heritability
Example messages:
- "Your ancestors moved this way..."
- "The genetic line is strong in you..."
- "Mutation rate increasing..."
- "Fight or flight? Your ancestors chose..."
{
"version": "1.0",
"generationNumber": 3,
"genome": "ATG-GCC-TTA-CAG-GGT",
"genes": ["circular-motion", "fast-mover", "territorial"],
"dominantGenes": ["circular-motion"],
"recessiveGenes": ["hesitation"],
"familyTree": {
"totalGenerations": 3,
"recentGenerations": [...]
},
"ancestralTraits": {
"heritability": "67.5%",
"mutationRate": "15.2%",
"adaptationScore": "82.3"
},
"primalInstinctProfile": {
"fight": 5,
"flight": 2,
"freeze": 8,
"curiosity": 12
},
"unlockedMemories": [...],
"exportedAt": "2025-11-26T..."
}If you encounter problems:
- Check browser console (F12)
- Verify localStorage is enabled
- Note your browser version
- Describe the behavioral pattern you were trying
- Check if genes/mutations/memories are being detected at all