mirror of
https://github.com/kristoferssolo/Tetris.git
synced 2026-03-22 00:36:20 +00:00
feat(ai): add bumpiness calculation
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import unittest
|
||||
|
||||
import numpy as np
|
||||
from ai.moves.bumpiness import bumpiness
|
||||
from ai.moves.height import aggregate_height
|
||||
from ai.moves.holes import holes
|
||||
from ai.moves.lines import complete_lines
|
||||
@@ -27,3 +28,6 @@ class TestFitness(unittest.TestCase):
|
||||
|
||||
def test_holes(self) -> None:
|
||||
self.assertEqual(holes(self.field), 2)
|
||||
|
||||
def test_bumpiness(self) -> None:
|
||||
self.assertEqual(bumpiness(self.field), 6)
|
||||
|
||||
Reference in New Issue
Block a user