Skip to content

Commit

Permalink
Merge pull request #43 from dityas/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
dityas authored Jan 10, 2020
2 parents 8b394b0 + 19970aa commit 7a932a1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
Binary file modified Protos/build/Protos.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,27 @@ public void buildTree() {
List<Integer> prevNodes = new ArrayList<Integer>();
prevNodes.addAll(leafNodes);

for (int t = 1; t < this.maxT; t++) {

List<Integer> nextNodes = this.getNextPolicyNodes(prevNodes, t);
prevNodes = nextNodes;

if (t == 1) {
this.leafNodes.clear();
this.leafNodes.addAll(prevNodes);
}
/*
* if one step look ahead, don't add the next leaves to models
* but store them for computing the next step
*/
if (this.maxT == 1) {
this.leafNodes.clear();
this.leafNodes.addAll(this.getNextPolicyNodes(prevNodes, 1));
}

else {
for (int t = 1; t < this.maxT; t++) {

List<Integer> nextNodes = this.getNextPolicyNodes(prevNodes, t);
prevNodes = nextNodes;

if (t == 1) {
this.leafNodes.clear();
this.leafNodes.addAll(prevNodes);
}
}
}
}

// ----------------------------------------------------------------------------------------
Expand Down

0 comments on commit 7a932a1

Please sign in to comment.