Package: crafter
Status:Stable releaseCrafterOpen world survival game for evaluating a wide range of agent abilities within
a single environment.OverviewCrafter features randomly generated 2D worlds where the player needs to forage
for food and water, find shelter to sleep, defend against monsters, collect
materials, and build tools. Crafter aims to be a fruitful benchmark for
reinforcement learning by focusing on the following design goals:Research challenges:Crafter poses substantial challenges to current
methods, evaluating strong generalization, wide and deep exploration,
representation learning, and long-term reasoning and credit assignment.Meaningful evaluation:Agents are evaluated by semantically meaningful
achievements that can be unlocked in each episode, offering insights into the
ability spectrum of both reward agents and unsupervised agents.Iteration speed:Crafter evaluates many agent abilities within a single
env, vastly reducing the computational requirements over benchmarks suites
that require training on many separate envs from scratch.See the research paper to find out more:Benchmarking the Spectrum of Agent
Capabilities@article{hafner2021crafter,
  title={Benchmarking the Spectrum of Agent Capabilities},
  author={Danijar Hafner},
  year={2021},
  journal={arXiv preprint arXiv:2109.06780},
}Play Yourselfpython3-mpipinstallcrafter# Install Crafterpython3-mpipinstallpygame# Needed for human interfacepython3-mcrafter.run_gui# Start the gameKeyboard mapping (click to expand)KeyActionWASDMove aroundSPACECollect material, drink from lake, hit creatureTABSleepTPlace a tableRPlace a rockFPlace a furnacePPlace a plant1Craft a wood pickaxe2Craft a stone pickaxe3Craft an iron pickaxe4Craft a wood sword5Craft a stone sword6Craft an iron swordInterfaceTo install Crafter, runpip3 install crafter. The environment follows theOpenAI Gyminterface. Observations are images of size (64, 64, 3) and
outputs are one of 17 categorical actions.importgymimportcrafterenv=gym.make('CrafterReward-v1')# Or CrafterNoReward-v1env=crafter.Recorder(env,'./path/to/logdir',save_stats=True,save_video=False,save_episode=False,)obs=env.reset()done=Falsewhilenotdone:action=env.action_space.sample()obs,reward,done,info=env.step(action)EvaluationAgents are allowed a budget of 1M environmnent steps and are evaluated by their
success rates of the 22 achievements and by their geometric mean score. Example
scripts for computing these are included in theanalysisdirectory of the
repository.Reward:The sparse reward is+1for unlocking an achievement during
the episode and-0.1or+0.1for lost or regenerated health points.
Results should be reported not as reward but as success rates and score.Success rates:The success rates of the 22 achievemnts are computed
as the percentage across all training episodes in which the achievement was
unlocked, allowing insights into the ability spectrum of an agent.Crafter score:The score is the geometric mean of success rates, so that
improvements on difficult achievements contribute more than improvements on
achievements with already high success rates.ScoreboardsPlease create a pull request if you would like to add your or another algorithm
to the scoreboards. For the reinforcement learning and unsupervised agents
categories, the interaction budget is 1M. The external knowledge category is
defined more broadly.Reinforcement LearningAlgorithmScore (%)RewardOpen SourceCurious Replay19.4±1.6-AutonomousAgentsLab/cr-dv3PPO (ResNet)15.6±1.610.3±0.5snu-mllab/Achievement-DistillationDreamerV314.5±1.611.7±1.9danijar/dreamerv3LSTM-SPCNN12.1±0.8—astanic/crafter-oodEDE11.7±1.0—yidingjiang/edeOC-SA11.1±0.7—astanic/crafter-oodDreamerV210.0±1.29.0±1.7danijar/dreamerv2PPO4.6±0.34.2±1.2DLR-RM/stable-baselines3Rainbow4.3±0.26.0±1.3Kaixhin/RainbowUnsupervised AgentsAlgorithmScore (%)RewardOpen SourcePlan2Explore2.1±0.12.1±1.5danijar/dreamerv2RND2.0±0.10.7±1.3alirezakazemipour/PPO-RNDRandom1.6±0.02.1±1.3—External KnowledgeAlgorithmScore (%)RewardUsesInteractionOpen SourceHuman50.5±6.814.3±2.3Life experience0crafter_human_datasetSPRING27.3±1.212.3±0.7LLM, scene description, Crafter paper0❌Achievement Distillation21.8±1.412.6±0.3Reward structure1Msnu-mllab/Achievement-DistillationELLM—6.0±0.4LLM, scene description5M❌BaselinesBaseline scores of various agents are available for Crafter, both with and
without rewards. The scores are available in JSON format in thescoresdirectory of the repository. For comparison, the score of human expert players
is 50.5%. Thebaseline
implementationsare available as
a separate repository.QuestionsPleaseopen an issueon Github.