3 ms·
This is bothering me a little as well. Perhaps someone more knowledgeable could guide us into the light. As a concrete example, I am toying with a reinforceme
by smokel 3y ago
This is bothering me a little as well. Perhaps someone more knowledgeable could guide us into the light.
As a concrete example, I am toying with a reinforcement learning to solve the game of Yahtzee. When trying to formulate the state space, I have to lump in together the states of the dice (1..6), the current state of the score card (13 boolean values, and 13 integer scores in the range 0..50), and the current turn (first attempt, second attempt). This could be formulated as a 5+13+13+2 = 34 dimensional vector, but I might as well use one-hot encoding for some aspects, and even go all the way up to 56+13+56+13+30+30+1+1+1+1+30 = 180 dimensions. Which formulation would be the most "natural"?
Then again, what may seem (un)natural to a human, might be the other way around for a neural network.
(And, yes, I am aware of papers out there describing how to solve Yahtzee with reinforcement learning, but I'm still at a stage where avoiding those seems to increase the amount of fun.)
- Someone 3y agoIn general, you want to do one-hot encoding whenever your number doesn’t really represent a quantity. For example, for the current state of a rolled die in Yahtzee, ‘2’ mostly (see below) isn’t smaller than ‘3’, isn’t between ‘1’ and ‘3’, and isn’t closer to ‘3’ than it is to ‘4’. So, ‘2’ isn’t a quantity there; it’s just one of the markings on the dice. About that ‘mostly’: the straights require the ability to order the values on the dice, but even then, it’s just an order, not anything about them being equidistant, or about (2,6) showing more eyes than (3,4) (again, there’s an exception there, with the ‘Chance’ score)