Вы находитесь на странице: 1из 37

AIS A recently developed evolutionary technique inspired

by theory of Immunology

A way to study the response of immune


system, when a non-self Antigen pattern is
recognized by Antibody

Immune System: To protect the body from the foreign matters


Antigen: Any foreign disease causing elements
Antibody: Utilized to identify, bind and eliminate antigens
Sort of defense mechanism against foreign attack.
Immune System recognizes the disease causing
elements, better known as Antigens

Self Antigens:
Belong to the body and
are harmless Main Task
To distinguish between self
and non-self antigens
Non-Self Antigens
Disease Causing
elements
Sort of defense mechanism against foreign attack.

Immune System recognizes the disease causing


elements, better known as Antigens .

Clonal Selection explains the response of immune system


when a non-self antigenic pattern is recognized by the
body.
Biological Terminology used to describe the structural
elements and operational parameters of AIS

Immune System Artificial Immune System


Antigen Constraints
Antibody Candidate solutions
Population Set of solution
Antigenic Affinity Fitness Value
Cloning Increasing the high quality solution
Hyper mutation Search operator
Selection Reuse of good antibodies
AIS Inspired by Human Immune System
Five Specific Procedures:
Initialize: Randomly produce antibodies representing the
solution to a problem

Evaluate: To calculate the antigenic affinity of antibodies


Higher antigenic affinity Better solution

After this: A while loop start and runs until termination


condition is not satisfied
AIS Inspired by Human Immune System
Five Specific Procedures:

While loop:
1. Cloning: To the generation of duplicates of antibodies
Clones are generated and a new population is
produced

Antibodies with lower antigenic affinity


Less no. of Clones
Generation of
Duplicates Antibodies with higher antigenic affinity
Large no. of Clones
AIS Inspired by Human Immune System
Five Specific Procedures:

While loop:
2. Hypermutation: Cause random changes in antibodies as
mutation

Antibodies with lower antigenic affinity


Higher mutation rate
Differs from
Mutation Antibodies with higher antigenic affinity
Lower mutation rate
AIS Inspired by Human Immune System
Five Specific Procedures:
While loop:
3. Evaluate: Compute the antigenic affinity of newly generated by
antibodies cloning and hypermutation.

4. Select: Select the superior antibodies for next generation


Discard the inferior antibodies
End of while loop
AIS Inspired by Human Immune System
Output of AIS is an antibody- (Candidate Solution)
that recognizes all the antigens.
If well designed, population will converge to optimal solution

Selection of parameters is very important and might greatly


affect the effectiveness and efficiency of algorithm.

Parameters:
Population size
Clones, to be generated
No. of Antibodies to be discarded
parents Cloning &
Selection Hypermutation

modified
antibodies

initiate & Population Evaluation


evaluate evaluated antibodies
antibodies deleted
members

discard
Procedure
Initialize population of antibodies (randomly generated).
Individuals Antibody (candidate solution)
Evaluation (fitness function) for all antibodies

While (termination criterion not satisfied)


Select ( superior antibodies from parent population)
Cloning based on fitness value
Variation operators on clones (Hyper mutation)
Evaluate new generated antibodies
Selection of superior antibodies
Creation of next generation population
End
To solve various issues pertaining to science, industry,
business etc.
To solve various combinatorial optimization problems.
In case of optimization problem, the antibodies are candidate
solution and antigens refers to constraints.
Advantages:
AIS search for the function optimum starting from a population of
points of the function domain, not a single one.
Blind Search Methods: AIS only use the information about the
objective function.
Cloning and Hypermutation perform simultaneous exploration and
exploitation
Received the attention of various researchers, mainly due to its
computational capability.
Antigens stimulate the generation of antibodies
Antibodies, recognizing the antigens, are proliferated to generate clones
Clones undergoes hypermutation process, to produce an new antibodies with varying
antigenic affinity
Among the newly generated antibodies, the superior one are kept in immune memory and
inferior are discarded

Preserves the high quality solution


One of the most important and remarkable characteristic of AIS, with optimization
point of view.
To generate Number of Clones for
undergoing mutation, following formula is
used.
*N
N j Round
j

N =Number of Antibodies.
= Decay Factor (Controlling the maximum
Number of Clones)
j= subscript of antibody where we calculate
the no of clones.
Q . We would like to use Artificial Immune System
(CLONALG) to solve the following NLP problem:

Minimize ( x1 1.5) 2 ( x2 4) 2

subject to 4.5 x1 x22 18 0


2 x1 x2 1 0
0 x1 , x2 4
In solving the problem we First need to construct a
lagrangian (Penalty Function ) f(x)

f ( x) ( x1 1.5) 2 ( x2 4) 2 1 max( 4.5x1 x22 18,0) 2 max( 2 x1 x2 1,0)


3 max( x1 ,0) 4 max( x2 ,0) 5 max( x1 4,0) 6 max( x2 4,0)

Here max(. ,0) takes care of the constraints and gives 0


value if constraint is satisfied.
The values of all 1, 2, 6=1
Number of Antibodies, N : 5
Decay parameter, : 0.8
Number to be selected, n : 3
Number to be replaced, d : 2
Step Size Control factor, p : 0.01
Step 1: Generation of 5 initial solution as the number of
antibodies is 5.

Sl No. Solution Fitness Feasibility


1 (3,2) 6.25 feasible
2 (2,3) 1.25 feasible
3 (1,4) 5.75 infeasible
4 (4,3) 16.25 infeasible
5 (2,2) 4.25 feasible

f ( x) ( x1 1.5) 2 ( x2 4) 2 1 max( 4.5x1 x22 18,0) 2 max( 2 x1 x2 1,0)


3 max( x1 ,0) 4 max( x2 ,0) 5 max( x1 4,0) 6 max( x2 4,0)
f (3, 2) (3 1.5) 2 (2 4) 2 1 max(4.5 3 22 18, 0) 2 max(2 3 2 1, 0)

3 max(3, 0) 4 max(2, 0) 5 max(3 4, 0) 6 max(2 4, 0)

f (3, 2) 2.25 4 0 0 0 0 0 0 6.25

f (2,3) (2 1.5) 2 (3 4) 2 1 max(4.5 2 32 18,0) 2 max(2 3 3 1,0)


3 max(2,0) 4 max(3,0) 5 max(2 4,0) 6 (3 4,0) 1.25
For 3rd antibodies :
f (1, 4) (1 1.5) 2 (4 4) 2 1 max(4.5 1 42 18, 0) 2 max(2 1 4 1, 0)
3 max(1, 0) 4 max(4, 0) 5 max(1 4, 0) 6 (4 4, 0)
.25 0 2.5 3 0 0 0 0 5.75 (infeasible)
For 4th antibodies:
f (4,3) (4 1.5) 2 (3 4)2 1 max(4.5 4 32 18, 0) 2 max(2 4 3 1, 0)
3 max(4, 0) 4 max(3, 0) 5 max(4 4, 0) 6 (3 4, 0)
6.25 1 9 0 0 0 0 0 16.25 (infeasible)
For 5th antibodies

f (2, 2) (2 1.5) 2 (2 4) 2 1 max(4.5 2 22 18, 0) 2 max(2 2 2 1, 0)


3 max(2, 0) 4 max(2, 0) 5 max(2 4, 0) 6 (2 4, 0)
.25 4 0 0 0 0 0 0 4.25
As the objective function is minimization, we select the
antibodies which has minimum affinity, i.e. considered
as best one.
Here we selected the 3 antibodies as given either it is
feasible or infeasible.
In case of infeasible, lagrangian convert it feasible
solution.
So the antibodies 2,3 and 5 as numbered them in the
increasing order their affinity values.
Lagrangian tries to convert infeasible solution to feasible
solution.
In case of minimization problem, it tries to increase the
affinity value of the antibodies in order to make it suitable for
selection but sometimes lower value of lagrangian multiplier
can make it suitable for selection.
In case of maximization problem, we take ve value of
lagrangian multiplier .
Ultimately as the final iteration complete all the solution
becomes feasible by achieving either global minima or global
maxima.
Step 2: Finding 3 (n=3) best antibodies found so far
Step 3: Calculate the number of clones required for each
selected antibodies ( jth antibody) by given formula-

*N
N j Round


j

Sl No. Solution Affinity Number of Clones


1 (2,3) 1.25 4
2 (2,2) 4.25 2
3 (1,4) 5.75 1
The number of clones for 1st selected antibody
.8*5
N1 Round 4
1
The number of clones for 2nd selected antibody

.8*5
N 2 Round 2
2

The number of clones for 3rd selected antibody

.8*5
N 2 Round 1
3
Step 4: Generate clones and calculate the affinity value. Here clones are
represented by the * mark and the parent antibody without * mark

For generation of the clones , we use Sl No. Solution Affinity


following formula to get the clones:- 1 (2,3) 1.25

exp( p * f ) 1* (1.85,3.82) 6.18


1** (2.57,3.91) 10.03
x ji x j * N (1,1)
1*** (2.31,2.08) 4.33
Where, f is the affinity of jth 1**** (2.69,3.85) 10.42
antibody and N(-1,1) gives normal
random numbers between 1 & -1 2 (2,2) 4.25
2* (1.23,2.62) 3.14
Best 2 solutions are marked red 2** (2.37,1.65) 6.29
excluding original solution
3 (1,4) 5.75
3* (0.88,3.78) 3.68
For 1 st antibodies:
exp(0.01*1.25) .98
x1* 2 .98*(.15) 1.85
x2* 3 .98*(.83) 3.82
1* ( x1* , x2* ) (1.85,3.82)
f (1.85,3.82) (1.85 1.5)2 (3.82 4)2 1 max(4.5 1.85 3.822 18,0)
2 max(2 1.85 3.82 1,0) 3 max(1.85,0) 4 max(3.82,0)
5 max(1.85 4,0) 6 (3.82 4,0)
.1225 0.032 4.91 1.12 0 0 0 0 6.18
Similarly we calculate the clones and their affinities.
After evaluating the affinity values we select the two
minimum affinity values of clone and replaced it as the
problem is minimization.
Here 2*(1.23, 2.62) and 3*(.88, 3.78 ) are selected because the
affinity value is lower than their fist affinity values.
Now these two antibodies are place in 1st and 4th position in
the original considered antibodies.
Step 5: Select the best 2 (d=2) solutions and replace the
worst antibodies found in step 1.

Sl No. Solution Affinity


1 (1.23,2.62) 3.14

2 (2,3) 1.25
3 (1,4) 5.75
4 (0.88,3.78) 3.68

5 (2,2) 4.25

Now repeat the entire process for next Iteration


Step 1: Generation of 5 initial solution as the number
of antibodies is 5.

Sl No. Solution affinity


1 (1.23,2.62) 3.14

2 (2,3) 1.25
3 (1,4) 5.75
4 (0.88,3.78) 3.68

5 (2,2) 4.25

Move to step 2 and proceed as shown previously


If we do not use lagrangian , then we have to select the
antibodies which satisfies the constraint equation, i.e the
solution is feasible.
Considered here the antibodies (1,1), (2,2), (2,3), (3,2) and
(3,1) which are feasible solutions.
Similarly follows all the procedure as discussed above taking
the affinity values of the antibodies.
Artificial Immune System is a robust
optimization technique.
It has low computational complexity.
Simultaneous exploration and exploitation of
solution space.
It has high convergence speed.
CLONALG Pseudo code
/* Initialization */
Initialize AB, n _ selected, , p(decay)
for i = 1 to AB do
1
Initialize xi to random array ( size same as objective function) values
end for

/* loop*/
for m = 1 to max_gen do
for i = 1 to AB do
affinity(j) = f ( xi )
end for
[ temp, index] =sort (affinity)
Selected = x ( index( 1 to n_selected))
sum=0
for k = 1 to n_ selected do
NC(k) = round (* AB/k)
for j= 1 to NC(k) do
MC(sum+j) = Selected (k)+ exp(p*temp)*tan(pi/4*(-1+2*rand(1)) )
Affinity_MC(sym+j)= f (MC (sum j ))
end for
sum=sum+NC(k)(Number of clones)
end for
Replace bottom d antibodies (AB) with new MC (Mutated child)
end for
Result = f (sort ( AB(1)))
Thank
You

Вам также может понравиться