diff --git a/.drone.yml b/.drone.yml index 1af18d3..8058c71 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,10 +3,6 @@ type: docker name: default steps: - - name: example_strats - image: "python:3.8" - commands: - - python3 manystrats.py - name: run_tournament image: "python:3.8" commands: diff --git a/strat/main.py b/strat/main.py index 4c12e11..70f604e 100644 --- a/strat/main.py +++ b/strat/main.py @@ -1,13 +1,12 @@ import numpy as np +def avg(ls: list) -> int: + return sum(ls) / len(ls) + + def decision(h1, h2): - if len(h1) == 0: - r = np.random.randint(2) - return r + if avg(h2) > 0.51: + return 1 else: - avg = 1.0 * sum(h1) / len(h1) - if avg <= 0.5: - return 0 - else: - return 1 + return 0