# exponentialRankLogWeights

> **exponentialRankLogWeights**(`scores`, `objective`): readonly `number`\[]

Defined in: [packages/evolution/src/selection.ts:125](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/evolution/src/selection.ts#L125)

Return exponential competition-rank log-weights aligned to the source scores.

Rank zero is best and receives log-weight `-rank`, so a one-candidate population returns `[0]`. Ranking, ties, and validation match `exponentialRankWeights` exactly: `Math.exp` of every entry equals the matching weight. Every entry is finite at any rank, so no candidate becomes ineligible through underflow, and the entry for rank zero is `0` rather than `-0`. The input is not mutated.

## Parameters

### scores

readonly `number`\[]

### objective

[`Objective`](/reference/knotkit/evolution/type-aliases/objective/)

## Returns

readonly `number`\[]

## Throws

With code `EMPTY_POPULATION` for no scores, `INVALID_SCORE` for a non-finite score, or `INVALID_OBJECTIVE` for an unsupported objective.
