From db9560dfac3529bf08a39ea053dfcd23f76b2054 Mon Sep 17 00:00:00 2001 From: Henri Bourcereau Date: Sat, 16 Aug 2025 21:47:12 +0200 Subject: [PATCH] fix dqn burn small --- bot/src/dqn/dqn_common.rs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/bot/src/dqn/dqn_common.rs b/bot/src/dqn/dqn_common.rs index d3e3c4e..27b1689 100644 --- a/bot/src/dqn/dqn_common.rs +++ b/bot/src/dqn/dqn_common.rs @@ -117,11 +117,15 @@ pub fn get_valid_actions(game_state: &crate::GameState) -> Vec { if let Some(color) = player_color { match game_state.turn_stage { - TurnStage::RollDice | TurnStage::RollWaiting => { + TurnStage::RollDice => { valid_actions.push(TrictracAction::Roll); } - TurnStage::MarkPoints | TurnStage::MarkAdvPoints => { + TurnStage::MarkPoints | TurnStage::MarkAdvPoints | TurnStage::RollWaiting => { // valid_actions.push(TrictracAction::Mark); + panic!( + "get_valid_actions not implemented for turn stage {:?}", + game_state.turn_stage + ); } TurnStage::HoldOrGoChoice => { valid_actions.push(TrictracAction::Go); @@ -134,10 +138,7 @@ pub fn get_valid_actions(game_state: &crate::GameState) -> Vec { assert_eq!(color, store::Color::White); for (move1, move2) in possible_moves { valid_actions.push(checker_moves_to_trictrac_action( - &move1, - &move2, - &color, - &game_state, + &move1, &move2, &color, game_state, )); } } @@ -149,10 +150,7 @@ pub fn get_valid_actions(game_state: &crate::GameState) -> Vec { assert_eq!(color, store::Color::White); for (move1, move2) in possible_moves { valid_actions.push(checker_moves_to_trictrac_action( - &move1, - &move2, - &color, - &game_state, + &move1, &move2, &color, game_state, )); } }