skeleton
This commit is contained in:
10
Strats/tut.py
Normal file
10
Strats/tut.py
Normal file
@ -0,0 +1,10 @@
|
||||
# neptun1 neptun2
|
||||
|
||||
def init_bw():
|
||||
return 200
|
||||
|
||||
def decision(new, list_entry):
|
||||
# print '--', new, list_entry
|
||||
# print [1,[1 for x in list_entry]]
|
||||
return [1,[1 for x in list_entry]]
|
||||
|
17
Strats/tutgold.py
Normal file
17
Strats/tutgold.py
Normal file
@ -0,0 +1,17 @@
|
||||
# neptun1 neptun2
|
||||
|
||||
def init_bw():
|
||||
return 150
|
||||
|
||||
def decision(new, list_entry):
|
||||
# print '--', new, list_entry
|
||||
bw={'bronze': 1, 'silver': 3, 'gold': 10}
|
||||
if new != 'gold':
|
||||
br=len([x for x in list_entry if x[0]=='bronze'])
|
||||
go=len([x for x in list_entry if x[0]=='bronze'])
|
||||
si=len([x for x in list_entry if x[0]=='silver'])
|
||||
bwn=sum([bw[x[0]] for x in list_entry])
|
||||
if bwn > init_bw()-bw['gold']:
|
||||
return [0,[1 for x in list_entry]]
|
||||
return [1,[1 for x in list_entry]]
|
||||
|
14
Strats/tutplus.py
Normal file
14
Strats/tutplus.py
Normal file
@ -0,0 +1,14 @@
|
||||
# neptun1 neptun2
|
||||
|
||||
def init_bw():
|
||||
return 80
|
||||
|
||||
def decision(new, list_entry):
|
||||
# print '--', new, list_entry
|
||||
if new == 'gold':
|
||||
# print [1,[1 for x in list_entry]]
|
||||
return [1,[1 for x in list_entry]]
|
||||
else:
|
||||
# print [0,[1 for x in list_entry]]
|
||||
return [0,[1 for x in list_entry]]
|
||||
|
17
Strats/tutpro.py
Normal file
17
Strats/tutpro.py
Normal file
@ -0,0 +1,17 @@
|
||||
# neptun1 neptun2
|
||||
|
||||
def init_bw():
|
||||
return 100
|
||||
|
||||
def decision(new, list_entry):
|
||||
# print '--', new, list_entry
|
||||
bw={'bronze': 1, 'silver': 3, 'gold': 10}
|
||||
if new == 'gold':
|
||||
b=sum([bw[x[0]] for x in list_entry])
|
||||
if b+10>init_bw():
|
||||
br=len([x for x in list_entry if x[0]=='bronze'])
|
||||
si=len([x for x in list_entry if x[0]=='silver'])
|
||||
if b+10-br<=init_bw():
|
||||
return [1,[0 if x[0]=='bronze' else 0 for x in list_entry]]
|
||||
return [1,[1 for x in list_entry]]
|
||||
|
Reference in New Issue
Block a user