Actions and the Swap Rule

Actions are transformations that rearrange the letters in your selection. They cost coins and are the core strategic layer of GeoWords — finding cost-efficient action sequences to maneuver letters into playable words.

The Four Actions

All actions require a selection of 2 or more tiles.

Swap Ends

Swaps the first and last letters of the selection. The middle letters stay in place.

Reverse

Mirrors the entire selection — the first letter becomes last, the last becomes first, and everything in between reverses.

Cycle Forward

Moves the last letter to the first position. Every other letter shifts one position toward the end.

Cycle Backward

Moves the first letter to the last position. Every other letter shifts one position toward the start.

The Swap Rule

All action costs are derived from a single principle: one adjacent swap costs 1 coin.

An "adjacent swap" is the simplest possible letter rearrangement — exchanging two neighboring letters. Every action can be decomposed into a minimum number of these atomic swaps, and that number determines the cost.

Cost Formulas

For a selection of length n:

ActionFormulan=2n=3n=4n=5n=6
Swap Ends2n − 313579
Reversen(n−1)/21361015
Cycle Forwardn − 112345
Cycle Backwardn − 112345

Why These Costs?

Cost Optimization as Strategy

The same rearrangement can often be achieved at different costs depending on which actions you choose. For example, to transform TABH into BATH:

RecipeActionsTotal Cost
AReverse → Cycle Backward6 + 3 = 9C
BCycle Forward → Reverse3 + 6 = 9C
CReverse → Cycle Forward × 36 + 3 + 3 + 3 = 15C

Recipes A and B reach the same result at the same cost via completely different paths. Recipe C works but costs significantly more. Finding the cheapest recipe is part of the puzzle.

Action Buttons

The right sidebar shows buttons for each action, with the current cost displayed (e.g., "Reverse (6C)"). Buttons are disabled when:

Undo and Redo

All actions are fully undoable. Cmd+Z undoes the last action and refunds the coins. Cmd+Shift+Z redoes.