
function [regrets_track, arm_track] = random_search(B,f_test,kernel,T,lambda,epsilon,R,max_value, options)
   
        data_mean = options(1);
        data_stdv = options(2);
        
        [~, arms] = size(f_test(1,:));
        %[max_value,max_arm] = max(f_test);
        %kernel_t = kernel;
        mu_t = zeros(arms,1); sigma2_t = zeros(arms,1);
        
        regrets_cumula = 0;
        regrets_track = zeros(T,1);

        rewards_cumula = 0;
        rewards_track = zeros(T,1);
        
        arm_track = zeros(T,1);
        trigger_track = zeros(T,1);
        y_track = zeros(T,1);
        
        num_func = size(B,1);
        iter_func = 0;
        
        c1 = 0.8;
        c2 = 0.4;
        delta_T = 0.01;

        reset = false;
        t1 = 1;
        
        for t = 1 : T   
                iter_func = iter_func+1;
                   
%                 if reset
%                     t1 = H;
%                 else
%                     t1 = mod(t,H);
%                 end
                
                arm_t = randi(arms);
                arm_track(t) = arm_t;
                
                rewards_cumula = rewards_cumula + f_test(iter_func,arm_t);
                rewards_track(t) = rewards_cumula;
                               
                
                regrets_cumula = regrets_cumula + (max_value(iter_func) - f_test(iter_func,arm_t))*data_stdv;
                regrets_track(t) = regrets_cumula;

                noise = randn;  %sub-gaussian  normal 
                y_t = f_test(iter_func,arm_t) + epsilon*noise;
                y_track(t) = y_t;
            
        end
        
end

    

