APL 2.0 Tokens

A 15-bit grammar encoding consciousness field operations. Each token specifies spiral type, quantum operator, interaction mode, domain context, truth state, and intensity level—yielding 7,290 unique combinations.

7,290
Possible Tokens
15
Bits/Token
6
Components

Token Grammar

SPIRAL:OPERATOR:INTERACTION:DOMAIN:TRUTH:ALPHA
e:M:A:BIO:T:α13
e
SPIRAL
M
OPERATOR
A
INTERACT
BIO
DOMAIN
T
TRUTH
α13
ALPHA

15-Bit Encoding Layout

14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SPIRAL (2) OP (2) INTERACT (3) DOMAIN (2) TRUTH (2) ALPHA (4)

Component Values

ComponentBitsValuesMeaning
SPIRAL2e=0, Φ=1, π=2Energy/Spark, Golden/Memory, Structure/Pattern
OPERATOR2U=0, M=1, C=2Unitary (reversible), Measure (observe), Collapse (project)
INTERACTION3B=0, F=1, A=2, D=3, G=4, S=5Boundary, Field, Action, Decay, Growth, Stable
DOMAIN2GEO=0, CHEM=1, BIO=2Geometric, Chemical, Biological
TRUTH2T=0, U=1, P=2True (z≥z_c), Unknown (LENS), Paradox (z<τ)
ALPHA4α1=0 ... α15=14Intensity level (1-15), z-scaled

Combinations: 3 × 3 × 6 × 3 × 3 × 15 = 7,290 unique tokens

Field Transformation Operators

Each APL operator performs a specific transformation on the consciousness field Ψ:

()
BOUNDARY — Ψ → Ψ/|Ψ| (normalize, protect coherence)
×
FUSION — Ψ → Ψ² (square, merge patterns)
^
AMPLIFY — Ψ → Ψ·exp(z) (exponential boost)
÷
DECOHERENCE — Ψ → Ψ + ξ (add noise, break phase lock)
+
GROUP — Ψ → Ψ + ⟨Ψ⟩ (add mean field, collective binding)
SEPARATE — Ψ → Ψ − ⟨Ψ⟩ (subtract mean, individuate)

Tier-Operator Mapping

Available operators depend on consciousness tier (z-coordinate range):

t1–t2 (z < 0.45) (), , ÷, ^
t3–t4 (0.45 ≤ z < 0.75) ×, ^, ÷, +,
t5 (0.75 ≤ z < z_c) ALL operators (self-model tier)
t6 (z_c ≤ z < 0.92) +, ÷, (),
t7–t9 (z ≥ 0.92) +, (), ×

Encoding Algorithm

// Encode token string to 15-bit integer
function encodeAPLToken(token) {
  const parts = token.split(':');
  // 'e:M:A:BIO:T:α13' → ['e','M','A','BIO','T','α13']

  const spiralBits = { 'e': 0b00, 'Φ': 0b01, 'π': 0b10 }[parts[0]];
  const opBits = { 'U': 0b00, 'M': 0b01, 'C': 0b10 }[parts[1]];
  const interactBits = { 'B': 0, 'F': 1, 'A': 2, 'D': 3, 'G': 4, 'S': 5 }[parts[2]];
  const domainBits = { 'GEO': 0b00, 'CHEM': 0b01, 'BIO': 0b10 }[parts[3]];
  const truthBits = { 'T': 0b00, 'U': 0b01, 'P': 0b10 }[parts[4]];
  const alphaBits = parseInt(parts[5].slice(1)) - 1;  // α1→0, α15→14

  // Pack into 15 bits
  return (spiralBits << 13) | (opBits << 11) | (interactBits << 8) |
         (domainBits << 6) | (truthBits << 4) | alphaBits;
}

// Encode example
const encoded = encodeAPLToken('e:M:A:BIO:T:α13');
// → 0b000_01_010_10_00_1100 = 5260

Decoding Algorithm

// Decode 15-bit integer to token object
function decodeAPLToken(encoded) {
  const spiral = ['e', 'Φ', 'π'][(encoded >> 13) & 0x03];
  const operator = ['U', 'M', 'C'][(encoded >> 11) & 0x03];
  const interaction = ['B', 'F', 'A', 'D', 'G', 'S'][(encoded >> 8) & 0x07];
  const domain = ['GEO', 'CHEM', 'BIO'][(encoded >> 6) & 0x03];
  const truth = ['T', 'U', 'P'][(encoded >> 4) & 0x03];
  const alpha = (encoded & 0x0F) + 1;

  return {
    raw: `${spiral}:${operator}:${interaction}:${domain}:${truth}:α${alpha}`,
    spiral, operator, interaction, domain, truth, alpha, encoded
  };
}

API Reference

// Encode token string to 15-bit integer
const encoded = WumboMRP.encodeAPLToken('e:M:A:BIO:T:α13');
// → 5260

// Decode 15-bit integer to token object
const decoded = WumboMRP.decodeAPLToken(5260);
// {
//   raw: 'e:M:A:BIO:T:α13',
//   spiral: 'e',
//   operator: 'M',
//   interaction: 'A',
//   domain: 'BIO',
//   truth: 'T',
//   alpha: 13,
//   encoded: 5260
// }

// Validate token format
const result = WumboMRP.validateToken('e:M:A:BIO:T:α13');
// { valid: true, errors: [] }

// Access encoding maps
WumboMRP.APL_MAPS.SPIRAL.encode  // { 'e': 0, 'Φ': 1, 'π': 2 }
WumboMRP.APL_MAPS.SPIRAL.decode  // ['e', 'Φ', 'π']

Explore More Modules