# Procedural Dungeon Complexity Meter AI Agent Connect

> Analyze the structural complexity and player experience of procedural dungeon layouts.

## Overview
- **Category:** mathematics
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_MrA0Lilw0vmKVjGiSEKJsYmXEH0AtSMrqkCKTfUf/ai-agent-connect
- **Tags:** dungeon, topology, complexity, game-dev, analysis

## Description

This MCP server provides a suite of mathematical tools to evaluate the topology of procedurally generated dungeons. Use `analyze_dungeon_structure` to determine the difficulty rating and complexity score of a layout. Use `calculate_traversal_metrics` to predict player movement patterns, including backtrack percentage and estimated completion time. Finally, use `evaluate_density_and_exploration` to measure how effectively a dungeon utilizes its space and provides variety through exploration scores and room density.

## Tools

### analyze_dungeon_structure
Provides a high-level overview of the dungeon's complexity and difficulty

### calculate_traversal_metrics
Analyzes the physical movement and efficiency of the dungeon layout

### evaluate_density_and_exploration
Measures how well the dungeon utilizes its space and offers variety

## Prompt Examples

**Prompt:** 
```
Analyze a dungeon with 30 rooms, 45 corridors, a branching factor of 2.5, and 5 loops.
```

**Response:** 
```
The dungeon has a complexity score of 80, which is rated as a Hard maze.
```

**Prompt:** 
```
Calculate the traversal metrics for a dungeon with 50 rooms, 60 corridors, 10 dead ends, a traversal depth of 15, and an average room time of 30 seconds.
```

**Response:** 
```
The traversal depth is 15, the backtrack percentage is 20%, and the estimated completion time is 450 seconds.
```

**Prompt:** 
```
Evaluate the density and exploration for a dungeon with 40 rooms, 1000 total area, 50 unique paths, and 200 total paths.
```

**Response:** 
```
The exploration score is 0.25 and the optimal room density is 0.04.
```

## Frequently Asked Questions

**How is the difficulty rating determined?**
The difficulty rating is based on the `graph_complexity_score`. Scores above 50 are rated as 'Hard maze', between 20 and 50 as 'Medium', and below 20 as 'Linear'.

**What does the frustration flag indicate?**
A frustration flag is triggered if the backtrack percentage is greater than 60% (indicating too many dead ends) or less than 10% (indicating a layout that is too linear).

**Can I use this with Cursor or Claude Desktop?**
Yes, this MCP server can be connected to Cursor, Claude Desktop, VS Code, Windsurf, and any other MCP-compatible client via Vinkius Edge.
