PigDice
PigDice
Description
PigDice is an environment for evaluating agents on the dice game where players balance risk and reward to reach a target score. This environment wraps the PigDice implementation from TextArena, a framework for text-based game environments.
Capabilities
- Risk assessment and probability-based decision-making
- Strategic stopping under uncertainty
- Balancing short-term gains against potential losses
- Two-player competitive gameplay against an LLM opponent
Compute Requirements
PigDice does not require a sandbox. It has minimal compute requirements.
License
MIT.
Tasks
There are two splits: train (150 tasks) and test (150 tasks). Each split contains 50 tasks across each of 3 variants:
- PigDice-v0-short
- PigDice-v0
- PigDice-v0-long
Each task is seeded for reproducibility.
Reward Structure
This is a sparse reward environment. Rewards are mapped from TextArena's native range of {-1, 0, 1} to {0.0, 0.5, 1.0} via (raw + 1) / 2.
We do not use LLM graders for this environment; reward is determined programmatically.
Data
Game state is generated procedurally by the TextArena engine using seeded randomness. No external data files are required.
Tools
Agents are given two tools:
roll_die(): Roll the die to accumulate points. If you roll a 1, you lose your turn's points.hold_score(): Bank your turn's points and end your turn.
Time Horizon
PigDice is a multi-turn environment.
Environment Difficulty
Easy to Moderate. PigDice involves straightforward probability calculations and risk-reward tradeoffs, but optimal stopping strategies require balancing current position against opponent's score.
Other Environment Requirements
This environment requires an OpenAI API key (passed via secrets) to power the LLM opponent.
Safety
Agents in PigDice interact only with a dice game and have no access to external systems, the internet, or sensitive data. The environment does not present safety risks.
Citations
@software{textarena2024,
author = {Guertler, Leon and Banting, Wilfried and Pignatelli, Eduardo},
title = {TextArena},
year = {2024},
publisher = {GitHub},
url = {https://github.com/LeonGuertler/TextArena}
}