improve binary operation
This commit is contained in:
parent
ec586ce598
commit
155a8d0548
@ -12,7 +12,7 @@ pub struct ComplexAgent {
|
|||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
impl ComplexAgent {
|
impl ComplexAgent {
|
||||||
pub const fn new(color: Piece) -> Self {
|
pub const fn new(color: Piece) -> Self {
|
||||||
const MAX_DEPTH: usize = 5;
|
const MAX_DEPTH: usize = 10;
|
||||||
const NON_LAZY_DEPTH: usize = 3;
|
const NON_LAZY_DEPTH: usize = 3;
|
||||||
Self {
|
Self {
|
||||||
color,
|
color,
|
||||||
|
|||||||
@ -65,11 +65,10 @@ impl FutureMoves {
|
|||||||
.unwrap(),
|
.unwrap(),
|
||||||
)
|
)
|
||||||
.flat_map(|node_idx| {
|
.flat_map(|node_idx| {
|
||||||
if (self.arena[node_idx].is_lazy
|
if (self.arena[node_idx].is_lazy && self.depth_of(node_idx) >= self.lazy_expire)
|
||||||
&& self.depth_of(node_idx) + 1 > self.lazy_expire)
|
|
||||||
|| !self.arena[node_idx].is_lazy
|
|| !self.arena[node_idx].is_lazy
|
||||||
{
|
{
|
||||||
self.generate_children(node_idx, i > self.lazy_expire)
|
self.generate_children(node_idx, i >= self.lazy_expire)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user