1

Currently I'm trying to implement Scrabble with MuZero.

The $15 \times 15$ game board observation (as input) is of size $27 \times15 \times15$ (26 letters + 1 wildcard) with a value of 0 or 1.

However I'm having difficulties finding a suitable way to encode the player's rack of letters (Always 7 letters on the rack).

The available tiles are: 26 letters $(A-Z)$ and 1 wildcard.

A rack can also contain multiple tiles of the same letter.

Example: rack of player 1 is $[A,A,C,E,T,T,H] -> A:2x, C:1x, E:1x, T:2x, H:1x$

How can I represent a rack of tiles as a $(? \times)15 \times15$ (or other board size) matrix ?

hanugm
  • 3,571
  • 3
  • 18
  • 50
Thrusticy
  • 11
  • 1

1 Answers1

1
  • Use one hot encoding for each position, shape $(7, 27)$.
  • Stack these two dimensions, shape $(189)$.
  • Tile (replicate) this vector into images of the same resolution, now shape $(15, 15, 189)$
  • Stack them with your other observation, final shape $(15, 15, 216)$.

Another way is instead of replicating the $(189)$ vector along two axis, you can squeeze them into one single plane of $15 * 15 = 225$ values, and pad the unfilled part with zeros.

Uduse
  • 136
  • 3