Giter VIP home page Giter VIP logo

deckard's Introduction

DECKARD Minecraft Agent

image

The DECKARD Minecraft agent uses knowledge from large language models to assist the exploration for reinforcement learning agents. This repository includes our implementation of the DECKARD agent for collecting and crafting arbitrary items in Minecraft. For additional details about our approach please see our website and paper, Do Embodied Agents Dream of Electric Sheep?.

Installation

We use Minedojo for agent training and evaluation in Minecraft. Before installing python dependencies for Minedojo, you will need openjdk-8-jdk and python>=3.9. This guide contains additional installation details for the Minedojo simulator.

If you didn't clone the VPT submodule yet, run:

git submodule update --init --recursive

Next, install python packages:

pip install -r requirements.txt

We finetune our agent from OpenAI's VPT Minecraft agent. Download their pretrained weights using our script:

bash download_model.sh

Finally, we use MineClip for reward shaping. Download the weights here and place them at weights/mineclip_attn.pth.

Usage

The default way to use DECKARD occasionally pauses exploration to train subtasks. Run this method using:

python main.py

Alternatively, you can pretrain policies for subtasks by running:

python subtask.py --task base_task --target_item log

Then, add the trained subtask checkpoint to your yaml config under techtree_specs.tasks:

my_config:
  task_id: creative
  sim: minedojo
  fast_reset: 0
  terminal_specs:
    max_steps: 10000
  techtree_specs:
    guide_path: data/codex_techtree.json
    target_item: wooden_pickaxe
    tasks:
      log: log_checkpoint.zip

and run DECKARD for building the Minecraft technology tree using:

python techtree.py --config my_config

Note that Minecraft requires using xvfb-run to render on a virtual display when using a headless machine.

deckard's People

Contributors

kolbytn 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.