[−][src]Struct connect6::policy::MultiPolicy
Black-White seperable policy
Because Agent
get single policy to play game, policy structure for black-white seperation is required.
It get two different policies and playing game with given seperately, black and white.
Examples
ⓘThis example is not tested
io_policy_stdio!(io_policy); let mut rand_policy = RandomPolicy::new(); let mut multi_policy = MultiPolicy::new(&mut rand_policy, &mut io_policy); Agent::debug(&mut multi_policy).play().unwrap();
Methods
impl<'a, 'b> MultiPolicy<'a, 'b>
[src]
pub fn new(
black_policy: &'a mut dyn Policy,
white_policy: &'b mut dyn Policy
) -> MultiPolicy<'a, 'b>
[src]
black_policy: &'a mut dyn Policy,
white_policy: &'b mut dyn Policy
) -> MultiPolicy<'a, 'b>
Construct a new MultiPolicy
Examples
let mut rand_policy = RandomPolicy::new(); let mut default_policy = DefaultPolicy::new(); let mut multi_policy = MultiPolicy::new(&mut rand_policy, &mut default_policy);
Trait Implementations
impl<'a, 'b> Policy for MultiPolicy<'a, 'b>
[src]
Auto Trait Implementations
impl<'a, 'b> !Send for MultiPolicy<'a, 'b>
impl<'a, 'b> !Sync for MultiPolicy<'a, 'b>
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,