这是indexloc提供的服务,不要输入任何密码
Skip to content

jhsul/minerl-combat

 
 

Repository files navigation

minerl-combat

This is a fork of minerl v1.0.0 with additional gym environments for player versus mob combat scenarios. Although combat is our focus, this package provides an interface for setting up environments via a list of minecraft chat commands; this can potentially be extended for many other scenarios.

Requirements

These are not set in stone and you may be able to get this to work with different versions, but these are safe options that should work 🤞

Installation

Remove any existing minerl installation

pip uninstall minerl -y

Clone this repository

git clone https://github.com/jhsul/minerl-combat
cd minerl-combat

Install with pip (this may take awhile)

pip install -r requirements.txt
pip install .

Environments

This fork introduces the following environments:

  • MineRLPunchCow-v0
  • MineRLPunchCowEz-v0 (cow cannot die)
  • MineRLPunchCowEzTest-v0 (cow can die)
  • MineRLFightSkeleton-v0
  • MineRLFightZombie-v0
  • MineRLEnderdragon-v0

Basic Usage

import logging
import gym
import minerl
import coloredlogs

coloredlogs.install(logging.DEBUG)

env = gym.make("MineRLPunchCow-v0")
env.reset()

done = False

while not done:
    # do nothing
    ac = env.action_space.noop()
    obs, reward, done, info = env.step(ac)

    env.render()

env.close()

Usage with VPT

To see this in action with VPT, please install minerl-combat as per the instructions and check out our other repository, BattleCraftRL.

About

Fork of MineRL v1.0.0 with additional gym environments for combat

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 78.5%
  • Python 20.3%
  • CMake 0.5%
  • Shell 0.3%
  • Batchfile 0.2%
  • Jinja 0.1%
  • GLSL 0.1%