Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluation safety for real functions #1

Closed
morinim opened this issue Oct 16, 2023 · 2 comments
Closed

Evaluation safety for real functions #1

morinim opened this issue Oct 16, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@morinim
Copy link
Owner

morinim commented Oct 16, 2023

Evaluation safety is a component of the closure property.

It's necessitated by the fact that many commonly used functions can fail in various ways (divide by 0, square root of a negative number...).

This is typically dealt with by appropriately modifying the standard behavior of primitives. It's common, for example, to use protected versions of numeric functions that can throw exceptions, such as division, logarithm, and square root. The protected version of such a function first tests for potential problems with its input(s) before executing the corresponding instruction, and if a problem is spotted some pre-fixed value is returned.

At the moment we're using an alternative to protected real functions: we trap NaN results and strongly reduce the fitness of programs that generate such values. This method can lead to all the individuals in the population having nearly the same (very poor) fitness, leaving selection with very little discriminatory power.
On the other hand it can cut the evaluation time of poor individuals.

Further experiments are required.

@morinim morinim added the enhancement New feature or request label Oct 16, 2023
@morinim
Copy link
Owner Author

morinim commented Dec 15, 2023

Also the current approach is slightly different compared to Vita.

+inf / - inf values are considered valid and used as intermediate results and final output.

Previously (Vita) they were treated the same as NaN.

@morinim morinim added the question Further information is requested label Dec 18, 2023
@morinim morinim self-assigned this Apr 22, 2024
morinim added a commit that referenced this issue Apr 22, 2024
This ensures simpler calculations for statistics functions.
Efficacy seems unchanged.

Further research needed.

Issue #1
@morinim
Copy link
Owner Author

morinim commented May 15, 2024

At the moment we trap both NaN and infinity values.

Measurements don't show performance variations and the source code is simpler.

@morinim morinim closed this as completed May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant