mirror of
https://github.com/kristoferssolo/Tetris.git
synced 2025-10-21 20:00:35 +00:00
refactor(utils, ai): move chekpoint configs
This commit is contained in:
parent
bbdb824e52
commit
bd4f30b1b5
@ -33,7 +33,9 @@ def train(
|
|||||||
population.add_reporter(neat.StdOutReporter(True))
|
population.add_reporter(neat.StdOutReporter(True))
|
||||||
stats = neat.StatisticsReporter()
|
stats = neat.StatisticsReporter()
|
||||||
population.add_reporter(stats)
|
population.add_reporter(stats)
|
||||||
population.add_reporter(neat.Checkpointer(5, 900))
|
population.add_reporter(
|
||||||
|
neat.Checkpointer(CONFIG.ai.checkpoint_interval, CONFIG.ai.checkpoint_delay)
|
||||||
|
)
|
||||||
|
|
||||||
pe = neat.ParallelEvaluator(int(parallel), eval_genome)
|
pe = neat.ParallelEvaluator(int(parallel), eval_genome)
|
||||||
|
|
||||||
|
|||||||
@ -66,6 +66,8 @@ class AI:
|
|||||||
plot_path: Path = BASE_PATH / "plots"
|
plot_path: Path = BASE_PATH / "plots"
|
||||||
checkpoint_path: Path = BASE_PATH / "checkpoints"
|
checkpoint_path: Path = BASE_PATH / "checkpoints"
|
||||||
config_path: Path = BASE_PATH / "config"
|
config_path: Path = BASE_PATH / "config"
|
||||||
|
checkpoint_interval: int = 10
|
||||||
|
checkpoint_delay: int = 900
|
||||||
|
|
||||||
|
|
||||||
@define
|
@define
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user