Behavioral cloning model for Gin Rummy trained via supervised fine-tuning on expert trajectories.
This model was trained on 32,000 stratified expert game states to learn optimal Gin Rummy decision-making. It serves as the initialization for subsequent GRPO (Group Relative Policy Optimization) self-play training.
Model Details
Model type: Causal language model (decoder-only transformer)
Training samples: 32,000 (stratified sampling, minimum 1,000 per action type)
Validation samples: 1,000 (perfectly balanced, 200 per action type)
Source: Expert agent gameplay using Monte Carlo Tree Search (MCTS)
Action distribution (training set):
discard (discard a card): 44.6%
draw (draw from stock): 33.1%
+discard (pick from discard pile): 14.9%
KNOCK-[card] (knock and discard): 4.0%
pass (pass on upcard): 3.5%
Validation set: Perfectly balanced with exactly 200 samples per action type for unbiased evaluation.
Training Procedure
Fine-tuning platform: Together AI (serverless LoRA training)
Hyperparameters:
LoRA rank: 16 (0.8B, 2B) / 32 (4B)
LoRA alpha: 16 (0.8B, 2B) / 32 (4B)
LoRA dropout: 0.05
LoRA modules: all-linear
Learning rate: 1e-4 (0.8B) / 5e-5 (2B, 4B)
Batch size: 8
Epochs: 3
Warmup ratio: 0.1
Weight decay: 0.01
Max gradient norm: 1.0
Train on inputs: False (loss calculated only on assistant response tokens)
Training duration: ~2-4 hours per model
Infrastructure:
Platform: Together AI
GPUs: NVIDIA H100 (serverless)
Precision: bfloat16
Intended Use
Primary Use Case
This model serves as the warm-start initialization for GRPO self-play training:
HBC (Behavioral Cloning) ← This model
Learn from expert trajectories
Acquire strong baseline policy
Fast convergence to competent play
GRPO (Group Relative Policy Optimization) ← Next stage
Self-play reinforcement learning
Discover novel strategies
Optimize for win rate
Inference
The model predicts the next action given the current game state formatted as a chat conversation:
Input format:
[SYSTEM]
You are an expert Gin Rummy player. Your goal is to minimize deadwood and form melds.
[USER]
History:
1. You: +D6x -C3
2. Opp: draw -CK
Now:
Hand: CK D2 D3 D4 D5 D6 D9 H7 HK HQ S9
Stock: 28 | Deadwood: 45 | Phase: discard_or_knock
YOUR TURN | Can: no
[ASSISTANT]
Output (predicted action):
-H7
Action format:
draw - Draw from stock pile
+discard - Pick from discard pile
-[CARD] - Discard a card (e.g., -H7 = discard 7 of Hearts)