Upload folder using huggingface_hub
Browse files- README.md +26 -19
- config.json +6 -6
- model.joblib +2 -2
README.md
CHANGED
|
@@ -7,7 +7,6 @@ tags:
|
|
| 7 |
- flesh-and-blood
|
| 8 |
- game-balance
|
| 9 |
- educational
|
| 10 |
-
- sagemaker
|
| 11 |
library_name: sklearn
|
| 12 |
pipeline_tag: tabular-regression
|
| 13 |
datasets:
|
|
@@ -18,25 +17,26 @@ metrics:
|
|
| 18 |
- mae
|
| 19 |
---
|
| 20 |
|
| 21 |
-
# Teklovossen Card Balance
|
| 22 |
|
| 23 |
-
> **Educational Project
|
| 24 |
|
| 25 |
-
A scikit-learn
|
| 26 |
-
|
| 27 |
|
| 28 |
-
|
|
|
|
| 29 |
|
| 30 |
## Model
|
| 31 |
|
| 32 |
| Detail | Value |
|
| 33 |
|--------|-------|
|
| 34 |
-
| Type | `Pipeline(StandardScaler
|
| 35 |
-
| Task | Tabular regression
|
| 36 |
| Framework | scikit-learn 1.8.0 |
|
| 37 |
-
| Training |
|
| 38 |
|
| 39 |
-
## Features (
|
| 40 |
|
| 41 |
| # | Feature | Description |
|
| 42 |
|---|---------|-------------|
|
|
@@ -44,7 +44,7 @@ Trained on local using simulated gameplay data.
|
|
| 44 |
| 1 | Nano | Nano-themed card count |
|
| 45 |
| 2 | Quantum | Quantum-themed card count |
|
| 46 |
| 3 | Base | Base card count |
|
| 47 |
-
| 4-8 | 0_cost
|
| 48 |
| 9-11 | equipment, item, action | Card type counts |
|
| 49 |
| 12 | avg_turns | Average game length |
|
| 50 |
| 13 | avg_evos | Average Evo equipment used |
|
|
@@ -56,16 +56,16 @@ Trained on local using simulated gameplay data.
|
|
| 56 |
|
| 57 |
## Output
|
| 58 |
|
| 59 |
-
`avg_win_rate`
|
| 60 |
|
| 61 |
## Metrics
|
| 62 |
|
| 63 |
| Metric | Value |
|
| 64 |
|--------|-------|
|
| 65 |
-
| Train
|
| 66 |
-
| CV
|
| 67 |
-
| Train MSE | 0.
|
| 68 |
-
| Train MAE | 0.
|
| 69 |
| Samples | 9 |
|
| 70 |
| Features | 17 |
|
| 71 |
|
|
@@ -80,15 +80,22 @@ model = joblib.load(path)
|
|
| 80 |
|
| 81 |
# Example: a Nano-focused deck
|
| 82 |
features = np.array([[9,0,0,2, 5,2,1,0, 9,9,12, 0.6, 9.4,13.6,7.3, 0.74, 6.7, 0,0]])
|
| 83 |
-
print(model.predict(features)) #
|
| 84 |
```
|
| 85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
## Limitations
|
| 87 |
|
| 88 |
- Trained on **simulated** data, not real tournament results
|
| 89 |
-
- Small dataset (9 samples)
|
| 90 |
- Simplified card mechanics in the simulation engine
|
| 91 |
-
- Fan-made cards only
|
| 92 |
|
| 93 |
## License
|
| 94 |
|
|
|
|
| 7 |
- flesh-and-blood
|
| 8 |
- game-balance
|
| 9 |
- educational
|
|
|
|
| 10 |
library_name: sklearn
|
| 11 |
pipeline_tag: tabular-regression
|
| 12 |
datasets:
|
|
|
|
| 17 |
- mae
|
| 18 |
---
|
| 19 |
|
| 20 |
+
# FAB Prediction Model - Teklovossen Card Balance
|
| 21 |
|
| 22 |
+
> **Educational Project - NOT affiliated with Legend Story Studios or the official Flesh and Blood game.**
|
| 23 |
|
| 24 |
+
A scikit-learn model that predicts **win rates** for custom Teklovossen (Mechanologist)
|
| 25 |
+
card decks in the [Flesh and Blood](https://fabtcg.com/) trading card game.
|
| 26 |
|
| 27 |
+
This project explores how machine learning can be applied to game balance analysis
|
| 28 |
+
using simulated gameplay data from a custom game engine.
|
| 29 |
|
| 30 |
## Model
|
| 31 |
|
| 32 |
| Detail | Value |
|
| 33 |
|--------|-------|
|
| 34 |
+
| Type | `Pipeline(StandardScaler + RandomForestRegressor)` |
|
| 35 |
+
| Task | Tabular regression - predict average win rate |
|
| 36 |
| Framework | scikit-learn 1.8.0 |
|
| 37 |
+
| Training data | Simulated gameplay (custom engine) |
|
| 38 |
|
| 39 |
+
## Features (inputs)
|
| 40 |
|
| 41 |
| # | Feature | Description |
|
| 42 |
|---|---------|-------------|
|
|
|
|
| 44 |
| 1 | Nano | Nano-themed card count |
|
| 45 |
| 2 | Quantum | Quantum-themed card count |
|
| 46 |
| 3 | Base | Base card count |
|
| 47 |
+
| 4-8 | 0_cost to 4_plus_cost | Cost curve distribution |
|
| 48 |
| 9-11 | equipment, item, action | Card type counts |
|
| 49 |
| 12 | avg_turns | Average game length |
|
| 50 |
| 13 | avg_evos | Average Evo equipment used |
|
|
|
|
| 56 |
|
| 57 |
## Output
|
| 58 |
|
| 59 |
+
`avg_win_rate` - float in [0, 1] representing predicted deck win rate.
|
| 60 |
|
| 61 |
## Metrics
|
| 62 |
|
| 63 |
| Metric | Value |
|
| 64 |
|--------|-------|
|
| 65 |
+
| Train R2 | 0.917 |
|
| 66 |
+
| CV R2 (mean +/- std) | -1.3332 +/- 2.1072 |
|
| 67 |
+
| Train MSE | 0.0049 |
|
| 68 |
+
| Train MAE | 0.042 |
|
| 69 |
| Samples | 9 |
|
| 70 |
| Features | 17 |
|
| 71 |
|
|
|
|
| 80 |
|
| 81 |
# Example: a Nano-focused deck
|
| 82 |
features = np.array([[9,0,0,2, 5,2,1,0, 9,9,12, 0.6, 9.4,13.6,7.3, 0.74, 6.7, 0,0]])
|
| 83 |
+
print(model.predict(features)) # predicted win rate
|
| 84 |
```
|
| 85 |
|
| 86 |
+
## About This Project
|
| 87 |
+
|
| 88 |
+
This is a fan-made educational project exploring ML for TCG game balance.
|
| 89 |
+
The model is trained on simulated gameplay data from a custom Flesh and Blood
|
| 90 |
+
game engine featuring Teklovossen, a Mechanologist hero with custom Evo cards
|
| 91 |
+
across four tech themes: AI, Nano, Quantum, and Biomancy.
|
| 92 |
+
|
| 93 |
## Limitations
|
| 94 |
|
| 95 |
- Trained on **simulated** data, not real tournament results
|
| 96 |
+
- Small dataset (9 samples) - treat predictions as rough estimates
|
| 97 |
- Simplified card mechanics in the simulation engine
|
| 98 |
+
- Fan-made cards only - does not cover the official card pool
|
| 99 |
|
| 100 |
## License
|
| 101 |
|
config.json
CHANGED
|
@@ -22,13 +22,13 @@
|
|
| 22 |
"avg_quantum_charges"
|
| 23 |
],
|
| 24 |
"sklearn_version": "1.8.0",
|
| 25 |
-
"trained_at": "2026-03-31T11:
|
| 26 |
"metrics": {
|
| 27 |
-
"train_r2": 0.
|
| 28 |
-
"train_mse": 0.
|
| 29 |
-
"train_mae": 0.
|
| 30 |
-
"cv_r2_mean":
|
| 31 |
-
"cv_r2_std":
|
| 32 |
"n_samples": 9,
|
| 33 |
"n_features": 17,
|
| 34 |
"training_mode": "local"
|
|
|
|
| 22 |
"avg_quantum_charges"
|
| 23 |
],
|
| 24 |
"sklearn_version": "1.8.0",
|
| 25 |
+
"trained_at": "2026-03-31T11:29:18.400928",
|
| 26 |
"metrics": {
|
| 27 |
+
"train_r2": 0.917,
|
| 28 |
+
"train_mse": 0.0049,
|
| 29 |
+
"train_mae": 0.042,
|
| 30 |
+
"cv_r2_mean": -1.3332,
|
| 31 |
+
"cv_r2_std": 2.1072,
|
| 32 |
"n_samples": 9,
|
| 33 |
"n_features": 17,
|
| 34 |
"training_mode": "local"
|
model.joblib
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1d9b4c7b57ee1ca549288182b3481698c5044ed55d5a7163bd83f409ae01e6d4
|
| 3 |
+
size 16618
|