function [H,u]=init_hyperstate(sidp_parameters, system, apriori)
%OK

H=zeros(sidp_parameters.horizont,sidp_parameters.n_grid^system.dim,system.dim);  %prostor hyperstavu - kazdy bod ma souradnice (y, b, P)
u=zeros(sidp_parameters.horizont,sidp_parameters.n_grid^system.dim);  %nejlepsi nalezena rozhodnuti - pocatecni strategie =0

%nastavi H0
step_y0=apriori.y0_range/(sidp_parameters.n_grid-1)*2;
min_y0=apriori.y0-apriori.y0_range;
step_b0=apriori.b0_range/(sidp_parameters.n_grid-1)*2;
min_b0=apriori.b0-apriori.b0_range;
step_P0=apriori.P0_range/(sidp_parameters.n_grid-1)*2;
min_P0=apriori.P0-apriori.P0_range;
for i=1:size(H,2)
    H(1,i,1)=min_y0+step_y0*(index(i,sidp_parameters.n_grid,1)-1);
    H(1,i,2)=min_b0+step_b0*(index(i,sidp_parameters.n_grid,2)-1);
    H(1,i,3)=min_P0+step_P0*(index(i,sidp_parameters.n_grid,3)-1);
    for j=1:1:sidp_parameters.horizont
        u(j,i)=0.1*(randn-0.5);
    end
end

end


