Compare commits
No commits in common. "e00eefb99020dca023a4b701bcfcf9c146a9d5bd" and "ac4c2d6f72b2bf2437104128abb2dd85fc8c8d3b" have entirely different histories.
e00eefb990
...
ac4c2d6f72
@ -17,7 +17,7 @@ use std::{
|
||||
time::{Duration, Instant},
|
||||
};
|
||||
|
||||
use log::{error, info, warn};
|
||||
use log::{error, info};
|
||||
use ordered_float::OrderedFloat;
|
||||
use rand::thread_rng;
|
||||
use serde_json::{json, Value};
|
||||
@ -126,7 +126,7 @@ pub fn get_move(
|
||||
game.ruleset.name == "constrictor",
|
||||
);
|
||||
let possible_actions = board.possible_actions().get(&game_info.my_token).cloned()?;
|
||||
if possible_actions.len() <= 1 {
|
||||
if possible_actions.len() == 1 {
|
||||
info!("Only one movement option exists in turn {turn}. Skipping Tree evaluation");
|
||||
return possible_actions.first().map(|direction| Action {
|
||||
r#move: *direction,
|
||||
@ -141,7 +141,7 @@ pub fn get_move(
|
||||
|mut guard| {
|
||||
let target_latency = game.timeout / 2;
|
||||
let latency = you.latency.parse().unwrap_or_else(|e| {
|
||||
warn!("Unable to parse latency: {e}");
|
||||
error!("Unable to parse latency: {e}");
|
||||
target_latency
|
||||
});
|
||||
let last_computation_time = u32::try_from(guard.as_millis()).unwrap_or(0);
|
||||
|
Loading…
Reference in New Issue
Block a user