g | x | w | all
Bytes Lang Time Link
033Jelly250730T214522ZJonathan
172Ruby250801T082351ZLevel Ri
127JavaScript ES7250730T113907ZArnauld
069Charcoal250730T091000ZNeil

Jelly, 33 bytes

ṙJ;U$iⱮþ`ẎṢFḄ%⁽Kȧị“UVFYEGHZJTRNAx

A full program that accepts a last-layer permutation as a string of twelve "rbog" characters and prints its permutation name.

Try it online! Or see the test-suite.

How?

ṙJ;U$iⱮþ`ẎṢFḄ%⁽Kȧị“... - Link: list of twelve characters, P
 J                     - indices of {P} -> [1..12]
ṙ                      - rotate {P} left by each of {[1..12]}
  ;U$                  - concatenate reversals
        `              - use as both arguments of:
       þ               -   table of:
      Ɱ                -     map with:
     i                 -       first index of
         Ẏ             - tighten
          Ṣ            - sort
           F           - flatten
            Ḅ          - convert from base two
             %⁽Kȧ      - mod 19981
                 ị“... - 1-index into "UVFYEGHZJTRNAx", cyclically
                         (nothing maps to 0 mod 14 (x) but it saves bytes due
                          to 19981 being small enough for `⁽` use)

Note that this works for input P for which someone has peeled the stickers off and rotated them around the bottom layer by any amount, (or, equivalently, one can start reading from any sticker to provide input).
i.e. rather than the P="ceccecceccec" (c: corner sticker; e: edge sticker) as formatted in the question, it'll work with any rotation to a P="eccecceccecc" or P="ccecceccecce" too.

Ruby, 172 bytes

->s{e=[0]*4
16.times{|i|"gobrg".index(s[j=i%2+i/4*3]+s[j-2-i/2%2])&&e[i%4]+=~i/4}
a,b,c,d=e
t=b+c+d&1
"NHUZA#{(-8>r=a+b-c)??J:"RG"[r%4/2]}#{"TF"[t]}E#{"VY"[t]}"[c/5*3+d/5]}

Try it online!

JavaScript (ES7), 127 bytes

s=>"YNJZHEGUTAFRV"[[q=0,1,2,3].map(n=>q+=[...s].map((c,i)=>t+=c=="ogrb"[i/3+n&3],t=/(.)\1(\1|(.)\3)/.test(s+s))|t**7)|q%844%13]

Try it online!

Method

We compute a numeric fingerprint of the input string which unambiguously identifies the type of perm. This fingerprint is then converted into a small lookup index.

Below are the different steps of our algorithm, applied to the input string bbboggroogrr.

Step 1 - preliminary scores

We rotate the input string 4 times. We compute one score per rotation by counting the number of cells that are at the correct position, assuming that the face order is orange, green, red, blue.

(Since each cell is in the correct position exactly once, the sum of these preliminary scores is always \$12\$. The 4th score could therefore be deducted from the other 3, but this would not make the code any shorter.)

Example

offset rotation ooo ggg rrr bbb score
0 bbb ogg roo grr --- -gg r-- --- 3
3 ogg roo grr bbb o-- --- -rr bbb 6
6 roo grr bbb ogg -oo g-- --- --- 3
9 grr bbb ogg roo --- --- --- --- 0

Step 2 - updated scores

We look for the patterns xxx or xxyy within the input string concatenated with itself, using the regular expression /(.)\1(\1|(.)\3)/. If found, all scores are incremented.

This step allows us to disambiguate some perms that give the same scores at step 1.

Example

The string bbboggroogrrbbboggroogrr does contain bbb (and also rrbb), so the scores are turned into [4,7,4,1].

Step 3 - fingerprint

The fingerprint is calculated by raising each updated score to the power of \$7\$ and summing the results.

Example

[4,7,4,1] gives \$4^7+7^7+4^7+1^7=856312\$.

Step 4 - lookup index

We apply the following modulo chain (found by brute force) to the result of step 3:

$$(n\bmod 844)\bmod 13$$

This gives a final index in \$[0,12]\$ which is used to pick the correct answer from the lookup string "YNJZHEGUTAFRV".

Example

For \$856312\$, the index is \$2\$. Which gives a J.

Summary table

perm example preliminary scores +1? fingerprint index
A bbgrobogogrr [ 0, 2, 4, 6 ] yes 903856 9
E bogrgogrbobr [ 0, 4, 4, 4 ] no 49152 5
F bbborgrgogor [ 2, 2, 2, 6 ] yes 830104 10
G bbgrgborogor [ 2, 3, 3, 4 ] no 20886 6
H bgborogbgror [ 0, 0, 4, 8 ] no 2113536 4
J bbboggroogrr [ 0, 3, 3, 6 ] yes 856312 2
N bbgrroggboor [ 0, 0, 6, 6 ] no 559872 1
R bbogoborgrgr [ 0, 3, 3, 6 ] no 284310 11
T bbogrboggror [ 2, 2, 2, 6 ] no 280320 8
U bbbogogrgror [ 0, 1, 2, 9 ] yes 10002316 7
V bbgrgogoborr [ 1, 1, 4, 6 ] yes 901924 12
Y bbgroogrbogr [ 1, 1, 4, 6 ] no 296322 0
Z bobobogrgrgr [ 0, 2, 2, 8 ] no 2097408 3

Charcoal, 112 69 bytes

≔Eθ⌕bogrιθF⁸«F⁴⊞υE¹²§θ⁺λ׳κ≔﹪⊕θ⁴θ¿⁼³ι≔⁻³⮌θθ»§”$⌈¡✳:✳⬤O▶αATL9·%⌊¤”↨⌊υ²

Try it online! Link is to verbose version of code. Explanation:

≔Eθ⌕bogrιθ

Translate the input colours into digits 0-3. The colours are taken in the given clockwise order.

F⁸«

Loop over the 8 arrangements of colours.

F⁴⊞υE¹²§θ⁺λ׳κ

Push each of the 4 rotations to the predefined empty list.

≔﹪⊕θ⁴θ

Cycle through the colours.

¿⁼³ι≔⁻³⮌θθ

At the halfway point, reverse the colours and reflect the cube.

»§”...”↨⌊υ²

Interpret the minimum arrangement as base 2, reduce modulo 27, and look up the resulting letter in a compressed string.