How to use the problog.tasks.dtproblog.dtproblog function in problog

To help you get started, we’ve selected a few problog 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 thiagopbueno / mdp-problog / sysadmin.py View on Github external
def solve_problog(model, debug=False):
    program = PrologString(model)
    decisions, score, statistics = dtproblog(program)
    if debug:
        print('score: %s' % score)
        for name, value in decisions.items():
            print('%s: %s' % (name, value))
    return (score, decisions)