# HG changeset patch # User Mike Pavone # Date 1342398385 25200 # Node ID 9f1ca5ba26848091a7e92fc76ec660826f8a4dd9 # Parent 0c09730c173e62ebfd8b5e65a210be5b18de671a Discard entries for which we can easily tell that it will be impossible for them to be better than the current best. This allows us to terminate when we cannot solve the map diff -r 0c09730c173e -r 9f1ca5ba2684 src/lifter.tp --- a/src/lifter.tp Sun Jul 15 17:21:27 2012 -0700 +++ b/src/lifter.tp Sun Jul 15 17:26:25 2012 -0700 @@ -72,7 +72,11 @@ curbest <- curfield } } else: { - nextstates append: curfield + //check theoretical max score for current map state + //discard paths that can never be better than our current best + if: (curfield maxScore) > (curbest score) { + nextstates append: curfield + } } } } diff -r 0c09730c173e -r 9f1ca5ba2684 src/sim.tp --- a/src/sim.tp Sun Jul 15 17:21:27 2012 -0700 +++ b/src/sim.tp Sun Jul 15 17:26:25 2012 -0700 @@ -196,6 +196,7 @@ waterproof <- 10 moves <- #[] score <- 0 + maxScore <- { score + (lambdaCount - (_robot collected)) * 25 + lambdaCount * 50 } addPoints <- :points { score <- score + points } ended <- {endreached} succeeded <- {_succeeded}