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

Setting StopCriterion to ITERATIONS breaks the ElitismGPAlgorithm #30

Open
mitkonikov opened this issue Dec 21, 2024 · 0 comments
Open

Comments

@mitkonikov
Copy link
Contributor

In the SymbolicRegressionExample.java file, changing the Task parameter for StopCriterion to StopCriterion.ITERATIONS breaks the ElitismGPAlgorithm even though properly the MaxIterations are set.

Setting the aforementioned line to:

Task<ProgramSolution, ProgramProblem> symbolicRegressionTask = new Task<>(sgpTrainingData, StopCriterion.ITERATIONS, 0, 0, 10000);

Results in the following error:

Exception in thread "main" java.lang.IllegalArgumentException: fromIndex(0) > toIndex(-100)
        at java.base/java.util.AbstractList.subListRangeCheck(AbstractList.java:509)
        at java.base/java.util.ArrayList.subList(ArrayList.java:1108)
        at org.um.feri.ears.algorithms.gp.ElitismGPAlgorithm.performEvaluation(ElitismGPAlgorithm.java:313)
        at org.um.feri.ears.algorithms.gp.ElitismGPAlgorithm.execute(ElitismGPAlgorithm.java:158)
        at org.um.feri.ears.algorithms.gp.ElitismGPAlgorithm.execute(ElitismGPAlgorithm.java:29)
        at org.um.feri.ears.examples.SymbolicRegressionExample.main(SymbolicRegressionExample.java:103)

If this is intended, it should return a proper throw message.

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

No branches or pull requests

1 participant