mirror of
https://github.com/kristoferssolo/Tetris.git
synced 2026-03-22 00:36:20 +00:00
feat(ai): add fitness calculation
This commit is contained in:
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
|
||||||
Reference in New Issue
Block a user