Mở Minecraft

 - 
This commit does not belong khổng lồ any branch on this repository, & may belong khổng lồ a fork outside of the repository.

Bạn đang xem: Mở minecraft


A tag already exists with the provided branch name. Many Git commands accept both tag và branch names, so creating this branch may cause unexpected behavior. Are you sure you want to lớn create this branch?

Launching Visual Studio Code Your codespace will xuất hiện once ready.

There was a problem preparing your codespace, please try again.


gym MinecraftThis project is outdated, please use MalmoEnv instead.

Gym Minecraft is an environment bundle for OpenAI Gym. It is based on Microsoft"s Malmö, which is a platform for Artificial Intelligence experimentation và research built on top of Minecraft.

Xem thêm: Sâm Tố Nữ Có Tác Dụng Gì - 5 Tác Dụng Của Sâm Tố Nữ Khiến Chị Em “Say Đắm”

MinecraftDefaultWorld1-v0
*
MinecraftDefaultFlat1-v0
*
MinecraftTrickyArena1-v0
*
MinecraftEating1-v0
*
MinecraftCliffWalking1-v0
*
MinecraftMaze1-v0
*
MinecraftMaze2-v0
*
MinecraftBasic-v0
*
MinecraftObstacles-v0
*
MinecraftSimpleRoomMaze-v0
*
MinecraftAttic-v0
*
MinecraftVertical-v0
*
MinecraftComplexityUsage-v0
*
MinecraftMedium-v0
*
MinecraftHard-v0
*

Basically these are original Malmö missions with only added to speed up training.

Installation


git clone https://digitalseminar.com.vn/tambetm/minecraft-py.gitcd minecraft-py# NB! `minecraft_py` should be installed to writable user directory, either in virtualenv or with `--user` option.python setup.py install
gym-minecraft needs pygame khổng lồ render Minecraft screen. It is best khổng lồ have pygame installed via your system commands, i.e. Sudo apt-get install python-pygame or conda install pygame. Otherwise cài đặt will automatically download and compile pygame. This might need some additional dependencies though, see instructions for Ubuntu, OSX or Windows.

Run once following snippet:

import logginglogging.basicConfig(level=logging.DEBUG)import minecraft_pyproc, port = minecraft_py.start()minecraft_py.stop(proc)
Basically Minecraft downloads and compiles everything on first start, this snippet just starts minecraft_py in debug mode, so you can see when Minecraft gets stuck.

Running


import gymimport gym_minecraftenv = gym.make("MinecraftBasic-v0")env.init(start_minecraft=True)env.reset()done = Falsewhile not done: env.render() action = env.action_space.sample() obs, reward, done, info = env.step(action)env.close()
NB! Running Minecraft for the first time might take a while as it downloads and compiles itself. Next time the startup time should be shorter, but still around 30 seconds. In active development phase you might want khổng lồ start one permanent Minecraft process in background và remove start_minecraft=True, see wiki.

Xem thêm: Tampon Là Gì ? Cách Dùng Băng Vệ Sinh Dạng Ống Và Những Lưu Ý

Overriding mặc định settings

The default settings for environments might not be optimal for you. Luckily you can easily override them using init().

For example to lớn use discrete actions instead of continuous actions:


You signed in with another tab or window. Reload to lớn refresh your session. You signed out in another tab or window. Reload to lớn refresh your session.