summaryrefslogtreecommitdiff
path: root/ai/src/main.rs
diff options
context:
space:
mode:
authorMicha White <botahamec@outlook.com>2023-09-27 09:41:01 -0400
committerMicha White <botahamec@outlook.com>2023-09-27 09:41:01 -0400
commitf7a7bf20a99b1d52ef5f936705611ce24a1006b7 (patch)
tree1fd1c71d1e94d664f9f6c74e7610eb94b0c68f49 /ai/src/main.rs
parent89a1d6b488f83d121e55d8a6c08efe01649bb692 (diff)
Edited some of the crates
Diffstat (limited to 'ai/src/main.rs')
-rw-r--r--ai/src/main.rs25
1 files changed, 0 insertions, 25 deletions
diff --git a/ai/src/main.rs b/ai/src/main.rs
deleted file mode 100644
index dcedcb5..0000000
--- a/ai/src/main.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-use ai::TranspositionTable;
-
-const DEPTH: u8 = 18;
-
-fn main() {
- let board = ai::CheckersBitBoard::starting_position();
- let mut table = TranspositionTable::new(50_000);
- let mut alpha = -1.0;
- let mut beta = 1.0;
- for i in 0..DEPTH {
- let mut eval = ai::negamax(i, alpha, beta, board, table.mut_ref());
-
- if (eval <= alpha) || (eval >= beta) {
- eval = ai::negamax(i, -1.0, 1.0, board, table.mut_ref());
- }
-
- alpha = f32::max(eval + 0.125, -1.0);
- beta = f32::min(eval + 0.125, 1.0);
- }
-
- println!(
- "{:?}",
- ai::negamax(DEPTH, alpha, beta, board, table.mut_ref(),)
- );
-}