aiplan4eu / ma-plan-validator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multi-Agent Plan Validator

MA-Plan-Validator is a Python tool for validating plans in multi-agent planning scenarios. It integrates with the unified_planning library by the AIPlan4EU project, focusing on the conversion and validation of sequential and partial order plans.

Installation

To install MA-Plan-Validator:

pip install ma-plan-validator

you get the latest version. If you need an older version, you can install it with:

pip install ma-plan-validator==<version number>

Usage

Validate a MultiAgent-Planning problem

from ma_plan_validator import MAPlanValidator
import unified_planning as up

problem = up.model.multi_agent.MultiAgentProblem('myproblem')
# specify the problem (e.g. agents, agent public fluents, agent private fluents, environment fluents, initial state, agent actions, goal)
...
plan = up.plans.Plan('my_ma_plan')
# plan generated by a Multi-agent planner
...
# Initialize the validator
validator = MAPlanValidator()

# Validate the plan
result = validator.validate(problem, plan)
print(result)

About

License:Apache License 2.0


Languages

Language:Python 99.6%Language:Shell 0.4%