pub trait ResponseGenerator {
type State: State;
// Required method
fn generate(
&self,
state: &Self::State,
) -> Vec<<Self::State as State>::Action>;
}Expand description
Response generator trait for MCTS search
Required Associated Types§
Required Methods§
Sourcefn generate(&self, state: &Self::State) -> Vec<<Self::State as State>::Action>
fn generate(&self, state: &Self::State) -> Vec<<Self::State as State>::Action>
Generates a list of all possible legal actions from the given state.
§Arguments
state- state to respond to
§Returns
List of all possible legal actions for the given state.
§Notes
- All returned actions must be legal in the provided state.
- The order of actions is not significant unless required by the implementation.
- Returning no actions indicates that the player cannot respond. It does not necessarily indicate that the game is over or that the player has passed. If passing is allowed, then a pass must be a valid action.