mirror of
https://github.com/kristoferssolo/Tetris.git
synced 2025-10-21 20:00:35 +00:00
feat(ai): add fitness calculation
This commit is contained in:
parent
a49f03248f
commit
c16c031ae2
5
src/ai/fitness.py
Normal file
5
src/ai/fitness.py
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import neat
|
||||||
|
|
||||||
|
|
||||||
|
def calculate_fitness(app) -> float | int:
|
||||||
|
return app.game.score + app.game.lines * 100 + app.game.level * 1000
|
||||||
Loading…
Reference in New Issue
Block a user