founder-game-classifier 0.1.0
Classify content into 6 founder games using trained ML models
License: MIT
Requires Python: >=3.9
Keywords: classification, content-analysis, founders, machine-learning, nlp, sentence-transformers

# Founder Game Classifier

Classify content into 6 founder games using trained ML models.

## Installation

```bash
pip install founder-game-classifier
```

## Quick Start

```python
from founder_game_classifier import GameClassifier

# Load the model (downloads from Hugging Face Hub on first use)
classifier = GameClassifier.from_pretrained("leoguinan/founder-game-classifier")

# Classify text
result = classifier.predict("Here's a tactic you can steal for your next launch...")

print(result["primary_game"])      # "G2"
print(result["confidence"])        # 0.72
print(result["probabilities"])     # {"G1": 0.05, "G2": 0.72, ...}
```

## The 6 Founder Games

| Game | Name | Description |
|------|------|-------------|
| **G1** | Identity/Canon | Recruiting into identity, lineage, belonging, status |
| **G2** | Ideas/Play Mining | Extracting reusable tactics, heuristics; "do this / steal this" |
| **G3** | Models/Understanding | Building mental models, frameworks, explanations |
| **G4** | Performance/Competition | Winning, execution, metrics, zero-sum edges |
| **G5** | Meaning/Therapy | Healing, values, emotional processing, transformation |
| **G6** | Network/Coordination | Community building, protocols, collective action |

## Usage

### Single Text Classification

```python
result = classifier.predict("Here's the mental model I use...")

print(result)
# {
#     "primary_game": "G3",
#     "secondary_game": "G2",
#     "confidence": 0.68,
#     "probabilities": {"G1": 0.05, "G2": 0.22, "G3": 0.68, ...},
#     "primary_description": "Model/Understanding: building mental models...",
#     "secondary_description": "Idea/Play Mining: extracting reusable..."
# }
```

### Batch Classification

```python
texts = [
    "Here's the mental model I use for thinking about systems...",
    "Join our community of builders who are changing the world...",
    "I tried 47 different tactics. Here's what actually worked...",
]

results = classifier.predict_batch(texts)

for text, result in zip(texts, results):
    print(f"{result['primary_game']}: {text[:50]}...")
# G3: Here's the mental model I use for thinking about...
# G6: Join our community of builders who are changing...
# G2: I tried 47 different tactics. Here's what actual...
```

### Aggregate Game Signature

Analyze the overall game distribution of a corpus:

```python
# Load your content
texts = [
    open(f).read() for f in Path("my_blog_posts/").glob("*.txt")
]

# Get aggregate signature
signature = classifier.get_game_signature(texts)

print(signature)
# {'G1': 0.05, 'G2': 0.42, 'G3': 0.18, 'G4': 0.20, 'G5': 0.08, 'G6': 0.07}
```

### Local Model Loading

If you have the model files locally:

```python
classifier = GameClassifier.from_local(
    model_dir="./models/founder_classifier",
    manifolds_path="./game_manifolds.json",  # Optional
)
```

## Model Details

- **Embedding Model**: `all-MiniLM-L6-v2` (384 dimensions)
- **Classifier**: Logistic Regression
- **Training Data**: Labeled founder content (podcasts, blogs, tweets)

## Requirements

- Python 3.9+
- sentence-transformers
- scikit-learn
- huggingface-hub

## License

MIT License

## Links

- [Hugging Face Model](https://huggingface.co/leoguinan/founder-game-classifier)
- [GitHub Repository](https://github.com/leoguinan/founder-game-classifier)