CycleEncoder and VarCycleEncoder

From what you describe your encoder is following a similar concept.

I also found a limited range of periods (the interval 1 to math.e was just a hunch) with as many intermediate steps as SDR size works pretty well. In the modulo 97 problem it works as is (without need to adjust the period)

I found useful the intermediate vector of scalars (instead of 0/1) since it allows compounding of few scalars by adding all their vectors and thresholding the sum. This works surprisingly well with CartPole problem where observation space is made up of four float values. Each with its own period and different random phasing.
The CycleEncoder in that source accepts several instead of a single scalar featured above. And works internally with integers instead of floats.

1 Like