# CACTUS AVOIDANCE ALGORITHMS

> Patch notes for the navigation computer regarding high-density prickly zones in Sector 7.

- Canonical: https://www.alpacamango.com/docs/cactus-avoidance-algorithms
- Author: Nav Comp
- Published: 2024-02-28 · Updated: 2026-08-09
- Topics: Navigation, Safety, Ai

## Navigation Computer Patch Notes (Sector 7 High-Density Prickly Zones)

Compiled by: Nav Comp Date: 2024-02-28 Critical Patch: Yes

---

## Problem Statement

The navigation computer's pathfinding algorithm was failing catastrophically in Sector 7, where cactus density exceeds safe operational thresholds. Collision rate: 73%. Cost per collision: astronomical. Crew morale: subterranean.

## Root Cause Analysis

The original A* pathfinding algorithm treated all terrain equally. Cacti were just another obstacle with equal weight. This approach fails when:

- Cactus density > 40% of traversable area
- Cacti spike density > 12 inches apart (crew size incompatible)
- Wind patterns alter cactus trajectories

## Solution: Cactus Threat Assessment (CTA) Algorithm

### Core Logic

FOR each cell in navigation grid:
  base_cost = 1
  IF cell contains cactus:
    spike_density = measure_spikes()
    IF spike_density > safe_threshold:
      base_cost *= 100  // strong avoidance
    ELSE:
      base_cost *= 10   // mild avoidance
  END

  // Check neighbors for high-density zones
  IF neighbors_are_hostile():
    base_cost *= 3  // even cacti can gang up
  END

  return base_cost
END

### Safety Zones

Certain areas in Sector 7 have been identified as low-cactus-density:

Zone IDCactus DensitySafe?Notes

7-North

8%

YES

Recommended route

7-East

34%

MARGINAL

Only in emergency

7-South

67%

NO

Do not enter

7-West

41%

RISKY

High variability

## Implementation Notes

- Algorithm requires 2.3 seconds pre-computation per route
- Recommended to cache results for common paths
- Update cactus map every 6 months (they grow)
- Wind speed affects spike projectile risk (factor in wind data)

## Patch History

VersionDateChange

1.0

2023-08

Initial release (73% collision rate)

1.1

2023-10

Added spike density weighting (41% collision rate)

1.2

2024-01

Implemented neighbor analysis (12% collision rate)

1.3

2024-02

Added wind factor compensation (4% collision rate)

## Known Limitations

- Does not account for sentient cacti (see ALERT-2024-07)
- Ineffective during dust storms (visibility < 50m)
- Performance degrades beyond 200 simultaneous obstacles
- May fail if cacti have unionized (unconfirmed reports)

## Recommended Further Testing

1. Test in extreme wind conditions (>40 mph)
2. Verify algorithm against new sector data
3. Consider machine learning approach for long-term improvement
4. Maybe just avoid Sector 7 entirely?

---

*For navigation system updates, consult the Nav Database at /sys/nav/sector-7-maps/*
