giving speed info to brain

This commit is contained in:
2019-10-29 11:39:07 +01:00
parent 5c27c3c72f
commit 545ffd21ac
2 changed files with 3 additions and 3 deletions

2
car.py
View File

@@ -139,7 +139,7 @@ class Car(pygame.sprite.Sprite):
# print(self.probes)
def probe_brain(self):
res = self.brain.predict(np.array(self.probes))
res = self.brain.predict(np.array(self.probes + [self.speed]))
self.heading_change = res[0] * 30
self.throttle = res[1] * 5