File size: 493 Bytes
026f63e
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
"""SnakeStateEncoder: the Snake board (8 channels, see task.py) -> core tokens.

A thin, Snake-specific configuration of the generic GridStateEncoder: the Snake
featurisation lives in `task.encode_grid`, the learnable part is generic.
"""
from minijev.encoders.grid import GridStateEncoder

from .task import N_CHANNELS


class SnakeStateEncoder(GridStateEncoder):
    def __init__(self, d: int, in_channels: int = N_CHANNELS, **kw):
        super().__init__(d, in_channels=in_channels, **kw)