Arelai is a lightweight open-source Python framework for developing and evaluating reinforcement learning agents. Designed with pedagogy in mind, it provides a minimal, scaffolded API that guides learners through the core abstractions of RL—environments, observations, actions, and reward signals—without obscuring the underlying concepts behind library complexity.
Design Philosophy
Many existing RL frameworks prioritize performance and flexibility at the cost of accessibility. Arelai takes a different approach: clarity over complexity.
Minimal API Surface
Only the essential abstractions are exposed. No hidden magic, no unnecessary wrappers—just the core concepts you need to understand RL.
Scaffolded Learning
The framework guides users through implementing agents step-by-step, reinforcing conceptual understanding as they build.
Transparent Internals
Every component is readable and modifiable. Students can trace exactly how observations flow through the system.
General Purpose
While designed for teaching, Arelai is fully capable of powering research projects and production applications.
Core Abstractions
Arelai is built around the fundamental concepts of reinforcement learning, exposed through clean interfaces:
Environments
Define the world your agent operates in, including state transitions and termination conditions.
Observations
What the agent perceives about the environment—partial or complete views of the state.
Actions
The decisions an agent can make, discrete or continuous, affecting the environment state.
Reward Signals
Feedback that shapes learning—customizable to encourage specific agent behaviors.
Getting Started
Installation
Clone the repository to get started:
git clone https://github.com/chandra-gummaluru/arelai.git
cd arelai
pip install -e .
Creating an Agent
Implement your own agent by extending the base class:
from arelai import Agent
class MyAgent(Agent):
def __init__(self, seed, name):
super().__init__(seed, name)
def select_action(self, actions, observation):
"""
Choose an action given the available actions
and current observation of the environment.
"""
# Your decision logic here
return actions[0]
def learn(self, old_obs, action, reward, new_obs):
"""
Update the agent's policy based on experience.
"""
# Your learning algorithm here
pass
Powers Bazaar-AI
Arelai serves as the backend engine powering Bazaar-AI, the interactive reinforcement learning playground based on the card game Jaipur. This real-world application demonstrates that Arelai's minimal design doesn't compromise capability—it can handle complex, multi-agent environments with partial observability and large action spaces.
While Bazaar-AI showcases what's possible with Arelai, the framework is fully general-purpose and suitable for use in any RL or agent-based learning context.
Source Code
Arelai is open source and available on GitHub. Contributions, bug reports, and feature requests are welcome.
Whether you're teaching an introductory AI course, learning RL on your own, or building research prototypes, Arelai provides a clear foundation to build on.