From adc54d20d7ca9c3255e32b3ec7f72e713c9cae36 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Tue, 7 Jun 2022 07:09:40 +0200 Subject: [PATCH] direct: delete experimental stuff --- direct/birect.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/direct/birect.py b/direct/birect.py index 2bdf498..ca7548f 100644 --- a/direct/birect.py +++ b/direct/birect.py @@ -66,11 +66,6 @@ def birect( def no_more_evals(): return max_evals is not None and n + 1 >= max_evals - avg = lambda a, b: (a + b) / 2 # TODO: delete me! - diff = lambda a, b: -abs(a - b) / 2 # TODO: delete me! - cycle_funs = [min, max, avg, diff] # TODO: delete me! - cycle_funs = [min, avg, max, diff, max, avg] # TODO: delete me! - cycle_funs = [min] # TODO: delete me! # interesting. using cycle_funs = [max] seems optimal for objective2210. def gather_potential(v_i): @@ -78,18 +73,13 @@ def birect( # x = diameter of hyper-rectangle # y = minimum loss of the two points (v_fl, v_fu) within it - cycle_fun = cycle_funs[outer % len(cycle_funs)] # TODO: delete me! - # TODO: make this faster. use a sorted queue and peek at the best for each depth. # start by finding the arg-minimum for each set of equal-diameter rects. bests = {} # mapping of depth to arg-minimum value (i.e. its index) for i in v_i: fl, fu = v_fl[i], v_fu[i] - f = cycle_fun(fl, fu) # TODO: use min(fl, fu)! + f = min(fl, fu) depth = v_depth[i] - if cycle_fun == diff: # TODO: delete me! - # f = f * (1 << depth) # TODO: delete me! - f = f / diagonal_cache[depth] # TODO: delete me! if by_longest: depth = depth // dims * dims # assert depth < depth_limit