[][src]Struct connect6::policy::MultiPolicy

pub struct MultiPolicy<'a, 'b> { /* fields omitted */ }

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]

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]

fn next(&mut self, game: &Game) -> Option<(usize, usize)>[src]

Condition on game.turn to pass policy seperately

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]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T