-
Notifications
You must be signed in to change notification settings - Fork 0
/
features.py
69 lines (65 loc) · 2.31 KB
/
features.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
level_one_weights = [
([1, 2], [0.9, 0.1]),
([1, 2], [0.9, 0.1]),
([1, 2, 3], [0.8, 0.1, 0.1]),
([1, 2, 3], [0.7, 0.2, 0.1]),
([1, 2, 3], [0.6, 0.2, 0.2]),
([1, 2, 3], [0.5, 0.3, 0.2]),
([1, 2, 3, 4], [0.5, 0.2, 0.2, 0.1]),
([1, 2, 3, 4], [0.4, 0.3, 0.2, 0.1]),
([1, 2, 3, 4], [0.4, 0.3, 0.2, 0.1]),
([1, 2, 3, 4], [0.3, 0.3, 0.3, 0.1]),
([1, 2, 3, 4], [0.2, 0.3, 0.3, 0.2]),
([1, 2, 3, 4], [0.2, 0.2, 0.3, 0.3]),
([1, 2, 3, 4], [0.2, 0.2, 0.3, 0.3]),
([1, 2, 3, 4], [0.2, 0.2, 0.3, 0.3]),
]
level_two_weights = [
([2], [1]),
([2, 3], [0.8, 0.2]),
([2, 3, 4], [0.7, 0.2, 0.1]),
([2, 3, 4], [0.6, 0.3, 0.1]),
([2, 3, 4, 5], [0.5, 0.3, 0.1, 0.1]),
([2, 3, 4, 5], [0.4, 0.3, 0.2, 0.1]),
([3, 4, 5], [0.4, 0.3, 0.3]),
([3, 4, 5, 6], [0.3, 0.3, 0.3, 0.1]),
([3, 4, 5, 6], [0.3, 0.3, 0.2, 0.2]),
([4, 5, 6], [0.4, 0.3, 0.3]),
([4, 5, 6, 7], [0.4, 0.3, 0.2, 0.1]),
([4, 5, 6, 7], [0.3, 0.3, 0.2, 0.2]),
([5, 6, 7], [0.5, 0.3, 0.2]),
([5, 6, 7, 8], [0.4, 0.2, 0.2, 0.2]),
([5, 6, 7, 8, 9], [0.2, 0.2, 0.2, 0.2, 0.2]),
([6, 7, 8, 9, 10], [0.2, 0.2, 0.2, 0.2, 0.2]),
([6, 7, 8, 9, 10, 11], [0.1, 0.1, 0.2, 0.2, 0.2, 0.2]),
([7, 8, 9, 10, 11, 12], [0.1, 0.1, 0.2, 0.2, 0.2, 0.2]),
]
level_three_weights = [
([3, 4], [0.8, 0.2]),
([3, 4], [0.5, 0.5]),
([3, 4, 5], [0.6, 0.2, 0.2]),
([3, 4, 5], [0.4, 0.3, 0.3]),
([3, 4, 5, 6], [0.2, 0.3, 0.3, 0.2]),
([4, 5, 6], [0.3, 0.3, 0.4]),
([4, 5, 6, 7], [0.2, 0.2, 0.3, 0.3]),
([5, 6, 7, 8], [0.3, 0.3, 0.2, 0.2]),
([5, 6, 7, 8], [0.2, 0.2, 0.3, 0.3]),
([6, 7, 8], [0.3, 0.4, 0.3]),
([6, 7, 8, 9], [0.3, 0.4, 0.2, 0.1]),
([6, 7, 8, 9], [0.2, 0.2, 0.3, 0.3]),
([7, 8, 9, 10], [0.4, 0.3, 0.2, 0.1]),
([8, 9, 10, 11], [0.4, 0.3, 0.2, 0.1]),
([9, 10, 11, 12], [0.4, 0.3, 0.2, 0.1]),
([10, 11, 12, 13], [0.4, 0.3, 0.2, 0.1]),
([11, 12, 13, 14], [0.4, 0.3, 0.2, 0.1]),
([12, 13, 14, 15], [0.4, 0.3, 0.2, 0.1]),
]
threshold = [3, 7, 13, 17, 28, 34, 50, 70, 85, 95, 100, 120, 170, 200, 230, 260]
HP_START = 50
ACTIONS_START = 3
TARGET_START = threshold[0]
NEXT_TARGET_START = threshold[1]
def fetch_target_score(threshold, turn, prev_target=0):
if turn >= len(threshold):
return int(prev_target * 1.1)
return threshold[turn]