specless.synthesis.TSPSynthesisAlgorithm

class specless.synthesis.TSPSynthesisAlgorithm(tspsolver=None)[source]

Bases: SynthesisAlgorithm

Traveling Salesman Problem based synthesis algorithm

Methods

synthesize

Synthesizes a PlanStrategy in an env given the specification.

synthesize(env: Env, specification: Specification, num_agent: int = 1, init_nodes: List[Any] | None = None, *args, **kwargs) Strategy[source]

Synthesizes a PlanStrategy in an env given the specification.

Env+#Agent -> TS+#Agent -> (Nodes, Costs, ServiceTimes)+#Agent -> List[Strategy] -> MultiEnv * How should I deal with multiple robots?

Parameters:
  • env (gym.Env) – The environment in which to synthesize the strategy.

  • specification (Specification) – The specification for the strategy.

  • num_agent (int, optional) – The number of agents. Default is 1.

Returns:

The synthesized strategy.

Return type:

Strategy

Raises:

Exception – If the environment is not wrapped by MiniGridTransitionSystemWrapper.