refactor: update dice handling and optimization flow to return structured results
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user