Control of educational processes using SPSA