Skip to content
Permalink
Browse files

Use distance

  • Loading branch information...
ichyo committed Jun 23, 2019
1 parent b848f71 commit abb06bc456a33dfcbd70819666ba8784a6d0a5b2
Showing with 6 additions and 2 deletions.
  1. +5 −1 src/solve.rs
  2. +1 −1 test.sh
@@ -255,7 +255,11 @@ impl<'a> State<'a> {
let (_, cost) = data[&c];

if self.is_goal(robot_idx, c) {
let value = (self.count_pass(robot_idx, c), rng.gen::<usize>());
let value = (
u32::max_value() - cost,
self.count_pass(robot_idx, c),
rng.gen::<usize>(),
);
match goal_value {
Some(goal_value) if goal_value > value => {}
_ => {
@@ -17,7 +17,7 @@ echo "Creating $OUTPUT"
mkdir -p $OUTPUT

SECONDS=0
./target/release/icfpc2019 --output $OUTPUT --input ./input
./target/release/icfpc2019 --output $OUTPUT --input ./input --duration 300
echo "$(date +"%Y-%m-%d %T"): running time is $SECONDS secs" | tee -a $LOG_FILE

cargo run --bin score --release -- --input ./input --output $OUTPUT | tee -a $LOG_FILE

0 comments on commit abb06bc

Please sign in to comment.
You can’t perform that action at this time.