deepMind Lab 可以调用的python API 文档 ,从deepMindlab的代码上直接复制粘贴的,方便今后查看。

本文档详细介绍了DeepMind Lab的Python环境API,包括创建环境对象、设置配置、渲染选项及环境的方法如重置、获取状态、执行动作等。示例代码展示了如何使用这些API,例如加载游戏脚本、指定观察项和渲染方式。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Python environment API

The Python module deepmind_lab defines the Lab class. For example usage, there is python/tests/dmlab_module_test.py,python/random_agent.py, and python/random_agent_simple.py.

class deepmind_lab.Lab(levelobservationsconfig={}renderer='software')

Creates an environment object, loading the game script file level. The environment's observations() method will return the observations specified by name in the list observations.

The config dict specifies additional settings as key-value string pairs. The following options are recognized:

Option Description Default
width horizontal resolution of the observation frames '320'
height vertical resolution of the observation frames '240'
fps frames per second '60'
appendCommand Commands for the internal Quake console* ''

* See also Lua map API.

Unrecognized options are passed down to the level's init function. In Lua, this is kwargs.opts in api:init.

For example, you can run a modified version of the lt_chasm level with these calls,

import deepmind_lab

observations = ['RGBD']
env = deepmind_lab.Lab('lt_chasm', observations,
                       config={
  'width':
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值