Got a test environment from Daniel and got it working. Coded how algorihm choose next action. Found bugs to fix in algorithm, will fix later.