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

Dev #39

Merged
merged 2 commits into from
Jan 4, 2020
Merged

Dev #39

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
}

}