refactor(ai): move fitness.py

This commit is contained in:
Kristofers Solo 2024-01-05 17:13:03 +02:00
parent b877fc2a59
commit 4a985b7e01
2 changed files with 3 additions and 6 deletions

View File

@ -0,0 +1,3 @@
from .fitness import calculate_fitness
__all__ = ["calculate_fitness"]

View File

@ -5,8 +5,6 @@ import numpy as np
from game import Game from game import Game
from utils import CONFIG from utils import CONFIG
from .log import log
def calculate_fitness(game: Game) -> float: def calculate_fitness(game: Game) -> float:
field = np.where(game.field != None, 1, 0) field = np.where(game.field != None, 1, 0)
@ -15,10 +13,6 @@ def calculate_fitness(game: Game) -> float:
return fitness return fitness
def get_peaks(field: np.ndarray) -> int:
pass
def get_row_transitions(field: np.ndarray) -> int: def get_row_transitions(field: np.ndarray) -> int:
pass pass