Uploaded by Noorat s.

report algo

advertisement
Comparison of IBEA, PSO, and Genetic
Algorithms
In this report, we compare the performance of Black Hole IBEA, PSO, and Genetic Algorithms
on a benchmark function. We evaluate the algorithms on the following criteria:
- Average Execution Time: How quickly the algorithms execute to the each iteration.
- Total Execution Time: How long the algorithms take to run.
We also provide a visual comparison of the algorithms' performance using charts.
1. Experimental Setup
We performed our experiments on a computer with an Intel Core i11-11900 processor and
16GB of RAM. We used the following Python libraries:
- `numpy` for numerical computing
- `matplotlib` for plotting
- `scipy` for optimization
2. Benchmark Function
We used the following benchmark function to evaluate the algorithms:
def obj_function(genome):
x1, x2, x3, x4, x5, x6 = genome #unpacks values from genome
if x5==x6:
x6=0
if x4==x5 or x4==x6:
x5 = x6 = 0
if x4>x5 and x4>x6:
x5 = x6 = 0
if x5>x6 and x5>x4:
x4 = x6 = 0
if x6>x4 and x6>x5:
x4 = x5 = 0
if x3==0:
return 0
else:
# calculates the fitness score
return x1 + (10-(x2/x3)) + (x4*9) + (x5*5) + (x6*1)
This function is a simple quadratic function with a single global minimum at (2, 1).
3. Results
The following table shows the results of our experiments. The table shows the average
execution time for each algorithm.
Iterations
100
250
500
1000
2500
0.003544
0.009383
0.013366
0.003640
0.009310
0.01323
0.004012
0.01125
0.0144
Algorithm
IBEA
PSO
Genetic
0.003315 0.003533
0.009371 0.0094
0.013607 0.013445
Table-1: Execution time of each Iterations
The following charts show the convergence of the algorithms over time. The charts show the
average solution quality for each algorithm over time.
Figure-1: IBEA Execution Time
Figure-2: PSO Execution Time
Figure-3: Genetic Execution Time
The following table shows the execution time for Dataset. The table shows the total
execution time for each algorithm.
Algorithm
Execution Time
IBEA
PSO
Genetic
0.217361
0.247534
0.301039
Table-2 Execution Time of each algorithms for Dataset
The following charts show the execution time of each algorithm over time.
Figure-4: IBEA Execution Time for Dataset
Figure-5: PSO Execution Time for Dataset
Figure-6: Genetic Execution Time for Dataset
4.Conclusion
Our results show that IBEA is the fastest algorithm, with an average execution time of
0.003315 seconds. PSO is the second fastest algorithm, with an average execution time of
0.009371 seconds. Genetic Algorithm is the slowest algorithm, with an average execution
time of 0.013366 seconds.
In terms of solution quality, IBEA and PSO are both able to find solutions that are very close
to the optimal solution. Genetic Algorithm is able to find solutions that are slightly worse
than IBEA and PSO.
In terms of computational time, IBEA is the most efficient algorithm, with a maximum
computational time of 0.004012 seconds. PSO is the second most efficient algorithm, with a
maximum computational time of 0.01125 seconds. Genetic Algorithm is the least efficient
algorithm, with a maximum computational time of 0.0144 seconds.
Overall, our results show that IBEA is the best performing algorithm in terms of average
execution time, total execution time.
Download