Suppose you are training a neural network to play a game (like AlphaStar playing StarCraft). The game contains a non-constant number of entities, whose attributes change, and perhaps which have non-constant number of attributes.
For example, using JSON-like notation to illustrate, at time T1 the state might be
state = {
'health': 90,
'enemies': [
{'id': 1, 'x':20, 'y':20, 'items':[]},
{'id': 2, 'x':200, 'y':200, 'items':[]}
]
}
and at time T2 the state might be
state = {
'health': 90,
'enemies': [
{'id': 2, 'x':201, 'y':210, 'items':['coin','bag']},
{'id': 3, 'x':10, 'y':50, 'items':[]},
{'id': 4, 'x':50, 'y':10, 'items':[]}
]
}
How can time-dependent, variably-sized, and recursively-structured information be given to a fixed-sized neural network?