  We introduce the $G$-stable rank of a higher order tensors over perfect
fields.
  The $G$-stable rank is related to the Hilbert-Mumford criterion for stability
in Geometric Invariant Theory. We will relate the $G$-stable rank to the tensor
rank and slice rank. For numerical applications, we express the $G$-stable rank
as a solution to an optimization problem. Over the field ${\mathbb F}_3$ we
discuss an application to the Cap Set Problem.
