Add 3 stuff

This commit is contained in:
Anthony Wang 2021-02-08 17:39:25 -06:00
parent a665306847
commit c03650a725
Signed by: a
GPG key ID: 6FD3502572299774
2 changed files with 3 additions and 4 deletions

View file

@ -74,7 +74,6 @@ class spaceship_bot:
# others
for other in others:
if other[2] == 0: continue
a,b = other[0],other[1]
for move in self.moves:
key = (a+move[0], b+move[1])
@ -94,9 +93,9 @@ class spaceship_bot:
v = oc.get((a, b))
if v == None: v = 0
if status == -1:
score.append(angle-2*v-math.sqrt(a*a+b*b)/64) # adjust this constant
score.append(angle-v/2-math.sqrt(a*a+b*b)/64) # adjust this constant
else:
score.append(-angle-2*v-math.sqrt(a*a+b*b)/64) # same
score.append(-angle-v/2-math.sqrt(a*a+b*b)/64) # same
idx = score.index(max(score))
return (self.moves[idx][0], self.moves[idx][1])

2
ai/re

File diff suppressed because one or more lines are too long