All Projects → danijar → crafter

danijar / crafter

Licence: MIT license
Benchmarking the Spectrum of Agent Capabilities

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to crafter

robotic-warehouse
Multi-Robot Warehouse (RWARE): A multi-agent reinforcement learning environment
Stars: ✭ 62 (-64.16%)
Mutual labels:  environment, simulation
Robotics-Warehouse
A warehouse environment for robotics simulation in Unity.
Stars: ✭ 17 (-90.17%)
Mutual labels:  environment, simulation
GYM XPLANE ML
GYM Environment for XPlane. Reinforcement Learning and Autonomous Piloting.
Stars: ✭ 45 (-73.99%)
Mutual labels:  simulation
Bandit
Bandit algorithms
Stars: ✭ 26 (-84.97%)
Mutual labels:  simulation
osrd
Open Source Railway Designer
Stars: ✭ 54 (-68.79%)
Mutual labels:  simulation
TraceR
Trace Replay and Network Simulation Framework
Stars: ✭ 17 (-90.17%)
Mutual labels:  simulation
nvjob-boids
#NVJOB Simple Boids (Flocks of Birds, Fish and Insects). Flocking Simulation. Free Unity Asset.
Stars: ✭ 55 (-68.21%)
Mutual labels:  simulation
bullet
JVM Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.
Stars: ✭ 35 (-79.77%)
Mutual labels:  simulation
covid-19-vis
This repository contains data visualizations based on RKI and DIVI using kepler.gl
Stars: ✭ 25 (-85.55%)
Mutual labels:  simulation
tutorials-hg1
These tutorials demonstrate the usage of the Harfang API
Stars: ✭ 12 (-93.06%)
Mutual labels:  simulation
pyphysim
Simulation of Digital Communication (physical layer) in Python.
Stars: ✭ 78 (-54.91%)
Mutual labels:  simulation
pyenvdiff-lib
Python environment comparison tool
Stars: ✭ 23 (-86.71%)
Mutual labels:  environment
gzweb
Web client for Gazebo classic simulation
Stars: ✭ 36 (-79.19%)
Mutual labels:  simulation
landlord
Magic: The Gathering mulligan and card draw simulator
Stars: ✭ 16 (-90.75%)
Mutual labels:  simulation
piclas
PICLas is a parallel, three-dimensional PIC-DSMC solver developed cooperatively by the Institute of Space Systems, Institute of Aerodynamics and Gas Dynamics at the University of Stuttgart and the spin-off boltzplatz. PICLas is a flexible particle-based plasma simulation suite.
Stars: ✭ 34 (-80.35%)
Mutual labels:  simulation
dotfiles
My personal app/env configs and dotfiles.
Stars: ✭ 27 (-84.39%)
Mutual labels:  environment
protons
OpenMM testbed for constant-pH methodologies.
Stars: ✭ 18 (-89.6%)
Mutual labels:  simulation
ur5
UR5 Robot with a Robotiq gripper
Stars: ✭ 77 (-55.49%)
Mutual labels:  simulation
laravel-conditional-providers
THIS PACKAGE HAS BEEN DEPRECATED — Load Laravel service providers and facades based on the current environment.
Stars: ✭ 26 (-84.97%)
Mutual labels:  environment
toybox
a collection of computational playthings.
Stars: ✭ 94 (-45.66%)
Mutual labels:  simulation

Status: Stable release

PyPI

Crafter

Open world survival game for evaluating a wide range of agent abilities within a single environment.

Crafter Terrain

Overview

Crafter 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 Yourself

python3 -m pip install crafter  # Install Crafter
python3 -m pip install pygame   # Needed for human interface
python3 -m crafter.run_gui      # Start the game
Keyboard mapping (click to expand)
Key Action
WASD Move around
SPACE Collect material, drink from lake, hit creature
TAB Sleep
T Place a table
R Place a rock
F Place a furnace
P Place a plant
1 Craft a wood pickaxe
2 Craft a stone pickaxe
3 Craft an iron pickaxe
4 Craft a wood sword
5 Craft a stone sword
6 Craft an iron sword

Crafter Video

Interface

To install Crafter, run pip3 install crafter. The environment follows the OpenAI Gym interface. Observations are images of size (64, 64, 3) and outputs are one of 17 categorical actions.

import gym
import crafter

env = gym.make('CrafterReward-v1')  # Or CrafterNoReward-v1
env = crafter.Recorder(
  env, './path/to/logdir',
  save_stats=True,
  save_video=False,
  save_episode=False,
)

obs = env.reset()
done = False
while not done:
  action = env.action_space.sample()
  obs, reward, done, info = env.step(action)

Evaluation

Agents 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 the analysis directory of the repository.

  • Reward: The sparse reward is +1 for unlocking an achievement during the episode and -0.1 or +0.1 for 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.

Baselines

Baseline scores of various agents are available for Crafter, both with and without rewards. The scores are available in JSON format in the scores directory of the repository. For comparison, the score of human expert players is 50.5%. The baseline implementations are available as a separate repository.

Questions

Please open an issue on Github.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].