Fixed min hovedet under armen kode
This commit is contained in:
parent
d275955296
commit
520ca077fd
28
pubeval.py
28
pubeval.py
|
@ -42,25 +42,13 @@ class Pubeval:
|
||||||
0.00000, 3.42040
|
0.00000, 3.42040
|
||||||
]
|
]
|
||||||
|
|
||||||
def pubeval(race, pos):
|
|
||||||
|
def pubeval(self, race, pos):
|
||||||
|
|
||||||
if pos[26] == 15:
|
if pos[26] == 15:
|
||||||
return 99999999.0
|
return 99999999.0
|
||||||
|
|
||||||
setx(pos)
|
self.x = [0]*122
|
||||||
score = 0.0
|
|
||||||
if race:
|
|
||||||
for i in range(122):
|
|
||||||
score = score + self.wr[i]*self.x[i]
|
|
||||||
else:
|
|
||||||
for i in range(122):
|
|
||||||
score = score + self.wc[i]*self.x[i]
|
|
||||||
return score
|
|
||||||
|
|
||||||
def setx(pos):
|
|
||||||
|
|
||||||
for j in range(122):
|
|
||||||
self.x[j] = 0.0
|
|
||||||
|
|
||||||
for j in range(1,25):
|
for j in range(1,25):
|
||||||
jm1 = j-1
|
jm1 = j-1
|
||||||
|
@ -79,3 +67,13 @@ class Pubeval:
|
||||||
self.x[120] = -(pos[0]/2.0)
|
self.x[120] = -(pos[0]/2.0)
|
||||||
self.x[121] = (pos[26]/15.0)
|
self.x[121] = (pos[26]/15.0)
|
||||||
|
|
||||||
|
score = 0.0
|
||||||
|
if race:
|
||||||
|
for i in range(122):
|
||||||
|
score = score + self.wr[i]*self.x[i]
|
||||||
|
else:
|
||||||
|
for i in range(122):
|
||||||
|
score = score + self.wc[i]*self.x[i]
|
||||||
|
return score
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user