


































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



































Surat Pyari^ M.Sc.
(Mathematics with specialization in Computer Application)
Dayalbagh Educational Institute
{^ Metaheuristic search techniques inSoftware Test Data Generation {^ Metaheuristic search techniques^ z
Hill Climbing z Stochastic Hill Climbing z Simulated Annealing {^ Test Data Generation with SimulatedAnnealing^ z
Testing Specification Failure z The Dynamic Approach z Example
The coverage of specific programstructures, as part of structural, White-box testing strategy; z The exercising of some specific programfeature, as desired by a specification; z Attempting to automatically disprovecertain grey-box properties regardingthe operation of a piece of software, z To verify non-functional properties
{^ Objective functions compare andcontrast solutions of the search withrespect to the overall search goal {^ Whether a better objective value is, inpractice, a higher value or a lowervalue, is dependent on whether thesearch is seeking to minimize ormaximize the objective function
SimulatedAnnealing
EvolutionaryAlgorithms^ GeneticAlgorithms
{^ “Steepest ascent” climbing strategy:^ z
All neighbours are evaluated, with theneighbour offering the greatestimprovement chosen to replace thecurrent solution {^ “Random ascent” strategy:^ z
Neighbours are examined at random andthe first neighbour to offer animprovement is chosen
Procedure iterated hill climber Begin^ t^ <— 0initialize
best repeat
local^ <— FALSEselect a current point v
at randomc
evaluate v
c repeat^ select all new points in the neighbourhood of v
c
select the point v
from the set of new pointsn^ with the best value of evaluation function
eval
if^ eval (v
) is better thann^
eval (v )c^
then^ v
<— vc n else^ local
<— TRUE
until^ local t <— t+1 if^ v^ is better than bestc^^ then
best^ <— v
c
until^ t = MAX end
{^ Easy to apply
Procedure
stochastic hill-climber Begin t <— 0select a current string v
at randomc^
evaluate v
c Repeat^ select the string v
from the neighbourhood of vn^
c
select v
with probability 1/[1+en^
{ eval ( v
) -^ eval c (^ )}/Tvn
]
t <— t+1 until^ t=MAX end
T^
(-13/T) e
p
1 5 1020501010
0.000002 0.0743 0.2725 0.52 0.77 0.9999…..
1.00 0.93 0.78 0.66 0.56 0.5….
Eval(v
)=107c Eval(v
)=120n {^ Conclusion :
if T
is huge thesearch becomerandom, if T issmall thestochastic hillclimber revertsan ordinary hill climber
eval(vn)
V=eval(vc)-eval(vn)
v/10 e p
(^80100107120150)
(^2770) -13 -
14.88^ 2.01^ 1.00^ 0.27^ 0.
0.06 0.33 0.50 0.78 0.
Eval(v
)=107c T=10 {^ Conclusion :
if the new point is better, the
probability of acceptance is greater than 0.5.
{^ Better candidate solutions are alwaysaccepted {^ Worse candidate solution are acceptedalways in a controlled manner to escapefrom a locally optimal solutions
Simulated_Annealing Begin^ t <— 0initialize Tselect a current point vc at randomevaluate vc^ repeat
repeat^ select a new point vn in the neighbourhoodof vc^ if
eval (vc)<
eval (vn) then vc <— vn else if^ random[0,1)<e
{ eva l(vc) -
eval (vn)}/T
then^ vc <— vn until^ (termination condition)T <— g(T,t)t <— t+1 until (halting criterion) end