update: horses now probably learn
This commit is contained in:
+3
-1
@@ -46,7 +46,7 @@ class GameObject:
|
||||
self.image.set_colorkey(None) # Explicitly disable colorkey
|
||||
|
||||
class Horse(GameObject):
|
||||
default_vacceleration = 0.5 # Default acceleration value
|
||||
default_vacceleration = 0.3 # Default acceleration value
|
||||
vspeed = 0 # Vertical speed
|
||||
vacceleration = 0 # Vertical acceleration
|
||||
stopped = False # Whether the horse is stopped
|
||||
@@ -106,6 +106,8 @@ class Horse(GameObject):
|
||||
def count_fitness(self):
|
||||
if self.stopped == False:
|
||||
self.fitness += 1
|
||||
if self.vacceleration == 0:
|
||||
self.fitness -= 0.9
|
||||
|
||||
class Background(GameObject):
|
||||
def __init__(self, image_path, x, y):
|
||||
|
||||
Reference in New Issue
Block a user