Home

Awesome

Plan4MC: Skill Reinforcement Learning and Planning for Open-World Minecraft Tasks

<div align="center">

[Website] [Arxiv Paper]

PyPI - Python Version <img src="https://img.shields.io/badge/Framework-PyTorch-red.svg"/> GitHub license


</div>

Plan4MC is a multi-task agent in Minecraft, solving long-term tasks via planning over basic skills. It acquire three types of fine-grained basic skills through reinforcement learning without demonstrations. With a skill graph pre-generated by the Large Language Model, the skill search algorithm generates skill plans and interactively selects policies to solve complicated tasks. Plan4MC accomplishes 24 diverse hard tasks in Minecraft.

Installation

Tasks

from envs.minecraft_hard_task import MinecraftHardHarvestEnv
from minedojo.sim import InventoryItem
import utils
task_name = 'harvest_mutton_with_diamond_sword'
task_conf = utils.get_yaml_data('envs/hard_task_conf.yaml')[task_name]
init_items = {}
if 'initial_inventory' in task_conf:
    init_items = task_conf['initial_inventory']
    init_inv = [InventoryItem(slot=i, name=k, variant=None, quantity=task_conf['initial_inventory'][k]) for i,k in enumerate(list(task_conf['initial_inventory'].keys()))]
    task_conf['initial_inventory'] = init_inv
env = MinecraftHardHarvestEnv(image_size=(160,256), **task_conf)

Plan4MC

Citation

@article{yuan2023plan4mc,
      title={{Plan4MC}: Skill Reinforcement Learning and Planning for Open-World {Minecraft} Tasks}, 
      author={Yuan, Haoqi and Zhang, Chi and Wang, Hongcheng and Xie, Feiyang and Cai, Penglin and Dong, Hao and Lu, Zongqing},
      journal={arXiv preprint arXiv:2303.16563},
      year={2023},
}