fogolydilemma/strat/main.py

13 lines
167 B
Python
Raw Normal View History

2020-09-11 00:27:55 +02:00
import numpy as np
2020-09-11 00:45:03 +02:00
def avg(ls: list) -> int:
return sum(ls) / len(ls)
2020-09-11 00:27:55 +02:00
def decision(h1, h2):
2020-09-11 00:45:03 +02:00
if avg(h2) > 0.51:
return 1
2020-09-11 00:27:55 +02:00
else:
2020-09-11 00:45:03 +02:00
return 0