kpenev / poet

Documentation at:
https://kpenev.github.io/poet/
Mozilla Public License 2.0
10 stars 0 forks source link

Faulty logic in evolve_until() #26

Closed kpenev closed 4 years ago

kpenev commented 4 years ago

The function that actually computes a leg of evolution has a clearly faulty logical construct near line 1063:

                first_step = false;
            } while(
                step_rejected
                &&
                !first_step
                &&
                (
                    std::abs(stop.stop_condition_precision()) > __precision
                    ||
                    __stop_history_ages.size() == 1
                )
                &&
                stop.stop_reason() != LARGE_EXPANSION_ERROR
            );

The check of the value of first step immediately after it is set is nonsensical!

kpenev commented 4 years ago

Moved the fist_step reset to after the while.