Skip to content

Reject non-finite values in second/third autocorrelation evaluators - #553

Merged
codelion merged 1 commit into
algorithmicsuperintelligence:mainfrom
maximusrufus:fix/autocorr-evaluators-finite-check
Oct 27, 2026
Merged

codelion merged 1 commit into
algorithmicsuperintelligence:mainfrom
maximusrufus:fix/autocorr-evaluators-finite-check

Conversation

@maximusrufus

Copy link
Copy Markdown
Contributor

Refs #550 (partially: the autocorrelation evaluators; hexagon and circle packing are not changed here).

The second_autocorr_ineq and third_autocorr_ineq example evaluators now reject non-finite function values (and a non-finite reported C3) with a ValueError, which the existing handler returns as an error result.
tests/test_autocorr_evaluators_finite.py checks that NaN, inf and -inf are rejected and that a finite valid program is still scored.
Scores for valid programs are unchanged.

Add an isfinite check on f_values (and on the reported C3) before the existing checks, plus a unit test covering NaN/inf rejection and a valid input.
@CLAassistant

CLAassistant commented Oct 27, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codelion
codelion merged commit bcf63da into algorithmicsuperintelligence:main Oct 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants