Closed minkymorgan closed 5 years ago
thinking about it, perhaps, another fix could be to remove from the division based operators from the configuration, where they could resolve to division by zero, although that may not be the only source of "zoo" conditions, so might not be a general solution in more complex cases. As an example, I could remove: / cos, 2 / sin, 2 / tan, 2 This might limit the generation of zoo generating functions sufficiently to proceed. I will test trying this out , see if this helps.
I ran a 500 generation test that completed when removing the division based operators for sin/cos/tan etc. Still think it's an edge case that might need some thought.
Andrew,
On 03/02/2018 11:08 AM, Andrew wrote:
I ran a 500 generation test that completed when removing the division based operators for sin/cos/tan etc. Still think it's an edge case that might need some thought.
Thank you for the continued feedback.
Strange. When Karoo was using Sympy, it happened often with basic arithmetic operators, so I had to manually catch and bypass 'zoo' errors. But I have not seen this occur since we switched Karoo to the Tensorflow maths library. I can reintroduce code that catches this, or as you have implemented, remove the divide by sin, cos, and tan functions. I need to give some more thought as to why this is happening at all ...
Per your first email of this subject, a 15 hours run is substantial! Eager to learn about the problem you are tackling.
Cheers, kai
I have discovered a small issue while running a classification task using the desktop tool. After having run large jobs for 15hours plus without issue, I decided to expand on the operators I'm using. After having done so, I'm getting an odd error. For some reason, the mutation function created a symbolic function operator called "zoo" which then failed to evaluate, throwing an error.
I managed to run it and get the same error again, and to capture the output. I think all the details to review the bug are below, but I am happy to provide the training file too if needed. A dump of the error is below, then I suggest some things I spotted digging into the code:
What I think may be going on, is that the translation of the raw tree of operations into a simpler symbolic representation (which happens in sympy from what I can gather), is evaluating a randomly generated expression as one representing a "complex infinity," which it names as the symbol "zoo".
There are some notes in the sympy docs about zoo here: http://docs.sympy.org/latest/modules/core.html
scroll down till you see:
Perhaps simply killing off mutations that are non-viable prior to evaluation could be a quick fix. It would mean filtering out symbolic trees that have strings found in a quarantine list, then running fitness evaluations on the filtered list only. Open to other suggestions too.
A
Andrew