abstract away more coordinates

This commit is contained in:
2025-02-27 21:00:04 -05:00
parent 956386fb66
commit 6ae1726010
12 changed files with 251 additions and 204 deletions

View File

@@ -1,7 +1,7 @@
use crate::{
agent::Agent,
logic::{FutureMoveConfig, FutureMoves},
repr::{Board, Coord, Piece},
repr::{Board, CoordPair, Piece},
};
pub struct ComplexAgent {
@@ -17,7 +17,7 @@ impl ComplexAgent {
min_arena_depth_sub: 3,
top_k_children: 2,
up_to_minus: 3,
max_arena_size: 50_000_000,
max_arena_size: 10_000_000,
};
Self {
color,
@@ -27,7 +27,7 @@ impl ComplexAgent {
}
impl Agent for ComplexAgent {
fn next_move(&mut self, board: &Board) -> Option<(Coord, Coord)> {
fn next_move(&mut self, board: &Board) -> Option<CoordPair> {
self.future_moves.update_from_board(board);
println!("# of moves stored: {}", self.future_moves.arena_len());