pub fn equivalent(&self, rhs: &Self) -> bool {
        if (
            self.next_player,
            self.next_board,
            self.game_state,
            &self.global_states,
        ) != (
            rhs.next_player,
            rhs.next_board,
            rhs.game_state,
            &self.global_states,
        ) {
            return false;
        }
        if self.local_boards == rhs.local_boards {
            return true;
        }
        let mut done = self.global_states.donebits();
        for (lrow, rrow) in self
            .local_boards
            .rows
            .iter()
            .zip(rhs.local_boards.rows.iter())
        {
            let mut mask = (1 << 27) - 1;
            if done & 1 != 0 {
                mask &= !BOARD_MASK;
            }
            if done & 2 != 0 {
                mask &= !(BOARD_MASK << 9);
            }
            if done & 4 != 0 {
                mask &= !(BOARD_MASK << 18);
            }
            done >>= 3;
            if (lrow.x & mask) != (rrow.x & mask) {
                return false;
            }
            if (lrow.o & mask) != (rrow.o & mask) {
                return false;
            }
        }
        return true;
    }
// A position is equivalent to another if they are
// indistinguishable from the perspective of gameplay going
// forward, even if they may be observationally distinct.
A position is equivalent to another if they are
indistinguishable from the perspective of gameplay going
forward, even if they may be observationally distinct.
A position is equivalent to another if they are indistinguishable from the perspective of gameplay going forward even if they may be observationally distinct .
pub fn equivalent(&self, rhs: &Self) -> bool {
        if (
            self.next_player,
            self.next_board,
            self.game_state,
            &self.global_states,
        ) != (
            rhs.next_player,
            rhs.next_board,
            rhs.game_state,
            &self.global_states,
        ) {
            return false;
        }
        if self.local_boards == rhs.local_boards {
            return true;
        }
        let mut done = self.global_states.donebits();
        for (lrow, rrow) in self
            .local_boards
            .rows
            .iter()
            .zip(rhs.local_boards.rows.iter())
        {
            let mut mask = (1 << 27) - 1;
            if done & 1 != 0 {
                mask &= !BOARD_MASK;
            }
            if done & 2 != 0 {
                mask &= !(BOARD_MASK << 9);
            }
            if done & 4 != 0 {
                mask &= !(BOARD_MASK << 18);
            }
            done >>= 3;
            if (lrow.x & mask) != (rrow.x & mask) {
                return false;
            }
            if (lrow.o & mask) != (rrow.o & mask) {
                return false;
            }
        }
        return true;
    }
pub fn equivalent ( & self , rhs : & Self ) -> bool { if ( self . next_player , self . next_board , self . game_state , & self . global_states , ) != ( rhs . next_player , rhs . next_board , rhs . game_state , & self . global_states , ) { return false ; } if self . local_boards == rhs . local_boards { return true ; } let mut done = self . global_states . donebits ( ) ; for ( lrow , rrow ) in self . local_boards . rows . iter ( ) . zip ( rhs . local_boards . rows . iter ( ) ) { let mut mask = ( 1 << 27 ) - 1 ; if done & 1 != 0 { mask &= ! BOARD_MASK ; } if done & 2 != 0 { mask &= ! ( BOARD_MASK << 9 ) ; } if done & 4 != 0 { mask &= ! ( BOARD_MASK << 18 ) ; } done >>= 3 ; if ( lrow . x & mask ) != ( rrow . x & mask ) { return false ; } if ( lrow . o & mask ) != ( rrow . o & mask ) { return false ; } } return true ; }
A position is equivalent to another if they are
indistinguishable from the perspective of gameplay going
forward, even if they may be observationally distinct.
A position is equivalent to another if they are indistinguishable from the perspective of gameplay going forward even if they may be observationally distinct .
&self
rhs
&Self