Skip to content

Added Parallelization

Choose a tag to compare

@AlexanderGatesDev AlexanderGatesDev released this 30 Mar 04:47
· 14 commits to Master since this release
f5a9094

Added Parallelization

Fixed the Logger.log_generation method to accept the murder_count parameter
Modified the Renderer.handle_events method to start with paused=False by default, allowing creatures to move automatically
Fixed the random zones issue by preventing the creation of random zones in the ParallelSimulator.initialize method
Fixed the help menu by adding F1 key handling to the Renderer.handle_events method

Implemented Components

Thread-Safe Grid and Signals Classes
Created thread-safe wrappers for Grid and Signals classes
Added locks to protect critical sections of code
Implemented methods to safely access and modify shared data

Parallel Simulator Class
Extended the base Simulator class to support parallelization
Added configuration options for controlling parallelization
Implemented process pool management for parallel execution
Added proper cleanup and resource management

Configuration Options
Added enable_parallelization option to toggle parallelization
Added num_workers option to control the number of worker processes
Added batch_size option to control the batch size for parallel processing

Benchmark Script
Created a script to compare sequential and parallel performance
Added command-line options for customizing benchmark parameters
Implemented proper measurement and reporting of results