Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use distance
  • Loading branch information
ichyo committed Jun 23, 2019
1 parent b848f71 commit abb06bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/solve.rs
Expand Up @@ -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 => {}
_ => {
Expand Down
2 changes: 1 addition & 1 deletion test.sh
Expand Up @@ -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.