RLcard is an open-source framework for developing and evaluating reinforcement learning agents across multiple card game environments. It functions as a card game environment simulator, a multi-agent RL platform, and a benchmarking toolkit for algorithms like DQN, NFSP, and CFR.
The framework provides a game-agnostic environment interface that decouples agent logic from game mechanics, allowing any policy to interact through a common API. It supports pluggable reinforcement learning algorithms that operate on this interface without modifying game logic, and includes a self-play training loop for generating training data through repeated episodes between copies of the same agent.
RLcard enables running complete game episodes, evaluating agent performance by capturing trajectories and final payoffs, and stepping through game decision trees one action at a time for tree-search algorithm exploration. It also supports human versus AI play against pre-trained or rule-based models through terminal or GUI interfaces. The framework includes deterministic state serialization for use in tree-search algorithms and replay buffers, along with a trajectory recording pipeline for post-hoc analysis.