added debug logger in seeding
This commit is contained in:
parent
369692b619
commit
67947116ec
1 changed files with 9 additions and 1 deletions
|
@ -1,9 +1,14 @@
|
|||
import numpy as np
|
||||
import logging
|
||||
|
||||
import numpy as np
|
||||
|
||||
# TODO: if set to competition mode, get the seed from the api
|
||||
|
||||
logger = logging.getLogger("complib-logger")
|
||||
|
||||
|
||||
def set_random_seed(seed: int):
|
||||
logger.debug(f"Seeding seed to: {seed}")
|
||||
np.random.seed(seed)
|
||||
|
||||
|
||||
|
@ -26,6 +31,8 @@ Logistic Centers: {self.logistic_center}"""
|
|||
|
||||
:param seed: Seed welcher zum Erstellen des Gamestates benutzt werden soll.
|
||||
"""
|
||||
|
||||
logger.debug(f"Creating gamestate with seed: {seed}")
|
||||
self.seed = seed
|
||||
set_random_seed(seed)
|
||||
|
||||
|
@ -83,6 +90,7 @@ Logistic Centers: {self.logistic_center}"""
|
|||
self.logistic_center[self.logistic_plan[i]][self.logistic_plan[i + 1]] += 1
|
||||
|
||||
self.logistic_plan = [x + 10 for x in self.logistic_plan]
|
||||
logger.debug(f"Created gamesate: {str(self)}")
|
||||
|
||||
def get_heuballen(self) -> int:
|
||||
"""
|
||||
|
|
Reference in a new issue