~cdv/aoc-2018-rs

f727439ed6bc969baa77f440f078af893e981a9f — Christopher Vittal 2 years ago 94f6d4c
Make heuristic bound smaller
1 files changed, 2 insertions(+), 2 deletions(-)

M src/bin/day12.rs
M src/bin/day12.rs => src/bin/day12.rs +2 -2
@@ 95,7 95,7 @@ fn main() {
    let mut sum = plant_sum(&line, zero);
    println!("  1: {}", sum);

    // Assumption, difference stabilizes eventually
    // Assumption, difference stabilizes eventually, leading to a linear formula
    let mut heuristic = 0;
    let mut diff = 0;
    let mut end_gen = 20;


@@ 111,7 111,7 @@ fn main() {
        } else {
            heuristic = 0;
        }
        if heuristic > 1000 {
        if heuristic > 20 {
            break;
        }
        diff = sum - prev;