Downloads · 30 days
0
egpivo/hangman-dqn-baseline
hangman-dqn-baseline is a text generation model from egpivo. Use it when you need the model to write or continue text. The card lists the license as mit.
A Deep Q-Network (DQN) model trained to play Hangman using a Dueling Q-Network architecture with Transformer encoder.
Downloads · 30 days
0
Access
Public
Updated Sep 4, 2025
Repo size
1.8 MB
Likes
0
Public
Click a slice to open those files.
.bin1.8 MB · 98%
From the Hugging Face model README
A Deep Q-Network (DQN) model trained to play Hangman using a Dueling Q-Network architecture with Transformer encoder.
This model uses a Dueling Q-Network architecture with:
| Strategy | Win Rate | Description |
|---|---|---|
| CAND | 0.866 | Candidate filtering (optimal) |
| IGX | 0.127 | Information gain exact |
| POS | 0.160 | Positional priors |
| LEN | 0.112 | Length-based priors |
| IG | 0.100 | Information gain |
DuelingQNet(
d_model=128,
nhead=4,
nlayers=2,
ff_mult=4,
max_len=35,
dropout=0.1
)
import torch
from hangman.rl.models import DuelingQNet
# Load model
model = DuelingQNet(d_model=128, nhead=4, nlayers=2, ff_mult=4, max_len=35, dropout=0.1)
checkpoint = torch.load('bc_dueling_qnet.pt', map_location='cpu')
model.load_state_dict(checkpoint['model'])
# Use with hangman environment
# (See simulator_playground.py for complete usage)
The model is evaluated using the simulator_playground.py script which provides:
bc_dueling_qnet.pt: PyTorch model checkpointsimulator_playground.py: Evaluation and analysis tooltraining_monitor.py: Training progress monitoringperformance_report.md: Detailed performance analysis@misc{hangman-dqn-hangman dqn baseline,
title={Hangman DQN: Deep Q-Network for Hangman Game},
author={Your Name},
year={2025},
publisher={Hugging Face},
howpublished={\url{https://huggingface.co/your-username/hangman dqn baseline}}
}
MIT License - see LICENSE file for details.