mirror of
https://github.com/Noratrieb/minmax.git
synced 2026-01-14 15:25:08 +01:00
Move ordering
This commit is contained in:
parent
41d15d0c94
commit
468532bb62
1 changed files with 1 additions and 2 deletions
|
|
@ -156,8 +156,7 @@ impl Game for Connect4 {
|
||||||
|
|
||||||
fn possible_moves(&self) -> impl Iterator<Item = Self::Move> {
|
fn possible_moves(&self) -> impl Iterator<Item = Self::Move> {
|
||||||
let board = self.clone();
|
let board = self.clone();
|
||||||
// FIXME: If we reorder the moves so that the potentially better ones (center) come first we get better.
|
[3, 2, 4, 1, 5, 0, 6].into_iter().filter(move |col| board[*col].is_none())
|
||||||
(0..WIDTH).filter(move |col| board[*col].is_none())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn result(&self) -> State {
|
fn result(&self) -> State {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue