a2c_ppo_acktr/envs.py
def make_env(scenario_name, benchmark=False, discrete_action=False):
    '''
    Creates a MultiAgentEnv object as env. This can be used similar to a gym
    environment by calling env.reset() and env.step().
    Use env.render() to view the environment on the screen.

    Input:
        scenario_name   :   name of the scenario from ./scenarios/ to be Returns
                            (without the .py extension)
        benchmark       :   whether you want to produce benchmarking data
                            (usually only done during evaluation)

    Some useful env properties (see environment.py):
        .observation_space  :   Returns the observation space for each agent
        .action_space       :   Returns the action space for each agent
        .n                  :   Returns the number of Agents
    '''
    from multiagent.environment import MultiAgentEnv
    import multiagent.scenarios as scenarios

    # load scenario from script
    scenario = scenarios.load(scenario_name + ".py").Scenario()
    # create world
    world = scenario.make_world()
    # create multiagent environment
    if benchmark:        
        env = MultiAgentEnv(world, scenario.reset_world, scenario.reward,
                            scenario.observation, scenario.benchmark_data,
                            discrete_action=discrete_action)
    else:
        env = MultiAgentEnv(world, scenario.reset_world, scenario.reward,
                            scenario.observation, scenario.info_coverage_rate, scenario.share_reward,
                            discrete_action=discrete_action)
    return env

    Creates a MultiAgentEnv object as env. This can be used similar to a gym
    environment by calling env.reset() and env.step().
    Use env.render() to view the environment on the screen.

    Input:
        scenario_name   :   name of the scenario from ./scenarios/ to be Returns
                            (without the .py extension)
        benchmark       :   whether you want to produce benchmarking data
                            (usually only done during evaluation)

    Some useful env properties (see environment.py):
        .observation_space  :   Returns the observation space for each agent
        .action_space       :   Returns the action space for each agent
        .n                  :   Returns the number of Agents
    
Creates a MultiAgentEnv object as env. This can be used similar to a gym
environment by calling env.reset() and env.step().
Use env.render() to view the environment on the screen.

scenario_name   :   name of the scenario from ./scenarios/ to be Returns
(without the .py extension)
benchmark       :   whether you want to produce benchmarking data
(usually only done during evaluation)

Some useful env properties :
.observation_space  :   Returns the observation space for each agent
.action_space       :   Returns the action space for each agent
.n                  :   Returns the number of Agents
Creates a MultiAgentEnv object as env . This can be used similar to a gym environment by calling env . reset () and env . step () . Use env . render () to view the environment on the screen . scenario_name : name of the scenario from . / scenarios / to be Returns ( without the . py extension ) benchmark : whether you want to produce benchmarking data ( usually only done during evaluation ) Some useful env properties : . observation_space : Returns the observation space for each agent . action_space : Returns the action space for each agent . n : Returns the number of Agents
def make_env(scenario_name, benchmark=False, discrete_action=False):
    from multiagent.environment import MultiAgentEnv
    import multiagent.scenarios as scenarios
    scenario = scenarios.load(scenario_name + ".py").Scenario()
    world = scenario.make_world()
    if benchmark:        
        env = MultiAgentEnv(world, scenario.reset_world, scenario.reward,
                            scenario.observation, scenario.benchmark_data,
                            discrete_action=discrete_action)
    else:
        env = MultiAgentEnv(world, scenario.reset_world, scenario.reward,
                            scenario.observation, scenario.info_coverage_rate, scenario.share_reward,
                            discrete_action=discrete_action)
    return env
def make_env ( scenario_name , benchmark = False , discrete_action = False ) : from multiagent . environment import MultiAgentEnv import multiagent . scenarios as scenarios scenario = scenarios . load ( scenario_name + ".py" ) . Scenario ( ) world = scenario . make_world ( ) if benchmark : env = MultiAgentEnv ( world , scenario . reset_world , scenario . reward , scenario . observation , scenario . benchmark_data , discrete_action = discrete_action ) else : env = MultiAgentEnv ( world , scenario . reset_world , scenario . reward , scenario . observation , scenario . info_coverage_rate , scenario . share_reward , discrete_action = discrete_action ) return env
Creates a MultiAgentEnv object as env.
Creates a MultiAgentEnv object as env .
'''
    Creates a MultiAgentEnv object as env. This can be used similar to a gym
    environment by calling env.reset() and env.step().
    Use env.render() to view the environment on the screen.

    Input:
        scenario_name   :   name of the scenario from ./scenarios/ to be Returns
                            (without the .py extension)
        benchmark       :   whether you want to produce benchmarking data
                            (usually only done during evaluation)

    Some useful env properties (see environment.py):
        .observation_space  :   Returns the observation space for each agent
        .action_space       :   Returns the action space for each agent
        .n                  :   Returns the number of Agents
    ''' # load scenario from script # create world # create multiagent environment
scenario_name
benchmark
discrete_action