diff --git a/src/ai/heuristics/height.py b/src/ai/heuristics/height.py index 9ee8550..8f87b05 100644 --- a/src/ai/heuristics/height.py +++ b/src/ai/heuristics/height.py @@ -2,4 +2,13 @@ import numpy as np def aggregate_height(field: np.ndarray[int, np.dtype[np.uint8]]) -> int: - return 0 + """ + Calculates the aggregate height of the field. + + Args: + field: 2D array representing the game field. + + Returns: + The aggregate height of the field. + """ + return int(np.sum(field.shape[0] - np.argmax(field, axis=0)))