IsItPrime
IsItPrime
Description
IsItPrime is a time-pressured primality testing environment. The agent is given a number and must determine whether it is prime, answering "Yes" or "No" within a 10-second time limit. The environment tests both mathematical reasoning and response speed.
Capabilities
- Primality determination for numbers up to 100,000
- Time-constrained decision making (10-second limit)
- Binary classification (prime vs. composite)
Compute Requirements
Minimal. No GPU or significant memory required. Tasks are generated deterministically at startup.
License
MIT.
Tasks
There are two splits:
- train: 1,000 tasks (500 primes, 500 composites)
- test: 100 tasks (50 primes, 50 composites)
Numbers are sampled from the range [2, 100,000] using a fixed random seed for reproducibility.
Reward Structure
This is a sparse, verifiable reward environment. The reward is binary:
- 1.0 if the agent correctly identifies whether the number is prime within 10 seconds
- 0.0 if the answer is incorrect, the response is not "Yes"/"No", or the 10-second time limit is exceeded
The timer starts when get_prompt() is called and stops when the answer tool is invoked.
We do not use LLM graders for this task.
Data
Tasks are generated deterministically at class load time using a sieve of Eratosthenes for primes up to 100,000 and random sampling with fixed seeds (42 for train, 123 for test). No external data files are required.
Tools
- answer: Accepts a single string parameter (
answer) which must be "Yes" or "No". Returns the reward and correctness metadata.
Time Horizon
Single-turn environment. Exactly one tool call per task.
Other Environment Requirements
There are no further environment requirements; IsItPrime works out of the box with the OpenReward endpoint without any secrets.
Citations
@dataset{GRIsItPrime,
author = {General Reasoning Inc. Team},
title = {IsItPrime},
year = {2026},
publisher = {OpenReward},
url = {https://openreward.ai/RJT1990/IsItPrime}
}