PlotDataRecorder.py
Records live experiment data to workspace log files for real-time plotting.
-
class PlotDataRecorder.PlotDataRecorder[source]
Tracks overall best fitness and writes data to log files consumed by PlotEvolutionLive.
-
__init__()[source]
Initialize the recorder with zero overall best fitness.
-
record_all_live_data(index: int, reported_value: float, src_population: str)[source]
Update a specific line in the all-live-data log with a new value.
- Parameters:
index (int) – Line index to update.
reported_value (float) – Fitness or metric value to record.
src_population (str) – Name of the source population.
-
record_generation(fits: list[float], current_epoch: int, diversity: float)[source]
Append generation summary (best, worst, avg, diversity) to log files.
- Parameters:
fits (list[float]) – Fitness values for the current generation.
current_epoch (int) – Current generation number.
diversity (float) – Population diversity measure.
-
record_waveform(waveform: list[int])[source]
Write waveform sample points to the waveform live-data log.
- Parameters:
waveform (list[int]) – Sampled waveform data points.
-
record_waveform_heatmap(current_epoch: int, best_waveform: list[int])[source]
Append the best waveform of this epoch to the heatmap log.
- Parameters:
-
-
reset()[source]
Reset overall best fitness to zero.