Skip to main content

Add your description here

Project description

Craftax LM

A wrapper around the Craftax agent benchmark, for evaluating digital agents over extremely long time horizons.

Usage

First, download the package with pip install craftaxlm. Next, import the agent-computer interface of your choice via

from craftaxlm import CraftaxACI, CraftaxClassicACI

This package is early in development, so for implementation examples, please refer to the baseline ReAct implementation

Leaderboard

In order to make experiments reasonable to run across a range of LMs, currently the leaderboard evaluates agents in the following manner:

  1. Five rollouts are sampled from the agent, with a hard cap of 300 actions per rollout.
  2. The agent is evaluated using a modified version of the original Crafter score -
    sum(ln(1 + P(1_achievement_obtained)) for achievement in achievements) / (sum(ln(2) * len(achievements)))
    
    where P(1_achievement_obtained) is the probability of the achievement being obtained in a single rollout. The key idea is that incremental progress towards difficult achievements ought to weigh more heavily in the score.

Craftax-Classic

LM Algorithm Score (% max) Code
gpt-4o ReAct 29.6 CraftaxLM_Baselines
gpt-4o-mini ReAct 18.4 CraftaxLM_Baselines

Craftax-Full

LM Algorithm Score (% max) Code
gpt-4o-mini ReAct 02.9 CraftaxLM_Baselines

Dev Instructions

pyenv virtualenv craftax_env
poetry install

When in doubt

from jax import debug
...
debug.breakpoint()

📚 Citation

To learn more about Craftax, check out the paper website here. To cite the underlying Craftax environment, see:

@inproceedings{matthews2024craftax,
    author={Michael Matthews and Michael Beukman and Benjamin Ellis and Mikayel Samvelyan and Matthew Jackson and Samuel Coward and Jakob Foerster},
    title = {Craftax: A Lightning-Fast Benchmark for Open-Ended Reinforcement Learning},
    booktitle = {International Conference on Machine Learning ({ICML})},
    year = {2024}
}

To cite the Crafter benchmark, see:

@article{hafner2021crafter,
  title={Benchmarking the Spectrum of Agent Capabilities},
  author={Danijar Hafner},
  year={2021},
  journal={arXiv preprint arXiv:2109.06780},
}

Contributing

Setup

uv venv craftaxlm-dev
source craftaxlm-dev/bin/activate
uv sync
uv run ruff format .

Help Wanted

  • General code quality suggestions or improvements. Especially those that improve speed or reduce tokens.
  • PRs to fix issues or add afforances that help your LM agent perform well
  • Leaderboard submissions that demonstrate improved performance using algorithms for learning from data

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

craftaxlm-0.0.13.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

craftaxlm-0.0.13-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

Details for the file craftaxlm-0.0.13.tar.gz.

File metadata

  • Download URL: craftaxlm-0.0.13.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.8

File hashes

Hashes for craftaxlm-0.0.13.tar.gz
Algorithm Hash digest
SHA256 5f3ff3acd0e4dabbbd4a1579a5eb7c7261b9dac8310cecc1fc3c48ceaf39a5f4
MD5 af9ed98694f0fbe00866e9f61e599e93
BLAKE2b-256 77dfd52f2cc22c66bf82e3b1d71b5c3ea10797c424353809e725d1556cfe2972

See more details on using hashes here.

File details

Details for the file craftaxlm-0.0.13-py3-none-any.whl.

File metadata

  • Download URL: craftaxlm-0.0.13-py3-none-any.whl
  • Upload date:
  • Size: 21.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.8

File hashes

Hashes for craftaxlm-0.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 b7ce37f80ee02bff3f6d5eb3b97289c11388c58261f45ee1a7300f8d04a00fc7
MD5 7a8313786a111f62e2f15458ad4a7927
BLAKE2b-256 5b9743eb420956871bfb3e2d35696e61973f3f0a5feb4a35633521829115c35e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page