Newer
Older

erwan
committed
(* Time-stamp: <modified the 21/06/2019 (at 17:29) by Erwan Jahier> *)
(* cf Collin-Dolex-94 *)
open Algo
let delta=10
let actions = ["a"]
let (init_state: int -> 'v) =
fun i ->
{
path = Array.make delta (-1);
par = -10
}
let (enable_f:'v neighbor list -> 'v -> action list) =
fun _nl v ->
if v.path = (Array.make delta (-1)) then [] else ["a"]
let (step_f : 'v neighbor list -> 'v -> action -> 'v) =
fun nl v ->
| "a" -> { v with path = Array.make delta (-1) }
| _ -> assert false
Algo.register {
algo = [
{
algo_id = "p";
init_state = P.init_state;
actions = Some P.actions;
enab = P.enable_f;
step = P.step_f;
};{
algo_id = "root";
init_state = init_state;
actions = Some actions;
enab = enable_f;
step = step_f;
}
];
state_to_string = P.dfs_value_to_string;

erwan
committed
state_of_string = None;
copy_state = P.dfs_value_copy;
}