Post History
The "Uppers" def oneup(data, history): if len(history) > 0: prev = history[-1] if prev[2] > 1: better = [prev[0] + 1, prev[1] + 1, prev[2] - 2] elif prev[1] > 1: better...
Answer
#1: Initial revision
# The "Uppers" ```py def oneup(data, history): if len(history) > 0: prev = history[-1] if prev[2] > 1: better = [prev[0] + 1, prev[1] + 1, prev[2] - 2] elif prev[1] > 1: better = [prev[0] + 1, prev[1] - 2, prev[2] + 1] else: better = [prev[0] - 2, prev[1] + 1, prev[2] + 1] random.shuffle(better) return better return [[180, 180, 0], [180, 0, 180], [0, 180, 180]][random.randint(0, 2)] def avgup(data, history): if 't1' not in data: data['t1'] = 0 data['t2'] = 0 data['t3'] = 0 if len(history) > 0: prev = history[-1] prev.sort() data['t1'] += prev[0] data['t2'] += prev[1] data['t3'] += prev[2] a1 = data['t1'] / len(history) a2 = data['t2'] / len(history) a3 = data['t3'] / len(history) if math.ceil(a1) + math.ceil(a2) <= 360: better = [math.ceil(a1), math.ceil(a2), 360 - math.ceil(a1) - math.ceil(a2)] else: better = [math.ceil(a1), 360 - math.ceil(a1), 0] random.shuffle(better) return better return [[180, 180, 0], [180, 0, 180], [0, 180, 180]][random.randint(0, 2)] ``` Two bots based off a single concept that seem to perform reasonably well. One takes the last submission the opponent made, and "one-ups" it - increments 2 values by 1 and decrements 1 value by 2. The other does the same thing, except with the average of all previous submissions by the opponent.