[−][src]Struct ggpf::game::meta::simulated::Simulated
Simulated game
Methods
impl<G> Simulated<G> where
G: Features,
[src]
G: Features,
pub fn new(
turn: G::Player,
repr_state: Array<f32, Ix3>,
game_descriptor: G::Descriptor,
initial_possible_moves: Vec<G::Move>,
dynamics_evaluator: Sender<DynamicsEvaluatorChannel>,
support_size: usize
) -> Self
[src]
turn: G::Player,
repr_state: Array<f32, Ix3>,
game_descriptor: G::Descriptor,
initial_possible_moves: Vec<G::Move>,
dynamics_evaluator: Sender<DynamicsEvaluatorChannel>,
support_size: usize
) -> Self
Instanciate a new simulated game.
Params
turn
: starting player.repr_state
: initial repr state.initial_possible_moves
: available moves for the initial state.dynamics_evaluator
: evaluator for the dynamics network.
Trait Implementations
impl<G> Base for Simulated<G> where
G: Features + 'static,
[src]
G: Features + 'static,
type Move = G::Move
The type for a Move. Read more
fn possible_moves(&self) -> Vec<Self::Move>
[src]
fn is_finished(&self) -> bool
[src]
impl<G> Clone for Simulated<G> where
G: Features,
[src]
G: Features,
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<G> Debug for Simulated<G> where
G: Features,
[src]
G: Features,
impl<G> Features for Simulated<G> where
G: Features + 'static,
[src]
G: Features + 'static,
type StateDim = Ix3
Type dimension of the game state feature space. Read more
type ActionDim = G::ActionDim
Type dimension of the action feature space. Read more
type Descriptor = (Ix3, G::Descriptor)
Game features descriptor, that can be used to retrieve dimensions without having access to a game instance. Read more
fn get_features(&self) -> Self::Descriptor
[src]
fn state_dimension(descr: &Self::Descriptor) -> Self::StateDim
[src]
fn action_dimension(descr: &Self::Descriptor) -> Self::ActionDim
[src]
fn state_to_feature(&self, _pov: Self::Player) -> Array<f32, Self::StateDim>
[src]
fn moves_to_feature(
descr: &Self::Descriptor,
moves: &HashMap<Self::Move, f32>
) -> Array<f32, Self::ActionDim>
[src]
descr: &Self::Descriptor,
moves: &HashMap<Self::Move, f32>
) -> Array<f32, Self::ActionDim>
fn feature_to_moves(
&self,
features: &Array<f32, Self::ActionDim>
) -> HashMap<Self::Move, f32>
[src]
&self,
features: &Array<f32, Self::ActionDim>
) -> HashMap<Self::Move, f32>
fn all_possible_moves(descr: &Self::Descriptor) -> Vec<Self::Move>
[src]
fn all_feature_to_moves(
descr: &Self::Descriptor,
features: &Array<f32, Self::ActionDim>
) -> HashMap<Self::Move, f32>
[src]
descr: &Self::Descriptor,
features: &Array<f32, Self::ActionDim>
) -> HashMap<Self::Move, f32>
fn move_to_feature(
descr: &Self::Descriptor,
action: Self::Move
) -> Array<f32, Self::ActionDim>
[src]
descr: &Self::Descriptor,
action: Self::Move
) -> Array<f32, Self::ActionDim>
impl<G> Game for Simulated<G> where
G: Features + 'static,
[src]
G: Features + 'static,
type Player = G::Player
The type representing each player. Read more
fn players() -> Vec<Self::Player>
[src]
fn player_after(player: Self::Player) -> Self::Player
[src]
fn turn(&self) -> Self::Player
[src]
impl<G> Playable for Simulated<G> where
G: Features + 'static,
[src]
G: Features + 'static,
fn play<'life0, 'life1, 'async_trait>(
&'life0 mut self,
action: &'life1 Self::Move
) -> Pin<Box<dyn Future<Output = f32> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
action: &'life1 Self::Move
) -> Pin<Box<dyn Future<Output = f32> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
#[must_use]fn random_move<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = (Self::Move, f32)> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: Send + 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = (Self::Move, f32)> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: Send + 'async_trait,
Auto Trait Implementations
impl<G> !RefUnwindSafe for Simulated<G>
impl<G> Send for Simulated<G> where
<G as Features>::Descriptor: Send,
<G as Base>::Move: Send,
<G as Game>::Player: Send,
<G as Features>::Descriptor: Send,
<G as Base>::Move: Send,
<G as Game>::Player: Send,
impl<G> Sync for Simulated<G> where
<G as Features>::Descriptor: Sync,
<G as Base>::Move: Sync,
<G as Game>::Player: Sync,
<G as Features>::Descriptor: Sync,
<G as Base>::Move: Sync,
<G as Game>::Player: Sync,
impl<G> Unpin for Simulated<G> where
<G as Features>::Descriptor: Unpin,
<G as Base>::Move: Unpin,
<G as Game>::Player: Unpin,
<G as Features>::Descriptor: Unpin,
<G as Base>::Move: Unpin,
<G as Game>::Player: Unpin,
impl<G> !UnwindSafe for Simulated<G>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T> FromPy<T> for T
fn from_py(t: T, Python) -> T
impl<G> Game for G where
G: Singleplayer,
[src]
G: Singleplayer,
type Player = u8
The type representing each player. Read more
fn players() -> Vec<<G as Game>::Player>
[src]
fn player_after(<G as Game>::Player) -> <G as Game>::Player
[src]
fn turn(&Self) -> <G as Game>::Player
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> IntoPy<U> for T where
U: FromPy<T>,
U: FromPy<T>,
fn into_py(self, py: Python) -> U
impl<G> Playout for G where
G: Game + Clone + Send,
[src]
G: Game + Clone + Send,
#[must_use]fn playout_history<'life0, 'async_trait>(
&'life0 self,
pov: Self::Player
) -> Pin<Box<dyn Future<Output = (Self, Vec<(Self, Self::Move)>, f32)> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: Sync + 'async_trait,
[src]
&'life0 self,
pov: Self::Player
) -> Pin<Box<dyn Future<Output = (Self, Vec<(Self, Self::Move)>, f32)> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: Sync + 'async_trait,
#[must_use]fn playout_board<'life0, 'async_trait>(
&'life0 self,
pov: Self::Player
) -> Pin<Box<dyn Future<Output = (Self, f32)> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: Sync + 'async_trait,
[src]
&'life0 self,
pov: Self::Player
) -> Pin<Box<dyn Future<Output = (Self, f32)> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: Sync + 'async_trait,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,