ProgramRunOutputRecord

Models & Types · AiDotNet.Evolution.Programs.Outputs

What one best-program write produced: where the files went and which candidate they describe.

For Beginners

Every time the best program is saved, you get one of these back saying exactly which two files were written and which candidate they hold. Keep the last one and you always know where the run’s answer is on disk.

How It Works

The reference OpenEvolve controller writes its best-program files and logs a line; nothing is returned, so a caller that wants to know where the run put its answer has to reconstruct the path from configuration. A record closes that gap: it carries the absolute paths that were actually written, the genome and quality they describe, and the trigger and ordinal that identify which snapshot this was.

Records are immutable and never contain program text, so they are safe to log, keep in a list, or return from a run without bounding them first.

Constructors

Constructor Summary
ProgramRunOutputRecord(ProgramRunOutputTrigger trigger, long ordinal, string genomeId, string directoryPath, string programPath, string infoPath, double? quality, bool isSourceTruncated, DateTimeOffset savedAtUtc) Initializes a record.

Properties

Property Summary
DateTimeOffset SavedAtUtc { get; } Gets when the write completed, in UTC.
ProgramRunOutputTrigger Trigger { get; } Gets what caused the write.
bool IsSourceTruncated { get; } Gets whether the program on disk was cut to fit the configured byte limit.
double? Quality { get; } Gets the program’s score, or null when it was never scored.
long Ordinal { get; } Gets the snapshot ordinal, which names the checkpoint directory.
string DirectoryPath { get; } Gets the absolute directory the files were written into.
string GenomeId { get; } Gets the canonical identity of the program that was written.
string InfoPath { get; } Gets the absolute path of the info document.
string ProgramPath { get; } Gets the absolute path of the program file.

Methods

Method Summary
string ToString() Returns the trigger, the identity prefix, and the program path.