diff options
-rw-r--r-- | neural.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -120,7 +120,7 @@ DoNNET(void) clock_t total_time = 0; int iterations = 0; static bool is_adjusted = false; - static int loops = 1; + static int loops = 0; /* ** Init random number generator. @@ -151,12 +151,10 @@ DoNNET(void) ** # of loops and increasing the loop count until we ** get a number of loops that we can use. */ - for (; loops < LOOP_MAX; loops++) { - randnum((int32_t)3); - if(DoNNetIteration(loops) > MINIMUM_TICKS) { - break; - } - } + do { + randnum(3); + ++loops; + } while ((DoNNetIteration(loops) <= MINIMUM_TICKS) && (loops < LOOP_MAX)); } do { |