nmmo.task.scenario module#

class nmmo.task.scenario.Scenario(config: Config)#

Bases: object

Utility class to aid in defining common tasks

add_task(task: Task)#
add_tasks(tasks: Union[Task, Iterable[Task], Callable[[Group], Task]], groups: Optional[Union[str, Iterable[Group]]] = 'teams') None#

Utility function to define symmetric tasks

Params:

tasks:
Iterable[Task]:

For each Task in the iterable, add to scenario.

Callable[[Group], Task]:

A function taking in a group and return a task. The result from applying this function to “groups” is added to the scenario.

Task:

Mapped to Callable by overriding subject

groups:

Foreach group in groups, add a task.

property tasks: List[Task]#
nmmo.task.scenario.default_task(agents) List[Tuple[Task, float]]#

Generates the default reward on env.init