4math commited on
Commit
88f5c08
·
verified ·
1 Parent(s): 408f007

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. README.md +26 -19
  2. config.json +6 -6
  3. 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 Predictor
22
 
23
- > **Educational Project NOT affiliated with Legend Story Studios or the official Flesh and Blood game.**
24
 
25
- A scikit-learn RandomForest regression model that predicts **win rates** for custom
26
- Teklovossen (Mechanologist) card decks in the [Flesh and Blood](https://fabtcg.com/) TCG.
27
 
28
- Trained on local using simulated gameplay data.
 
29
 
30
  ## Model
31
 
32
  | Detail | Value |
33
  |--------|-------|
34
- | Type | `Pipeline(StandardScaler RandomForestRegressor)` |
35
- | Task | Tabular regression predict avg win rate |
36
  | Framework | scikit-learn 1.8.0 |
37
- | Training | local (local machine) |
38
 
39
- ## Features (19 inputs)
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 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,16 +56,16 @@ Trained on local using simulated gameplay data.
56
 
57
  ## Output
58
 
59
- `avg_win_rate` float [0, 1].
60
 
61
  ## Metrics
62
 
63
  | Metric | Value |
64
  |--------|-------|
65
- | Train | 0.7666 |
66
- | CV (mean ± std) | 0.1381 ± 0.2349 |
67
- | Train MSE | 0.0775 |
68
- | Train MAE | 0.163 |
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)) # predicted win rate
84
  ```
85
 
 
 
 
 
 
 
 
86
  ## Limitations
87
 
88
  - Trained on **simulated** data, not real tournament results
89
- - Small dataset (9 samples) rough estimates only
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:14:11.174996",
26
  "metrics": {
27
- "train_r2": 0.7666,
28
- "train_mse": 0.0775,
29
- "train_mae": 0.163,
30
- "cv_r2_mean": 0.1381,
31
- "cv_r2_std": 0.2349,
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:56cacbb15ec89759267022bc2e609577274ed94b41c2bef967e09a54f08a0251
3
- size 13306
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1d9b4c7b57ee1ca549288182b3481698c5044ed55d5a7163bd83f409ae01e6d4
3
+ size 16618