| 332 | | ( catch(run(competitive(Liters, 5, 9, 14), N, Average), Error, write_error) -> |
| | 332 | ( catch(run(cop_search(Liters, 5, 9, 14), N, Average), Error, write_error) -> |
| | 333 | ( var(Error) -> |
| | 334 | write_average(Average) |
| | 335 | ; true |
| | 336 | ) |
| | 337 | )), nl, |
| | 338 | write('DF+HC+BF'), put_char('\t'), |
| | 339 | loop::forto(Liters, 1, 14, |
| | 340 | ( catch(run(cop_overhead(Liters, 5, 9, 14), N, Average), Error, write_error) -> |
| 458 | | do_benchmark(competitive(_, _, _, _), _). |
| | 466 | do_benchmark(cop_search(_, _, _, _), _). |
| | 467 | |
| | 468 | do_benchmark(cop_overhead(Liters, Jug1, Jug2, MaxDepth), N) :- |
| | 469 | Obj = salt(Liters, Jug1, Jug2), |
| | 470 | Obj::initial_state(Initial), |
| | 471 | repeat(N), |
| | 472 | threaded(( |
| | 473 | catch(depth_first(MaxDepth)::solve(Obj, Initial, _), _, fail), |
| | 474 | catch(hill_climbing(MaxDepth)::solve(Obj, Initial, _, _), _, fail), |
| | 475 | catch(breadth_first(MaxDepth)::solve(Obj, Initial, _), _, fail) |
| | 476 | )), |
| | 477 | fail. |
| | 478 | do_benchmark(cop_overhead(_, _, _, _), _). |