Fix the integral
Fix the integral

The function approximator normalizes the components of the state into
the interval [0,1], so I thought it must be fine to just use integrate
the Fourier sum over that interval too. Well, it's fine, but think of a
curve in 2-D. If you scale a section from a to b to fit into [0,1], …
the area under it shrinks (or grows) by factor (b-a) as well. So you
need to multiply the integral after normalization with the normalization
factor. Do this in the code.

rmoehn/cartpole