# ADHD Scoring Algorithm: How Novelty, Viability, and Fit Are Weighted

> Discover the ADHD scoring algorithm! Learn how viability (40%), novelty (35%), and fit (25%) are weighted to calculate a composite score from LLM ratings.

- Repository: [Udit Akhouri/adhd](https://github.com/UditAkhourii/adhd)
- Tags: deep-dive
- Published: 2026-08-01

---

**ADHD employs a weighted scoring algorithm that assigns 40% weight to viability, 35% to novelty, and 25% to fit, calculating a composite total from LLM-generated 0–10 ratings for each dimension.**

The ADHD project (UditAkhourii/adhd) implements a multi-dimensional evaluation system to rank generated ideas based on their potential impact and feasibility. This scoring algorithm processes raw ratings through a fixed formula to ensure selected ideas balance innovation with practical constraints.

## How the ADHD Scoring Algorithm Works

The scoring algorithm evaluates every generated idea across three distinct dimensions, applying fixed coefficients to raw ratings returned by an LLM-as-judge.

### The Three Evaluation Dimensions

- **Novelty (35%)**: Measures how far the idea strays from obvious solutions. This dimension accounts for 35% of the final score.
- **Viability (40%)**: Reflects whether the idea could realistically be shipped. At 40%, this is the heaviest-weighted dimension, acting as a gatekeeper to trap unshippable concepts.
- **Fit (25%)**: Checks how well the idea addresses the original problem statement, representing 25% of the total.

### The Weighting Formula

In [`src/engine.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/engine.ts) (lines 16–19), the algorithm computes the weighted total using the following coefficients:

```typescript
// Weight: novelty matters because the whole point is escaping the obvious,
// but viability is the gatekeeper — a brilliant unshippable idea is a trap.
const total = r.novelty * 0.35 + r.viability * 0.4 + r.fit * 0.25;

```

The resulting `total` is stored alongside individual ratings in the `Score` object defined in [`src/types.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/types.ts) (lines 12–19).

## Implementation in the Codebase

The scoring logic resides in [`src/engine.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/engine.ts) within the `scoreIdeas` function, which returns a `Map<string, Score>` linking idea IDs to their evaluated metrics. The `Score` type interface in [`src/types.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/types.ts) captures the individual components—`novelty`, `viability`, and `fit`—along with the computed `total`. The [`src/render.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/render.ts) module subsequently consumes these values to display weighted results in the CLI output.

## Working with the Scoring Algorithm

### Using the scoreIdeas Function

To evaluate ideas programmatically using the built-in scoring algorithm:

```typescript
import { scoreIdeas } from "./engine";
import { Idea } from "./types";

const problem = "Create a tool for brainstorming product ideas.";
const ideas: Idea[] = [
  { id: "1", frameId: "f1", text: "AI-driven sketchpad", depth: 0 },
  { id: "2", frameId: "f1", text: "Crowdsourced idea board", depth: 0 },
];

// Use the default model (or pass a specific one)
const scoresMap = await scoreIdeas(problem, ideas, undefined);

// Inspect a single scored idea
const score = scoresMap.get("1");
if (score) {
  console.log(`Novelty: ${score.novelty}`);
  console.log(`Viability: ${score.viability}`);
  console.log(`Fit: ${score.fit}`);
  console.log(`Weighted total: ${score.total}`);
}

```

### Manual Weight Calculation

You can replicate the internal scoring algorithm manually:

```typescript
function weightedTotal(novelty: number, viability: number, fit: number): number {
  return novelty * 0.35 + viability * 0.4 + fit * 0.25;
}

// Sample raw scores (0-10)
const raw = { novelty: 8, viability: 5, fit: 7 };
const total = weightedTotal(raw.novelty, raw.viability, raw.fit);
console.log(`Weighted total = ${total}`); // → 6.85

```

## Summary

- The ADHD scoring algorithm applies fixed weights of 35% for novelty, 40% for viability, and 25% for fit to evaluate generated ideas.
- Core calculation occurs in [`src/engine.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/engine.ts) (lines 16–19) within the `scoreIdeas` function after receiving raw 0–10 ratings from the LLM.
- Results are stored in the `Score` type defined in [`src/types.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/types.ts) (lines 12–19), which includes both individual dimension scores and the weighted total.
- The algorithm prioritizes viability as the gatekeeper metric to ensure only shippable ideas receive high rankings.

## Frequently Asked Questions

### What is the ADHD scoring algorithm?

The ADHD scoring algorithm is a weighted evaluation system that converts LLM-generated ratings into a composite score. It processes three dimensions—novelty, viability, and fit—using coefficients of 0.35, 0.4, and 0.25 respectively, ensuring that ideas must be both innovative and practical to rank highly.

### How are the weights distributed in ADHD?

Viability receives the highest weight at 40% (0.4), serving as the primary gatekeeper to prevent unshippable ideas from advancing. Novelty accounts for 35% (0.35) to reward creative deviation from obvious solutions, while fit represents 25% (0.25), ensuring alignment with the original problem statement.

### Where is the scoring logic implemented in ADHD?

The weighting formula is implemented in [`src/engine.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/engine.ts) at lines 16–19 within the `scoreIdeas` function. The supporting data structure is declared in [`src/types.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/types.ts) at lines 12–19, which defines the `Score` interface containing the individual ratings and computed total field.

### Can I customize the weights in the ADHD scoring algorithm?

According to the current implementation in UditAkhourii/adhd, the weights are hardcoded constants (0.35, 0.4, 0.25) in the `scoreIdeas` function within [`src/engine.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/engine.ts). To modify the weighting scheme, you must edit the source code directly, as the algorithm does not expose configuration parameters for these coefficients.