Giter VIP home page Giter VIP logo

mine_agent_baselines's Introduction

Mine Agent Final Project

Our src folder contains all of our relevant code. The engine.py is our main way of parsing arguments that are passed to our bash script - which we use to run our various experiments. Each of the other files has the main code for the various algorithms that we used for the given task: iq.py - the inverse q learning code that follows the example code from the paper, a2c.py - the a2c algorithm for our use case with the ability to load a pretrained model, and bc.py - the code for training and testing behavorial cloning.

For a quick start on testing our best performing model in the treechop environment, make sure to first follow in the installation instructions in the mineRL repo and install our requirements.txt.

Then you can run the following within the src file to run our best performing model in the TreeChop environement.

bash test.sh

All of our navigation code and baseline experiments can be found in src/experiments

Installation Guide

First make sure to have all of the needed requirements using our requirements.txt file. pip install -r requirements.txt

You will likely encounter an issue with the installation of MineRL if you are on MacOS or windows. In order to circumvent this follow these instructions:

  1. First follow install instructions on the official MineRL docs website https://minerl.readthedocs.io/en/v0.4.4/tutorials/index.html

  2. Install the follwing MixinGradle file that is missing from the repo's cache in order for Malmo to work: https://drive.google.com/file/d/1z9i21_GQrewE0zIgrpHY5kKMZ5IzDt6U/view?usp=drive_link

  3. Clone the mineRL repo locally and checkout their v0.4 branch that we are using. git clone https://github.com/minerllabs/minerl.git cd minerl git checkout v0.4

  4. Go into the build.gradle file cd minerl/Malmo/Minecraft

  5. Then update the build.gradle in the following way:

4.1 Add the following to the repositories section:

maven {
    url 'your path to the parent directory of the mixingradle file you installed'
}

4.2 Make sure your dependencies section looks like this:

dependencies {
        classpath 'org.ow2.asm:asm:6.0'
          classpath('MixinGradle-dcfaf61:MixinGradle:dcfaf61'){ // 0.6
            // Because forgegradle requires 6.0 (not -debug-all) while mixingradle depends on 5.0
            // and putting mixin right here will place it before forge in the class loader
            exclude group: 'org.ow2.asm', module: 'asm-debug-all'
        }

        classpath 'com.github.brandonhoughton:ForgeGradle:FG_2.2_patched-SNAPSHOT'
    }
  1. Now you should be able to pip install using this directory and have no issues.

For training and testing various different models - use the test.sh file in order to run the appropriate model that you are interested in using. The file has examples for each of the scripts that you can run for the various purposes you may have: bash test.sh

mine_agent_baselines's People

Contributors

laithaustin avatar karolisram avatar vwxyzjn avatar miffyli avatar

Watchers

 avatar

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.