3 ms·
Does this means the input to my model can be a set of varying length instead of a list of fixed length? Could this be used for something like a card game? Cons
by Buttons840 5y ago
Does this means the input to my model can be a set of varying length instead of a list of fixed length?
Could this be used for something like a card game? Consider, how would you encode the cards in your hand in such a game? The cards in your hand form a set, their order does not matter, and the number of cards in your hand at any time varies in many games.
The examples on that page are neat, but they're also stupid and artificial. Why would anyone mangle their input like that? Are there any examples of this being useful that are less artificial?
- Lacaranian 5y agoThe card game example you propose is a pretty apt one. One might have any number of cards in a given hand, with any number of varying properties (like for standard 52 card decks, suit and rank). To keep a fixed size feature vector as the input for a neural net, one approach is to have a representation that treats every distinct possible card as a single input feature in the vector, with value representing whether it is currently in a given player's hand or not (0 or 1). This of course falls apart a bit when looking at card games where multiple copies of the same card can exist. If you just scale up the input feature values proportionally to the duplicate card count, you might assume a linear effect of those duplicate cards where a nonlinear effect exists. TDGammon's representation for Backgammon solves a similar issue, a similar way, for representing how many stones exist on a given point (if I recall correctly, some version of it cares about 0, 1, 2, or 3+ as distinct possibilities, represented effectively as different features per point). Still, as a first approximation, this does work for a decent swath of games (and abstracts the ordering of cards away). It seems like this article's approach involves a good deal of having the neural net recognize symmetries like this automatically.