Coordinate Encoding for Layered Locations (CELL) Specification
- Version: 1.0.0
- Author: Sashité
- Published: June 17, 2025
- License: MIT License
Overview
Coordinate Encoding for Layered Locations (CELL) defines a standardized format for representing coordinates on multi-dimensional game boards using a cyclical ASCII character system. CELL supports unlimited dimensional coordinate systems through the systematic repetition of three distinct character sets.
Terminology
For complete definitions of terms used in this document, see the Glossary.
Dependencies
None. CELL is a foundational primitive with no dependencies.
Format Specification
Structure
<dimension-1>[<dimension-2>[<dimension-3>[...]]]
Grammar (BNF)
<cell> ::= <latin-lower> <tail₁>
<tail₁> ::= ε ; End after 1D
| <arabic-numeral> <tail₂>
<tail₂> ::= ε ; End after 2D
| <latin-upper> <tail₃>
<tail₃> ::= ε ; End after 3D
| <latin-lower> <tail₁> ; Resume new cycle
<latin-lower> ::= <latin-lower-char>+
<arabic-numeral> ::= <positive-integer>
<latin-upper> ::= <latin-upper-char>+
<latin-lower-char> ::= "a" | "b" | "c" | ... | "z"
<latin-upper-char> ::= "A" | "B" | "C" | ... | "Z"
<positive-integer> ::= <non-zero-digit> <digit>*
<non-zero-digit> ::= "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
<digit> ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
Regular Expression
\A[a-z]+(?:[1-9]\d*[A-Z]+[a-z]+)*(?:[1-9]\d*[A-Z]*)?\z
Coordinate System Mapping
CELL encodes multi-dimensional coordinates using a cyclical three-character-set system:
| Dimension Type | Character Set | Examples |
|---|---|---|
| n % 3 = 1 | Latin lowercase letters | a, b, c, aa, ab |
| n % 3 = 2 | Arabic numerals | 1, 2, 3, 10, 11 |
| n % 3 = 0 | Latin uppercase letters | A, B, C, AA, AB |
Dimensional Mapping
- 1D:
a,b,c… - 2D:
a1,b2,c3… - 3D:
a1A,b2B,c3C… - 4D:
a1Aa,b2Bb,c3Cc… - 5D:
a1Aa1,b2Bb2,c3Cc3…
System Constraints
Character Encoding
CELL coordinates use ASCII characters (letters and digits), providing broad compatibility across systems.
Validation Rules
- Character validity: Each dimensional component must use only characters from its respective character set
- Cyclical consistency: Dimension type must match expected position in the three-character cycle
- Order preservation: Characters within each dimension must follow specified ordering
- Extension validity: Extended characters must follow systematic repetition patterns
- Numeric format: Numeric dimensions must represent positive integers only (no zero)
- Sequential order: All coordinates must begin with dimension 1 and follow strict cyclical progression
- Partial completion allowed: Coordinates may end after any complete dimensional component
Valid Coordinate Examples
Basic Examples
a- 1D coordinate (single dimension)a1- 2D coordinate (dimension 1 + 2)a1A- 3D coordinate (dimension 1 + 2 + 3)a1Aa- 4D coordinate (complete cycle + dimension 1)a1Aa1- 5D coordinate (complete cycle + dimension 1 + 2)a1Aa1A- 6D coordinate (two complete cycles)
Extended Alphabet Examples
aa1AA- Using extended alphabet (position 26 in dimensions 1 and 3)z26Z- Large values in each dimension typeabc123XYZ- Multi-character components
Game-Specific Examples
- Chess:
e4,h8,a1 - Shogi:
e1,i9,a1 - 3D Tic-Tac-Toe:
a1A,b2B,c3C
Invalid Coordinate Examples
The following are NOT valid CELL coordinates:
""- Empty string1- Starts with numeric (must start with lowercase)A- Starts with uppercase (must start with lowercase)a0- Contains zero (only positive integers allowed)a1a- Lowercase after numeric without uppercase1a- Numeric before lowercase (wrong order)aA- Uppercase directly after lowercase (missing numeric)a1A1- Numeric after uppercase without lowercase
Design Properties
- Multi-dimensional support: Coordinate systems of any dimensionality
- Unique identification: Each coordinate identifies a specific location
- ASCII compatibility: Standard character encoding for broad system support
- Predictable ordering: Systematic character set rotation
- Extensible pattern: Logical expansion through repetition
- Partial completion: Allows ending after any complete dimensional component
Implementation Notes
Regular Expression Explanation
The regex breaks down as follows:
\A # Start of string
[a-z]+ # One or more lowercase letters (dimension 1)
(?: # Non-capturing group for complete cycles
[1-9]\d*[A-Z]+[a-z]+ # Numeric + Uppercase + Lowercase (dims 2,3,1)
)* # Zero or more complete cycles
(?: # Non-capturing group for partial cycle
[1-9]\d* # Numeric component (dimension 2)
[A-Z]* # Zero or more uppercase letters (dimension 3)
)? # Partial cycle is optional
\z # End of string
Examples
See CELL Examples for practical implementation guidance.
Reference Implementations
Ruby
- CELL.rb – Reference implementation with full cyclical system support and multi-dimensional validation.
