Skip to content

Commit

Permalink
Merge pull request #39 from dityas/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
dityas authored Jan 4, 2020
2 parents 661b21e + a2df8e2 commit 840e373
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Binary file modified Protos/build/Protos.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ public void boundedPerseusStartFromCurrent(
break;
}

if (this.declareApproxConvergenceForAlphaVectors(
if (stepId > 10 && this.declareApproxConvergenceForAlphaVectors(
this.alphaVectors.length, numIter, beliefRegion.length)) {
logger.warn("DECLARING APPROXIMATE CONVERGENCE AT ERROR: " + bellmanErr
+ " BECAUSE ALL BELIEFS ARE BEING USED AND NUM ALPHAS IS CONSTANT");
Expand Down
11 changes: 10 additions & 1 deletion Protos/src/thinclab/solvers/OnlineSolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,24 @@ public boolean declareApproxConvergenceForAlphaVectors(

this.numSimilar += 1;

/* set all trackers to initial values if declaring convergence */
if (this.numSimilar >= 5) {

this.numAlphas = -1;
this.numBeliefs = -1;
this.numSimilar = 0;

return true;
}

else return false;
}

return false;
else {

this.numSimilar = 0;
return false;
}
}

}

0 comments on commit 840e373

Please sign in to comment.