refactor: update dice handling and optimization flow to return structured results

This commit is contained in:
2026-03-25 11:05:23 -03:00
parent 0470200d00
commit 7e66c98f26
5 changed files with 53 additions and 26 deletions

View File

@@ -1,6 +1,7 @@
from diceplayer.config.player_config import PlayerConfig
from diceplayer.dice.dice_handler import DiceHandler
from diceplayer.logger import logger
from diceplayer.optimization.optimization_handler import OptimizationHandler
from diceplayer.state.state_handler import StateHandler
from diceplayer.state.state_model import StateModel
from diceplayer.utils.potential import read_system_from_phb
@@ -45,9 +46,13 @@ class Player:
if not step_directory.exists():
step_directory.mkdir(parents=True)
state = DiceHandler(step_directory).run(state, state.current_cycle)
dice_environment = DiceHandler(step_directory).run(
state, state.current_cycle
)
# state = OptimizationHandler.run(state, state.current_cycle)
state = OptimizationHandler(step_directory).run(
state, state.current_cycle, dice_environment
)
state.current_cycle += 1
self._state_handler.save(state)