How to use the causality.causal_planner.CausalPlanner function in causality

To help you get started, we’ve selected a few causality examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mjedmonds / OpenLock / causality / causal_planner.py View on Github external
def load_trial(demonstration_file, perceptual_file):

    data, col_labels, fluent_vecs, action_vecs, fluent_labels, action_labels = load_csv(
        demonstration_file
    )
    perceptual_model = common.PerceptualModel(perceptual_file)

    # perceptual_model.pretty_print()

    causal_planner = CausalPlanner(fluent_labels, action_labels, perceptual_model)

    causal_planner.compute_action_seqs(fluent_vecs, action_vecs)

    return causal_planner