Multipath brute force
This commit is contained in:
parent
20073b88ce
commit
5d9926fba7
4 changed files with 165 additions and 52 deletions
|
|
@ -11,14 +11,40 @@ fn main() {
|
|||
|
||||
b.add_path(
|
||||
(Position::new(1, 0), Direction::Down),
|
||||
(Position::new(4, 6), Direction::Up),
|
||||
(Position::new(0, 0), Direction::Up),
|
||||
);
|
||||
|
||||
b.set_blocked_range(0, 2, 5, 5, true);
|
||||
b.add_path(
|
||||
(Position::new(4, 0), Direction::Down),
|
||||
(Position::new(1, 7), Direction::Up),
|
||||
);
|
||||
|
||||
b.set_blocked_range(0, 2, 5, 4, true);
|
||||
// b.set_blocked_range(2, 0, 2, 2, true);
|
||||
|
||||
let mut b = b.build();
|
||||
|
||||
while b.next_finish_state() {
|
||||
println!("{}\n{}\n{}", b.count(), b.solution_count(), b);
|
||||
}
|
||||
|
||||
// println!("{}\n{}\n{}", b.count(), b.solution_count(), b);
|
||||
// b.next_state();
|
||||
// println!("{}\n{}\n{}", b.count(), b.solution_count(), b);
|
||||
// b.next_state();
|
||||
// println!("{}\n{}\n{}", b.count(), b.solution_count(), b);
|
||||
// b.next_state();
|
||||
// println!("{}\n{}\n{}", b.count(), b.solution_count(), b);
|
||||
// b.next_state();
|
||||
// println!("{}\n{}\n{}", b.count(), b.solution_count(), b);
|
||||
// b.next_state();
|
||||
// println!("{}\n{}\n{}", b.count(), b.solution_count(), b);
|
||||
// b.next_state();
|
||||
// println!("{}\n{}\n{}", b.count(), b.solution_count(), b);
|
||||
// b.next_state();
|
||||
// println!("{}\n{}\n{}", b.count(), b.solution_count(), b);
|
||||
// b.next_state();
|
||||
// println!("{}\n{}\n{}", b.count(), b.solution_count(), b);
|
||||
// b.next_state();
|
||||
// println!("{}\n{}\n{}", b.count(), b.solution_count(), b);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue