hisss.encoding_layer_indices#
- hisss.encoding_layer_indices(game_cfg)[source]#
Generates a mapping of feature names to their depth index in the spatial encoding.
This helps in constructing or interpreting the multi-channel grid encoding (tensor) fed into the neural network, mapping semantic names (like ‘current_food’ or ‘0_snake_head’) to their specific z-axis index based on the chosen encoding config.
- Parameters:
game_cfg (
BattleSnakeConfig) – The game configuration containing the encoding setup.- Returns:
A dictionary mapping the string name of the feature to its integer layer index.
- Return type:
dict[str,int]