Run this model with HF Jobs
Run 4math/FAB_Prediction_Model on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/4math/FAB_Prediction_Model. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/4math/FAB_Prediction_Model on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use 4math/FAB_Prediction_Model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use 4math/FAB_Prediction_Model with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("4math/FAB_Prediction_Model", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
The first win-rate model of Teklo Study
dream cards for Teklovossen, the Mechanologist hero of Flesh and Blood, with a small game simulator and a model that predicts how often a deck wins.
Project on GitHub · Notebooks · Cards · What was wrong in v1
Fan-made project. Not affiliated with Legend Story Studios or the official Flesh and Blood game.
⚠️ This is the old v1 model. It learned from only 9 deck presets and does worse than guessing the average (cross-validated R² −1.33). It stays here so the mistakes can be studied. The project has since been rebuilt as v2 on GitHub, and a later lesson will publish the v2 model here in its place.
📦 What is in this repository
| File | What it is |
|---|---|
model.joblib |
the v1 model: Pipeline(StandardScaler + RandomForestRegressor), saved with scikit-learn 1.8.0 |
config.json |
training details and scores of v1; its list of feature names is wrong (see below) |
README.md |
this page |
📈 v1 and v2
The question: given only a deck list, how often will this deck win against the reference opponent?
| v1 (this model) | v2 (on GitHub) | |
|---|---|---|
| Training rows | 9 deck presets (5 of them identical) | 800 random decks |
| Cross-validated R² | −1.33 (worse than guessing the average) | 0.67 |
| Held-out test R² | not measured | 0.68, average miss 15 points |
| Best R² possible (luck of 50 games) | 0.98 |
v2 results. Left: four models compared with cross-validation. Right: with 9 decks, as in v1, the model is worse than guessing.
⚠️ Known problems with v1
A review of v1 found that its prediction could not work:
| Part | Problem in v1 |
|---|---|
| Decks | 9 presets, and 5 of them were the same 20 cards |
| Game engine | attack cards were never played from hand, items never entered play, defense was ignored |
| Game statistics | Evo counts and resources came from hand-typed tables plus random noise |
| Features | game length, final life and consistency were measured from the games, so they leaked the answer |
| Missing values | a missing card count was filled with the column average (a Nano deck "had" 3 AI cards) |
| Published card | the old Quick Start passed 19 numbers to a model expecting 17, so it crashed; config.json lists the wrong feature names |
How v2 fixes each one, step by step: docs/v1.md.
🔍 Loading the v1 model
For study only: its feature names are not reliable, so it cannot give useful predictions.
from huggingface_hub import hf_hub_download
import joblib
path = hf_hub_download(repo_id="4math/FAB_Prediction_Model", filename="model.joblib")
model = joblib.load(path) # needs scikit-learn 1.8.0
print(model) # StandardScaler + RandomForestRegressor
print(model.n_features_in_) # numbers expected per deck
A .joblib file can run code when it is loaded: only load files from a source you trust.
🃏 The project today
- 🃏 38 dream cards for Teklovossen along four tech paths (AI, Nano, Quantum, Bio).
- 🎨 Dream cards drawn as finished cards: frames cut from the concept art, text written by code so it is always spelled right, art from FLUX.1-schnell through Hugging Face Inference Providers.
- ⚔️ A readable game simulator where cost, pitch, power, defense, Go again, Boost, items and Evos all matter.
- 🎲 800 random decks × 50 games, played against one fixed opponent.
- 📓 Learning notebooks that build the prediction step by step: sanity checks, feature engineering, the leakage trap, baselines, cross-validation, learning curves and a held-out test set.
Dream cards drawn by notebook 04: frames cut from ChatGPT concept art, art by FLUX.1-schnell via Hugging Face (AI-generated).
📓 Learning notebooks
| # | Notebook | What you learn |
|---|---|---|
| 01 | Simulate games | build data you can trust: the simulator, a game play by play, sanity checks, 800 random decks |
| 02 | Build the dataset | features from the deck list only, feature engineering, the leakage trap |
| 03 | Train and evaluate | baselines, cross-validation, learning curves, the test set, the value of each card |
| 04 | Design dream cards | write a card, check the simulator reads it the way you meant, then draw it |
| 05 | Is each card balanced? | coming next |
| 06 | LLMs with Hugging Face Inference Providers | later |
| 07 | Publish to the Hugging Face Hub | later: the dataset and the v2 model, replacing this one |
🚀 Try v2
git clone https://github.com/4math2379/Evo-Study-FAB-ccg.git
cd Evo-Study-FAB-ccg
python -m venv venv
venv\Scripts\activate # Windows. On macOS or Linux: source venv/bin/activate
pip install -r requirements-v2.txt
jupyter lab notebooks/v2
Run the notebooks in order, then predict a deck:
python examples/predict_deck.py examples/decks/nano_evo.txt --simulate 200
Questions, ideas or problems: please open an issue on GitHub.
📄 License
The model is released under the MIT license, for educational use. Flesh and Blood and Teklovossen belong to Legend Story Studios; this project is fan-made and not affiliated with them.
- Downloads last month
- -
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("4math/FAB_Prediction_Model", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html