Giter Site home page Giter Site logo

minerl-wrappers

Tests codecov PyPI PyPI - Python Version Libraries.io dependency status for latest release

minerl-wrappers compiles common wrappers and standardizes code for reproducibility in the MineRL environment!

Currently Supported Environments

Wappers

  • pfrl wrappers: an assortment of wrappers ported over from the 2020 PfN minerl baselines and 2019 PfN minerl baselines
    • Supports Basic Environments for 2019 and Diamond Competition Environments for 2020
  • diamond wrappers: updated wrappers for the 2021 MineRL Diamond Competition Environments

Wrap arguments

For documentation see wrapper files:
pfrl_2019_wrappers.py
pfrl_2020_wrappers.py
diamond_wrappers.py

Requirements

  • Java JDK 8
  • Python 3.7+

Install

Make sure you have Java JDK 8 installed as the only Java version for MineRL.

Install with pip from pypi:

pip install minerl-wrappers

Install directly from git:

pip install git+https://github.com/minerl-wrappers/minerl-wrappers.git

Clone and Install

git clone https://github.com/minerl-wrappers/minerl-wrappers.git
cd minerl-wrappers

Use your own virtual environment

virtualenv

Installed Python 3.7+

python3 -m virtualenv venv
source venv/bin/activate

conda

Install Anaconda or Miniconda

conda create --name minerl-wrappers python=3.7
conda activate minerl-wrappers

Install dependencies

  1. Install dependencies with pip:
# install fixed requirements
pip install -r requirements.txt
# set the minerl-wrappers module for imports
export PYTHONPATH=$PYTHONPATH:$(pwd)
  1. Install dependencies with poetry into your virtual environment:
# this also installs minerl-wrappers as a package
poetry install --no-dev

Use

To quickly test out the wrappers try:

import gym
import minerl
from minerl_wrappers import wrap

env = gym.make("MineRLObtainDiamondDenseVectorObf-v0")
env = wrap(env) # plug this into your rl algorithm

Change which wrappers to apply by supplying config arguments:

config = {
  "diamond": True,
  "diamond_config": {
    "frame_skip": 4,
    "frame_stack": 4,
  }
}
env = wrap(env, **config)

Contributing

It is highly encouraged to contribute wrappers that worked well for you! Just create a Pull Request on this repository, and we'll work together to get it merged! Read README-DEV.md for contributing guidelines and more details!

MineRL Wrappers's Projects

minerl-wrappers icon minerl-wrappers

minerl-wrappers compiles common wrappers and standardizes code for reproducibility in the MineRL environment!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.