File size: 976 Bytes
ca22575
 
 
 
 
 
 
 
 
 
 
 
 
96c354e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
title: Black-Jack AI-Coach
emoji: 👁
colorFrom: gray
colorTo: pink
sdk: gradio
sdk_version: 5.39.0
app_file: app.py
pinned: false
short_description: 21 Brain - Learn the optimal Black Jack Strategy
---

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

This interactive app simulates a hand of Blackjack, powered by a Deep Q-Network (DQN) trained to make optimal decisions. Each action is explained in plain English using an LLM (Mistral-7B via OpenRouter).

 Features
Reinforcement Learning Agent: A DQN chooses to Hit or Stick based on current state.

LLM Explanation: Mistral-7B explains the model’s move via OpenRouter API.

Interactive Gradio UI: Play and understand Blackjack strategy in real-time.

Tech Stack
PyTorch for the trained DQN model

Gradio for the web UI

OpenRouter + Mistral-7B for action interpretation

dotenv for secure API key management

 Usage
Clone the repo or deploy on Hugging Face Spaces.