Memory Map Visualization
Memory Map Visualization¶
Back to Home
The Memory Map provides real-time visualization of the ByteBiota soup memory space, showing all organism instances, their species classifications, and current activities.
Features¶
- Real-time Visualization: Live updates via WebSocket connection
- Species Identification: Color-coded organisms by taxonomic classification
- Activity Monitoring: Visual indicators for organism states
- Interactive Exploration: Zoom, pan, and inspect individual organisms
- Performance Optimized: Zero impact on simulator performance
Usage¶
Access the Memory Map via the web interface navigation or directly at /memory-map
.
Controls¶
- Zoom: Use mouse wheel or zoom buttons to change scale
- Pan: Click and drag to move around the memory space
- Select: Click on organisms to view detailed information
- Filter: Use species and activity filters to focus on specific organisms
- Export: Save memory snapshots as PNG images
Visual Elements¶
- Organism Blocks: Colored rectangles representing organism memory ranges
- Activity Indicators:
- π’ Replicating
- π΄ Dying (high error count)
- π£ Mutating
- π΅ Idle/Computing
- Free Space: Gray areas representing unallocated memory
- Heatmap: Optional overlay showing memory access patterns
Technical Details¶
API Endpoints¶
GET /api/memory/map
: Get current memory map state (virtual memory layout in distributed mode)WS /ws/memory-map
: WebSocket for real-time updates (10 Hz update rate)
Note: In distributed mode, the memory map shows a virtual/logical memory space reconstructed from organism metadata across all workers. Addresses are virtual and do not correspond to actual worker memory locations.
Data Format¶
{
"timestamp": 1234567890.123,
"memory_size": 1048576,
"free_ranges": [
{"start": 0, "length": 1024}
],
"organisms": [
{
"id": 1,
"start_addr": 1024,
"size": 512,
"species": "Replicatus vulgaris",
"activity": "executing",
"current_ip": 1536,
"energy": 45.2,
"age": 1000,
"error_count": 0
}
]
}
Distributed Architecture {#distributed-arch}¶
In distributed ByteBiota, the memory map shows a virtual memory space reconstructed from organism metadata across all workers:
- No Worker Memory Access: Server uses existing
StateAggregator
organism data - Virtual Addresses: Organisms assigned sequential addresses for visualization
- Real Metadata: Species, energy, age, activity states are actual values
- No Performance Impact: No additional worker communication required
This approach provides useful visualization without expensive memory synchronization.
Data Already Available {#data-available}¶
Workers send comprehensive organism updates including:
- Taxonomy classification (kingdom, phylum, genus, species)
- Energy levels and age
- Genome size and error counts
- All data needed for rich visualization
No additional worker requests needed - everything comes from existing execution result updates.
Data Export {#data-export}¶
The memory map system uses a dedicated MemoryMapService
class to safely extract memory state data without impacting simulator performance. The service creates snapshots containing:
- Organism locations and states
- Memory allocation patterns
- Species classifications
- Activity indicators
- Free memory ranges
Performance Considerations¶
- Updates are throttled to prevent UI blocking
- Large memory spaces show limited organism count for performance
- Canvas rendering optimized for smooth 60fps interactions
- WebSocket connection includes automatic reconnection