# Quest Branching Factor Calculator AI Agent Connect

> Quantify narrative complexity and state explosion in branching quest systems.

## Overview
- **Category:** mathematics
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_yLwl2RkVOGs8NBQhfUm8vftIgtlRLV8dkTDgzcZR/ai-agent-connect
- **Tags:** game-dev, narrative, branching-paths, complexity, quest-analysis

## Description

This MCP server provides mathematical and structural analysis for game designers to quantify narrative complexity. Use `analyze_branching_complexity` to detect unmanageable branching trees, `calculate_state_and_depth` to measure decision impact on the game world, and `estimate_player_engagement_time` to predict time investment for different player archetypes. It helps identify hollow narratives by calculating content coverage and ensures design feasibility through complexity limits.

## Tools

### estimate_player_engagement_time
Predicts the time investment required for different player archetypes

### analyze_branching_complexity
Calculates the scale of the narrative structure and determines if the design is mathematically unmanageable

### calculate_state_and_depth
Measures the impact and variety of player decisions on the game world

## Prompt Examples

**Prompt:** 
```
Analyze the complexity of these quest nodes: [{'id': 'q1', 'choices_count': 3, 'consequences_affect_later_quests': true}, {'id': 'q2', 'choices_count': 2, 'consequences_affect_later_quests': true}] with 2 total quests.
```

**Response:** 
```
The branching tree size is 6, and the design is within manageable limits.
```

**Prompt:** 
```
Calculate the engagement time for a quest list where the main path takes 30 minutes and the total content takes 120 minutes.
```

**Response:** 
```
The completionist time is 120 minutes and the casual player time is 30 minutes.
```

**Prompt:** 
```
Check the state variety for a quest system with these nodes: [{'id': 'start', 'choices_count': 2, 'consequences_affect_later_quests': true}]
```

**Response:** 
```
The system has 2 reachable states and a consequence depth of 1.
```

## Frequently Asked Questions

**How do I know if my quest design is too complex?**
You can use the `analyze_branching_complexity` tool. It will flag the design as unimplementable if the branching tree size exceeds 1,000.

**Can I predict how long a player will spend in my game?**
Yes, the `estimate_player_engagement_time` tool calculates both completionist time for all content and casual player time for the main narrative path.

**What is content coverage?**
Content coverage is the ratio of implemented content to the theoretical branching tree size. A low score suggests many paths lead to no unique content.
