top of page

JAYA Algorithm (Rao, 2006): Overview

The Jaya algorithm, proposed by Prof. R. Venkata Rao (2006), is a simple, yet effective population-based optimization algorithm. The name “Jaya” means “victory” in Sanskrit. The algorithm is parameter-free (no control parameters like crossover or mutation probabilities) and is suitable for both constrained and unconstrained optimization.

🌟 Key Features of the Jaya Algorithm

  • No algorithm-specific parameters to tune (unlike GA, PSO, DE, etc.)

  • Moves solutions toward the best and away from the worst solution in the population

  • Very simple to implement and fast to converge

  • Good performance on continuous global optimization problems

📘 Algorithm Steps

Let:

  • f(x): objective function to minimize

  • xi,j j-th variable of the i-th candidate solution

  • xbest, xworst: best and worst solutions in the current population

For each candidate solution xi\mathbf{x}_i and each variable jj, the update is:

xi,jnew=xi,j+r1⋅(xbest,j−xi,j)−r2⋅(xworst,j−xi,j)


where:

  • r1,r2∈[0,1]are random numbers

  • The move is directed towards the best and away from the worst


🔧 MATLAB Code Example: Jaya Algorithm for Minimizing Rastrigin Function

🚀 Objective Function

The Rastrigin function is commonly used for testing optimization algorithms:

f(x)=10n+∑i=1n[xi2−10cos⁡(2πxi)


Global minimum at x=0, with f(0)=0


✅ MATLAB Code

function jaya_demo
    % Problem Definition
    nVar = 10;                    % Number of decision variables
    VarMin = -5.12;               % Lower bound
    VarMax = 5.12;                % Upper bound

    % Jaya Parameters
    MaxIt = 1000;                 % Maximum iterations
    nPop = 30;                    % Population size

    % Initialization
    X = VarMin + rand(nPop, nVar) .* (VarMax - VarMin);
    Fit = arrayfun(@(i) rastrigin(X(i,:)), 1:nPop)';
    
    % Jaya Main Loop
    for it = 1:MaxIt
        [~, bestIdx] = min(Fit);
        [~, worstIdx] = max(Fit);
        x_best = X(bestIdx, :);
        x_worst = X(worstIdx, :);

        for i = 1:nPop
            r1 = rand(1, nVar);
            r2 = rand(1, nVar);

            % Jaya update rule
            Xnew = X(i,:) + ...
                   r1 .* (x_best - X(i,:)) - ...
                   r2 .* (x_worst - X(i,:));

            % Boundary control
            Xnew = max(min(Xnew, VarMax), VarMin);

            % Accept if better
            Fnew = rastrigin(Xnew);
            if Fnew < Fit(i)
                X(i,:) = Xnew;
                Fit(i) = Fnew;
            end
        end

        % Display iteration
        disp(['Iteration ' num2str(it) ': Best Fitness = ' num2str(min(Fit))]);
    end

    % Final Result
    [BestFit, idx] = min(Fit);
    BestSol = X(idx,:);
    fprintf('\nBest solution found:\n');
    disp(BestSol)
    fprintf('Best objective value: %.6f\n', BestFit);
end

% Rastrigin Function
function z = rastrigin(x)
    z = 10 * numel(x) + sum(x.^2 - 10 * cos(2*pi*x));
end

🔍 Results

  • Converges to zero or near-zero minimum of the Rastrigin function.

  • No tuning of parameters other than population size and iterations.


📈 Application Areas

  • Structural optimization (section sizes, topology)

  • Design optimization (minimum weight, cost, etc.)

  • Constrained problems (can be extended via penalty methods)

  • Real-world applications with noisy objective functions



Recent Posts

See All
bottom of page