mirror of
https://github.com/LHY0125/Gobang-Game.git
synced 2026-06-29 08:55:53 +08:00
feat(core): AI 棋形评分模块 — 连五/活四/冲四/活三等棋形打分
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
use crate::board::Board;
|
||||
use crate::types::{Color, Position};
|
||||
|
||||
/// AI 引擎统一接口
|
||||
pub trait AiEngine: Send + Sync {
|
||||
/// 返回 AI 的最佳落子位置, 无位置返回 None
|
||||
fn best_move(&self, board: &Board, color: Color) -> Option<Position>;
|
||||
}
|
||||
|
||||
pub mod evaluate;
|
||||
pub mod search;
|
||||
Reference in New Issue
Block a user