0% found this document useful (0 votes)
22 views

Solving Equal Piles Problem

The document discusses solving the equal piles problem using different algorithms. It analyzes the problem space and objectives of the work. Literature on hybrid grouping genetic algorithm, perturbation-based local search, and a hybrid method are surveyed. The work done, results, and conclusions are presented.

Uploaded by

Vineeth Chabala
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Solving Equal Piles Problem

The document discusses solving the equal piles problem using different algorithms. It analyzes the problem space and objectives of the work. Literature on hybrid grouping genetic algorithm, perturbation-based local search, and a hybrid method are surveyed. The work done, results, and conclusions are presented.

Uploaded by

Vineeth Chabala
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Solving Equal Piles Problem

A Final Project End Semester Report

submitted by

CHABALA VINEETH BABU (CS20B1025)

in partial fulfilment of requirements


for the award of the degree of

BACHELOR OF TECHNOLOGY

Department of Computer Science and Engineering


INDIAN INSTITUTE OF INFORMATION TECHNOLOGY,
DESIGN AND MANUFACTURING, KANCHEEPURAM
May 2024
DECLARATION OF ORIGINALITY

I, CHABALA VINEETH BABU, with Roll No: CS20B1025 hereby declare that the
material presented in the Project Report titled Solving Equal Piles Problem represents
original work carried out by me in the Department of Computer Science and Engi-
neering at the Indian Institute of Information Technology, Design and Manufacturing,
Kancheepuram.
With my signature, I certify that:

• I have not manipulated any of the data or results.

• I have not committed any plagiarism of intellectual property. I have clearly indi-
cated and referenced the contributions of others.

• I have explicitly acknowledged all collaborative research and discussions.

• I have understood that any false claim will result in severe disciplinary action.

• I have understood that the work may be screened for any form of academic mis-
conduct.

CHABALA VINEETH BABU

Place: Chennai
Date: 14.05.2024
CERTIFICATE

This is to certify that the report titled Solving Equal Piles Problem, submitted by
CHABALA VINEETH BABU (CS20B1025), to the Indian Institute of Information
Technology, Design and Manufacturing Kancheepuram, in partial fulfilment of require-
ments for the award of the degree of BACHELOR OF TECHNOLOGY is a bonafide
record of the work done by him/her under my supervision. The contents of this report,
in full or in parts, have not been submitted to any other Institute or University for the
award of any degree or diploma.

Dr. Pandiri Venkatesh


Project Internal Guide
Assistant Professor
Department of Computer Science and Engineering
IIITDM Kancheepuram, Chennai - 600 127

Place: Chennai
Date:
ACKNOWLEDGEMENTS

I extend my sincerest appreciation to Dr. Pandiri Venkatesh for his invaluable guidance
and unwavering support as my project advisor. His profound insights and dedication
have been instrumental in the successful completion of this endeavor. Particularly note-
worthy is Dr. Pandiri’s assistance in optimizing the code for new instances, ensuring its
suitability and efficiency. His expertise enabled me to navigate challenges with confi-
dence and adapt the project to evolving requirements.

I would also like to express profound gratitude to Aditya Gopakumar for the in-
valuable insights gleaned from his project report, discovered independently. His work
served as a guiding beacon, enabling me to navigate challenges with confidence.

Furthermore, I express deep gratitude to the educational YouTube channels for their
invaluable contributions. Their tutorials on the problem domain and genetic algorithms
have significantly enriched my learning experience, aiding in overcoming project chal-
lenges.

Additionally, I am thankful for the unwavering support and assistance of my friends


and parents, whose encouragement and collaboration were invaluable throughout this
journey.

I am immensely grateful for the support and resources provided by Dr. Pandiri
Venkatesh, Aditya Gopakumar, educational YouTube channels, friends, and parents,
which have been integral to the successful progression of my project.

i
ABSTRACT

Given set of n objects of various heights we seek an arrangement of these objects into
k piles in such a way that heights of resulting piles are as nearly as possible. This task
can also be framed as partitioning a set of numerical values into a specified number of
subsets, with the objective of minimizing the differences in the sums of each subset.

In this study, I attempted to tackle the problem in a novel way by employing the
methodologies proposed by Prof. A. Singh and A. Gupta, as well as a combination
of the two. This technique seeks to extensively investigate several choices in order to
identify effective solutions. It demonstrates a commitment to developing new ideas
and merging old ones in order to better understand and solve the problem.To list the
approaches used: 1. Hybrid grouping genetic algorithm. 2. Perturbation-based local
search, and 3. A hybrid technique that combines the preceding algorithms.

I actively searched for new problem cases to optimise, changing the code to make
it more flexible. Devoted to perfection, I painstakingly adjusted algorithms, examining
the characteristics of every incident. Specific changes were implemented to increase
productivity. By using this iterative method, I tried to achieve the best results possible in
a variety of settings while also improving the quality of the solutions and computational
effectiveness..
KEYWORDS: Equal Piles Problem; Genetic Algorithm; Perturbation Based Lo-
cal Search; Hybrid Heuristics.

ii
TABLE OF CONTENTS

ACKNOWLEDGEMENTS i

ABSTRACT ii

LIST OF TABLES v

LIST OF FIGURES vi

ABBREVIATIONS vii

NOTATION viii

1 INTRODUCTION 1
1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Combinatorial Search Space Analysis . . . . . . . . . . . . . . . . 3
1.4 Objectives of the work . . . . . . . . . . . . . . . . . . . . . . . . 4

2 Literature Survey 6
2.1 HGGA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 PLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 The Hybrid Method . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.4 Instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3 Work Done 11
3.1 Proposed algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3 Initial code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

iii
4 Results and Analysis 15

5 Conclusions and Extensions 20


5.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5.2 Future Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

REFERENCES 22
LIST OF TABLES

1.1 The equal piles problem instance of Jones and Beltramo[1] . . . . . 2

4.1 Comparing HGGA ans PLS with Hybrid method for Jones and Bel-
tramo instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.2 Input Data for Equal Piles Problem . . . . . . . . . . . . . . . . . . 18
4.3 F Values for Uniform Instances . . . . . . . . . . . . . . . . . . . . 18
4.4 F Values for Non-Uniform Instances values ∈ [1,1000] . . . . . . . 19

v
LIST OF FIGURES

4.1 Variation in Fitness across 100 Generations . . . . . . . . . . . . . 16


4.2 Variation in Fitness across 100 Generations . . . . . . . . . . . . . 16
4.3 Variation in Fitness across 100 Generations . . . . . . . . . . . . . 17

vi
ABBREVIATIONS

HGGA Hybrid Grouping Genetic Algorithm


GA Genetic Algorithm
PLS Perturbation Based Local Search Algorithm
EPP Equal Piles Problem
ACO Ant Colony Optimisation
RL Reinforcement learning

vii
NOTATION

P
Summation

viii
CHAPTER 1

INTRODUCTION

The equal piles problem, first formulated by Jones and Beltramo in 1991, is revisited in
this study with an emphasis on effective solutions. I tried to implement the approaches
suggested by A. Singh and A. Gupta[2], in addition to a hybrid strategy that incorporates
components from both. The task is to minimise differences in the sums of each pile by
grouping numbers or objects of different heights into K subsets or heaps. In order to
provide new insights into this persistent issue, our research explores efficient ways for
obtaining balanced distributions within specified restrictions. I wanted to increase the
understanding and solution of this basic problem in resource allocation and optimisation
by incorporating new ideas and reexamining old techniques.

1.1 Background

Jones and Beltramo[1] initially presented the Equal Piles Problem in 1991. It entails
dividing a set up into smaller groups. In particular, the goal is to partition a set of N inte-
gers or objects with different heights into K subgroups. Making sure that each subset’s
sum of numbers roughly resembles the sums of the other subsets is the goal. Appli-
cations of the Equal Piles Problem can be found in many fields, including assembly
design, parallel computing, and transportation.

Nine distinct genetic algorithms were tested by Jones and Beltramo[1] on a particu-
lar case shown in Table 1.1. Of them, five made use of group number encoding and the
remaining ones of permutation encoding. An improved grouping genetic algorithm was
presented by Faulkener[3], who achieved F = 0 in all 30 trials with an average of 9608
fitness function evaluations. Greene then introduced the Eager Breeder method, which
achieved F = 0 in 29 out of 30 trials with an average of 3242 fitness assessments. It
included a novel crossover and mutant operator. Along with perturbation-based local
CHAPTER 1. INTRODUCTION CS20B1025

Table 1.1: The equal piles problem instance of Jones and Beltramo[1]

Object Size Object Size Object Size


a1 3380 a13 1225 a25 4635
a2 1952 a14 2479 a26 1824
a3 3305 a15 4635 a27 528
a4 1824 a16 836 a28 6481
a5 3832 a17 3433 a29 3305
a6 3049 a18 4068 a30 3304
a7 3176 a19 1363 a31 2588
a8 3176 a20 3519 a32 2156
a9 3980 a21 2992 a33 4107
a10 2060 a22 2705 a34 3380
a11 2316 a23 1363
a12 2787 a24 5932

search, Professors A. Singh and A. Gupta created the Hybrid Grouping Genetic Algo-
rithm (HGGA). In all 30 trials, HGGA consistently obtained F = 0, averaging 562.37
fitness ratings.

These developments highlight the continuous attempts to improve genetic algo-


rithms for the equal piles problem, demonstrating increased effectiveness and perfor-
mance across a range of experiments.

k
X
F itness = (S i − S avg )
i=0

is used to calculate fitness.The formula for


Pk
n=0 (ai )
S avg is
k

.Fitness can alternatively be calculated using the formula

f = Smax − Smin

, in which Smax denotes the maximum height of piles and Smin denotes their minimum
height. By doing this, the piles that are wedged between the ones at the extreme ends
are brought closer to the mean height.

Department of CSE, IIITDM Kancheepuram, May 2024 2


CHAPTER 1. INTRODUCTION CS20B1025

1.2 Motivation

This problem has a wide range of applications apart from just being purely for academic
interest and mental simulation. Fore example:

• Provided N tasks are to be distributed among K processors to achieve balanced


work distribution.[4]

• Given N items for placement in K stacks in a warehouse, ensuring equal stack


heights for ease of transportation.

• Aiming for equitable task assignment across K workstations in an assembly line


with N tasks, ensuring nearly uniform workload distribution.

Although heuristics, genetic algorithms, and other search strategies have proven
successful in solving these kinds of computational search problems, difficulties still
arise when trying to apply these strategies to new or related problems. Despite their
effectiveness, there is still a need to fully utilise these strategies for newly emerging
problems. This emphasises the continuous need for algorithmic techniques research
and innovation to address real-world issues in a variety of sectors. To handle the chang-
ing complexity present in real-world applications, these approaches must be further
investigated and improved.

1.3 Combinatorial Search Space Analysis

In solving combinatorial problems, typically, combinatorial search algorithms are em-


ployed. These algorithms are generally categorized into two types: constructive search
and perturbative/local search algorithms. Constructive search methods involve exam-
ining partial solutions and progressively assembling a complete solution from these
partial components. On the other hand, perturbative or local search algorithms utilize
transformations to make small adjustments to solutions, aiming to gradually enhance
their quality. Both approaches can lead to finding the best solution possible.

Constructive search algorithms systematically build solutions by considering differ-


ent combinations of partial solutions. They iteratively refine these partial solutions until

Department of CSE, IIITDM Kancheepuram, May 2024 3


CHAPTER 1. INTRODUCTION CS20B1025

a complete solution is obtained. In contrast, perturbative or local search algorithms fo-


cus on making small changes to existing solutions, evaluating the impact of each change
and selecting the one that improves the solution. These methods continue making incre-
mental adjustments until an optimal solution is reached. Both approaches offer valuable
strategies for tackling combinatorial problems and can be applied depending on the spe-
cific problem and its constraints.

1.4 Objectives of the work

The EPP has historically been tackled using algorithms prized for their efficiency. This
paper introduces a novel approach aimed at offering a potential framework for address-
ing the problem, with room for further enhancement through the integration of multiple
heuristics. The proposed framework revolves around the utilization of heuristics to op-
timize the solution process. Here, the heuristics and the sequence of steps, striving to
attain the optimal solution with minimal iterations.

Within this framework, three methods have been implemented:

• Hybrid Grouping Genetic Algorithm


• Perturbation-based Local Search
• A Hybrid Approach combining the above two techniques

While these methods are effective, they may have minor drawbacks. By integrat-
ing both HGGA and PLS into a hybrid approach, I aim to overcome these limitations.
This hybrid approach combines the strengths of both methods while mitigating their
respective weaknesses. By leveraging the efficiency of HGGA and the robustness of
PLS, I seek to enhance the overall effectiveness of the solution process for the Equal
Piles Problem. Through this integrated approach, I aim to provide a comprehensive
solution framework that leverages multiple techniques to tackle the EPP efficiently and
effectively.

By testing the heuristics on these new instances, I aimed to assess their performance
across a broader spectrum of scenarios, encompassing different object distributions and
problem complexities. Through this expanded testing regimen, valuable insights into

Department of CSE, IIITDM Kancheepuram, May 2024 4


CHAPTER 1. INTRODUCTION CS20B1025

the effectiveness of the heuristics in real-world optimization contexts are sought, ul-
timately contributing to the advancement of optimization methodologies for complex
problems like the Equal Piles Problem.

Department of CSE, IIITDM Kancheepuram, May 2024 5


CHAPTER 2

Literature Survey

Singh and Gupta[2] present new approaches specifically designed for the EPP in their
separate works, emphasising workload balancing by dividing assembly jobs across
workstations equally. In their investigation of the use of GAs for partitioning issues,
Jones and BeltramociteJones highlight how workload balance in assembly lines can be
optimised by utilising the adaptability of GAs, which are motivated by natural selection.
The study by Greene [4] probably looks at more general partitioning issues, using evolu-
tionary algorithms as an adaptable framework to solve difficult optimisation problems,
such as workload balancing in EPP settings. Last but not least, Sabuncu and Simsek[5]
provide a novel strategy for solving challenging combinatorial issues, including work-
load smoothing in assembly lines, utilising answer set programming (ASP). Together,
these publications provide a variety of ideas and insights that might guide the creation of
hybrid strategies for handling workload efficiently by solving the Equal Piles Problem.

2.1 HGGA

The Hybrid Grouping Genetic Algorithm (HGGA) represents a sophisticated approach


to tackling the Equal Piles Problem (EPP), leveraging a combination of genetic algo-
rithms (GAs) and heuristic techniques. Initially, the genetic algorithm stage allocates
objects among the piles, harnessing principles akin to natural selection to optimize the
population’s overall fitness. The genetic algorithm consists of distinct components,
including the creation of an initial population, fitness assessment, selection of parent
solutions, crossover, and mutation. These operations emulate the evolutionary process,
gradually refining solutions towards optimal or near-optimal configurations. However,
to handle unassigned objects resulting from genetic operations, the algorithm integrates
a heuristic function. This hybrid approach combines the strength of both methods, lever-
aging genetic algorithms’ exploration capabilities and heuristic techniques’ problem-
CHAPTER 2. LITERATURE SURVEY CS20B1025

specific knowledge to achieve more efficient and effective solutions for the EPP.
Fitness Function:
k
X
F itnessScore = (Si − Savg )
i=0

Within the genetic algorithm framework, several key characteristics define its op-
eration. The initial population creation phase generates a diverse array of potential
solutions, representing different allocations of items into piles. Each individual solu-
tion, akin to a blueprint, outlines how items are distributed, with chromosomes serving
as lists detailing item-pile assignments. Fitness assessment determines the quality of
each solution, guiding the selection process to favor individuals with superior fitness for
reproduction. Crossover and mutation operators introduce variability and exploration
within the population, facilitating the generation of novel solutions. Despite the genetic
algorithm’s robustness, the heuristic operator plays a crucial role in refining solutions
based on problem-specific knowledge or rules. By complementing genetic operations,
heuristics enhance solution quality and guide exploration towards promising areas of
the solution space, leading to improved optimization processes.

Overall, the integration of genetic algorithms and heuristic techniques within the
HGGA framework offers a comprehensive and versatile approach to solving the EPP.
By leveraging evolutionary principles and problem-specific knowledge, HGGA effi-
ciently explores and refines the solution space, aiming for optimal or near-optimal solu-
tions. This hybrid methodology combines the strengths of both approaches, providing
a powerful optimization tool applicable across diverse domains and combinatorial opti-
mization problems

2.2 PLS

The method employs a local search approach to iteratively construct improved solu-
tions. Beginning with an initial solution, the local search aims to minimize the height
of the largest pile. It evaluates whether objects in the largest pile can be redistributed
to other piles or swapped with objects from different piles to reduce the height of the
largest pile. If multiple moves are feasible, the one that maximally reduces the height

Department of CSE, IIITDM Kancheepuram, May 2024 7


CHAPTER 2. LITERATURE SURVEY CS20B1025

is selected. Following this adjustment, the process repeats, identifying a new largest
pile and further optimizing the solution. This local search process continues for a fixed
number of iterations, continually refining the solution to potentially enhance its quality.

In the subsequent step, referred to as perturbation, the current solution undergoes


further modification. If the solution obtained through perturbation surpasses the cur-
rent best solution, it replaces the previous best solution. Perturbation involves altering
the current solution to explore new areas of the solution space. This process typically
involves introducing random modifications to the solution configuration. After pertur-
bation, the local search procedure is applied once again to refine the perturbed solution,
seeking further improvements. This iterative process of perturbation and local search
helps to diversify the search space and potentially uncover novel, high-quality solutions.

Overall, the combination of local search and perturbation techniques offers a sys-
tematic approach to iteratively refine and explore solution space. By focusing on mini-
mizing the height of the largest pile and introducing random perturbations, the method
aims to converge towards optimal or near-optimal solutions for the equal piles prob-
lem. Through these iterative processes, the method systematically navigates the solu-
tion space, potentially uncovering more efficient and effective solutions.

2.3 The Hybrid Method

The HGGA and PLS each offer unique strengths and weaknesses in tackling optimiza-
tion problems.

HGGA excels in global search, effectively exploring the entire solution space to
mitigate the risk of being trapped in local optima. Its ability to traverse diverse re-
gions of the search space makes it well-suited for complex optimization challenges.
Additionally, HGGA benefits from parallelization, allowing for efficient utilization of
multiple processors or cores to expedite computations. However, its computational cost
can be substantial, particularly for large problem instances, and its effectiveness hinges
on parameter tuning for selection, crossover, and mutation operations.

On the other hand, PLS is characterized by its efficiency and simplicity. It offers

Department of CSE, IIITDM Kancheepuram, May 2024 8


CHAPTER 2. LITERATURE SURVEY CS20B1025

a faster alternative to HGGA, making it particularly suitable for scenarios where quick
solutions are desired. The straightforward nature of PLS simplifies implementation and
facilitates ease of understanding. However, PLS may encounter challenges with local
optima, as it primarily focuses on exploring the vicinity of a starting solution. This
limited exploration can potentially lead to suboptimal solutions, as better alternatives in
distant regions of the search space may remain unexplored.

By integrating these two approaches in a hybrid algorithm, it becomes possible to


capitalize on their respective strengths while mitigating their weaknesses. The global
search capabilities of HGGA can help explore diverse regions of the solution space,
while the efficiency and simplicity of PLS offer rapid local improvements. Through
strategic integration and iterative refinement, the hybrid algorithm can navigate complex
optimization landscapes with agility and precision.

In summary, the hybridization of HGGA and PLS presents a promising approach


to optimization, leveraging the complementary strengths of both methodologies. By
harnessing global exploration and local refinement, the hybrid algorithm aims to strike
a balance between exploration and exploitation, ultimately leading to the discovery of
high-quality solutions for intricate optimization problems.

2.4 Instances

In addition to evaluating the proposed heuristics on the Jones and Beltramo instance
mentioned in Table 1.1, I conducted further testing on new instances derived from the
multiprocessor scheduling problem P ||Cmax [1, 6, 7]. These instances offer a diverse
range of parameters, with the number of objects n varying from 10 to 1000 and the
number of piles k ranging from 5 to 25, satisfying the condition n > k.The object sizes
for these instances were randomly generated within different intervals: [1, 100], [1,
1000], and [1, 10000].

Department of CSE, IIITDM Kancheepuram, May 2024 9


CHAPTER 2. LITERATURE SURVEY CS20B1025

2.5 Summary

The HGGA combines genetic algorithms and heuristics to optimize object allocation,
while PLS refines solutions through iterative local search. This hybrid method lever-
ages global exploration of genetic algorithms and local refinement of local search for
improved optimization in complex problems like the EPP.

Department of CSE, IIITDM Kancheepuram, May 2024 10


CHAPTER 3

Work Done

3.1 Proposed algorithm

The algorithm begins by initializing a population of potential solutions. Fitness evalu-


ation follows, assessing each individual’s suitability using a fitness function. Parental
selection for crossover occurs through binary tournament selection, favouring higher-
fitness individuals. Crossover generates offspring. A heuristic refines solutions and
handles unassigned objects. Fitness evaluation reoccurs for offspring and refined so-
lutions. Selection for the next generation prioritizes individuals with superior fitness.
This process continues for a predefined number of generations or until a termination
criterion is satisfied. Eventually, the finest solution found is produced. This algorith-
mic approach merges genetic algorithms with heuristics to enhance solution quality and
attain superior performance in problem-solving endeavours.

3.2 Instances

In addition to evaluating my heuristics on the Jones and Beltramo instance, I tested


them on newly generated instances derived from the multiprocessor scheduling problem
P ||Cmax [1, 6, 7]. These instances were categorized into two distinct families: uniform
and non-uniform. In uniform instances, object sizes were uniformly distributed within
specified intervals, ensuring a balanced representation of object sizes. Conversely, non-
uniform instances featured highly variable object sizes, presenting a more diverse and
challenging optimization landscape. Each instance followed a specific format, detail-
ing the number of machines, number of tasks, and the processing time for each task.
The objective was to assess the performance of the heuristics across a range of scenar-
ios, encompassing different object distributions and complexities. This comprehensive
CHAPTER 3. WORK DONE CS20B1025

evaluation aimed to provide insights into the effectiveness and robustness of the heuris-
tics in addressing real-world optimization challenges, contributing to advancements in
optimization methodologies for problems like the Equal Piles Problem.

3.3 Initial code

The code presents a comprehensive and adaptable approach to tackle combinatorial


optimization problems. This problem involves assigning a set of items to a limited
number of bins (or piles) in a way that optimizes certain criteria, such as minimizing
the total number of bins used or maximizing space utilization. The code is structured
around a hybrid genetic algorithm (HGGA) combined with perturbation local search
(PLS), two powerful optimization techniques that complement each other to efficiently
explore the solution space and find near-optimal solutions.

At the core of the code lie several key functions responsible for different stages of
the optimization process. The initialization function sets the stage by generating an
initial population of solutions, each representing a potential allocation of items to bins.
This diversity ensures that the algorithm explores a wide range of possible solutions,
increasing the likelihood of finding high-quality solutions.

The fitness calculation function evaluates the quality of each solution by assessing
how well items are distributed among the bins. Solutions with more evenly balanced
bins are assigned higher fitness scores, reflecting their desirability. This incentivizes the
algorithm to prioritize solutions that lead to more efficient packing arrangements.

The genetic algorithm phase involves operations such as crossover and mutation,
inspired by principles of natural selection and genetic inheritance. Crossover facili-
tates the exchange of genetic material between parent solutions, creating offspring with
characteristics inherited from both parents. Mutation introduces random changes to in-
dividual solutions, injecting diversity into the population and preventing the algorithm
from getting stuck in local optima.

Selection mechanisms ensure that solutions with higher fitness scores are more
likely to be chosen as parents for the next generation, mimicking the process of nat-

Department of CSE, IIITDM Kancheepuram, May 2024 12


CHAPTER 3. WORK DONE CS20B1025

ural selection in biological evolution. This bias towards better solutions helps steer the
algorithm towards regions of the solution space that are more promising in terms of
optimization objectives.

After the genetic algorithm phase, the code incorporates a perturbation local search
(PLS) mechanism to further refine solutions. PLS iteratively perturbs individual solu-
tions by relocating items between bins, aiming to improve their fitness. This iterative
refinement process explores the neighborhood of each solution, seeking to uncover im-
provements that may not have been accessible through genetic operations alone.If the
perturbation is too much then many of its good features are lost and local search may
not be able to improve the obtained solution to a value better than the current best.

The main function orchestrates the entire optimization process, from initialization to
final solution evaluation. It coordinates the execution of the genetic algorithm, including
multiple generations of evolution, and applies the perturbation local search technique
to enhance solution quality iteratively. Finally, it presents the best solution found along
with its corresponding fitness, providing insights into the algorithm’s effectiveness in
solving the optimization problem at hand.

Overall, the code offers a robust and flexible framework for solving combinatorial
optimization problems. By combining the strengths of genetic algorithms and local
search techniques, it demonstrates a powerful approach to explore complex solution
spaces and identify near-optimal solutions efficiently. Its modular structure and sys-
tematic approach make it applicable to a wide range of optimization problems beyond
bin packing, showcasing its versatility and utility in diverse domains.

Department of CSE, IIITDM Kancheepuram, May 2024 13


CHAPTER 3. WORK DONE CS20B1025

Algorithm 1 Genetic Algorithm with Local Search Enhancement


1: Input: Data, Maximum Number of Piles, Population Size, Number of Generations,
Number of Iterations, Crossover Rate, Mutation Rate
2: Output: Best Pile Configuration, Average Fitness
3: procedure H YBRID
4: population ← initialize_population(max_num_piles)
5: for generation ← 1 to num_generations_hgga do
6: f itness_scores ← [calculate_fitness(ind, max_num_piles) for ind in
population]
7: new_population ← []
8: for iteration ← 1 to (population_size/2) do
9: parents ← select_parents(population, f itness_scores)
10: if random_number() < crossover_rate then
11: child1, child2 ← crossover(parents[0], parents[1])
12: new_population ← new_population ∪
[mutate(child1), mutate(child2)]
13: else
14: new_population ← new_population ∪
[mutate(parents[0]), mutate(parents[1])]
15: end if
16: end for
17: population ← new_population
18: end for
19: for solution ← population do
20: best_solution ← perturbation_local_search(solution)
21: best_f itness ← calculate_fitness(best_solution, max_num_piles)
22: if best_fitness < best_overall_fitness then
23: best_overall_f itness ← best_fitness
24: best_overall_pile ← best_solution
25: end if
26: end for
27: Display Best Pile Configuration and Average Fitness
28: end procedure

Department of CSE, IIITDM Kancheepuram, May 2024 14


CHAPTER 4

Results and Analysis

This part of the paper delves into the results and fitness values, emphasizing readability
and clarity. A fitness score of zero represents the optimal solution, with values ap-
proaching zero indicating superior outcomes. The output presented here pertains to a
simplified problem, facilitating easier interpretation. It details the partitioning of ’n’
values into piles, shedding light on the order of heuristics selected and their impact
on solution quality. By comprehensively examining the results and fitness values, this
chapter aims to offer a deeper understanding of the optimization process and the effec-
tiveness of the heuristic strategies employed.The below table compares the performance
of HGGA and PLS and Hybrid method

Table 4.1: Comparing HGGA ans PLS with Hybrid method for Jones and Beltramo
instance

HGGA PLS Hybrid


Population Size 100 - 100
F-Value 20.43 36.47 14.96

In all our experiments involving HGGA-EPP, I tried to standardized certain parame-


ters: pc = 0.8, pbetter = 0.8, and pcp = 0.6. However, I made an exception for instances
where n = 10. Due to the small size of n = 10, a population of 100 chromosomes was
deemed excessive, as it could compromise the uniqueness of each member within the
initial population. Therefore, for these instances, I opted for a reduced population size
of 10 chromosomes. Throughout the experiments, I tried HGGA-EPP with a maximum
of 1000 generations.

For PBLS-EPP,I have maintained pcp = 0.8 and capped the maximum number of it-
erations at 1000. The divergence in pcp values between HGGA-EPP and PBLS-EPP
stems from their distinct operational mechanisms. In HGGA-EPP, mutation serves
as a subsidiary operator primarily tasked with preserving diversity within the popula-
tion. Conversely, in PBLS-EPP, mutation functions to perturb the current best solution.
CHAPTER 4. RESULTS AND ANALYSIS CS20B1025

Figure 4.1: Variation in Fitness across 100 Generations

Figure 4.2: Variation in Fitness across 100 Generations

Department of CSE, IIITDM Kancheepuram, May 2024 16


CHAPTER 4. RESULTS AND ANALYSIS CS20B1025

Figure 4.3: Variation in Fitness across 100 Generations

Hence, the nuanced differences in pcp values reflect the tailored roles of mutation within
each algorithm.

Standardizing parameters ensures consistency and facilitates meaningful compar-


isons across experiments. Tailoring population sizes and mutation probabilities to spe-
cific instance characteristics optimizes algorithm performance, balancing computational
efficiency with solution quality. These meticulously chosen parameters reflect a strate-
gic approach to algorithm design, aimed at maximizing effectiveness in solving the
Equal Piles Problem across a diverse range of instances.

An example of one instance from both uniform and non uniform are given below

Within each family, comprising both uniform and non-uniform instances, there are
10 instances for every combination of n, k, and object size interval, resulting in a to-
tal of 390 instances. To comprehensively evaluate the performance of the instances, I
conducted trials on 13 randomly selected instances from both uniform and non-uniform
categories. These instances encompassed all possible combinations of n and k values.
The results of these executions are presented in the tables below. Through this system-
atic approach, I aimed to provide a thorough assessment of the instances’ performance
across various parameters, offering valuable insights into their effectiveness in address-

Department of CSE, IIITDM Kancheepuram, May 2024 17


CHAPTER 4. RESULTS AND ANALYSIS CS20B1025

Table 4.2: Input Data for Equal Piles Problem

Uniform Non Uniform


Object Size Object Size
a1 26 a1 99
a2 68 a2 90
a3 2 a3 96
a4 92 a4 98
a5 61 a5 96
a6 5 a6 95
a7 48 a7 98
a8 53 a8 97
a9 80 a9 95
a10 35 a10 1

ing real-world optimization challenges such as the Equal Piles Problem.

Table 4.3: F Values for Uniform Instances

k n F-value for HGGA F-value for PLS F-Value for Hybrid


5 10 13.35 34.08 7.05
5 50 45.83 136.31 40.16
5 100 11.53 48.45 10.64
5 500 65.19 270.51 64.37
5 1000 254.31 864.44 253.15
10 50 170.73 195.38 133.11
10 100 56.40 72.32 55.88
10 500 761.329 1268.74 682.82
10 1000 83.64 134.29 81.62
25 50 142.03 136.92 118.87
25 100 172.93 143.39 153.55
25 500 711.81 770.57 710.44
25 1000 241.37 310.90 240.35

Department of CSE, IIITDM Kancheepuram, May 2024 18


CHAPTER 4. RESULTS AND ANALYSIS CS20B1025

Table 4.4: F Values for Non-Uniform Instances values ∈ [1,1000]

k n F-value for HGGA F-value for PLS F-Value for Hybrid


5 10 78.76 81.06 77.00
5 50 68.83 71.31 65.51
5 100 93.53 95.45 90.45
5 500 75.19 80.51 71.57
5 1000 130.31 140.44 128.59
10 50 170.73 195.38 135.94
10 100 186.40 190.32 184.68
10 500 348.329 360.74 288.22
10 1000 349.64 342.29 346.71
25 50 333.03 412.92 360.44
25 100 529.93 533.39 522.49
25 500 711.817 770.57 706.75
25 1000 734.37 410.90 725.75

Department of CSE, IIITDM Kancheepuram, May 2024 19


CHAPTER 5

Conclusions and Extensions

5.1 Conclusion

The attached report describes the development of a software programme that efficiently
distributes objects with different values or heights by using a hybrid approach with
Perturbation-based Local Search (PLS), Hybrid Grouping Genetic Algorithm (HGGA),
and other techniques. The main goal is to divide these things into subsets with the goal
of distributing the total of values inside each subset equitably. We have seen through
careful investigation that HGGA and PLS have optimisation skills that are further im-
proved when combined into a hybrid model. Though the results are encouraging, further
research is necessary due to the heuristics’ inherent complexity.

As a result, I will be investigating methods for better using these heuristics to in-
crease the effectiveness of the solutions. Through exploring the nuances of these meth-
ods, I want to find ways to improve the process of finding solutions and eventually pro-
duce better and faster results. This section lays the groundwork for future developments
in solution optimisation by enabling the existing algorithms to reach their maximum po-
tential. It’s important to remember that although though the hybrid strategy typically
performs better than separate techniques, it can not always produce the best result. The
F value obtained using the PLS approach is sometimes even competitive. By means
of strategic use of heuristics and repeated refinement, I am committed to pushing the
limits of solution quality and efficiency of the solution in different item distribution

5.2 Future Scope

I’m now looking on methods to improve the hybrid approach so that it yields better
results, especially when there are more objects involved. To achieve more effective
CHAPTER 5. CONCLUSIONS AND EXTENSIONS CS20B1025

and efficient solution creation, this entails improving the hybridization process to better
handle instances with different item values.

Furthermore, although this research is ongoing, I’m currently investigating how to


incorporate reinforcement learning (RL)[6] into the programme to perhaps increase its
efficiency. I’ve noticed that, depending on variables like the quantity of piles and total
values, the best and fastest solutions frequently appear when heuristics are used in a
particular order. Our goal is to use learning experiences and rewards to produce consis-
tent results by integrating this heuristic selection technique into an RL framework. This
method solves issues with when to choose a heuristic, which could otherwise result in
less-than-ideal answers or a longer time for convergence.

Moreover, I hope to improve the program’s performance by looking into memetic


algorithms like Ant Colony Optimisation (ACO)[7]. Through the iterative construc-
tion of solutions through pheromone deposits, ACO allows the algorithm to gradually
converge towards optimal solutions. On the other hand, memetic algorithms iteratively
improve solutions by combining local search methods with evolutionary algorithms.
These strategies have the potential to greatly increase the program’s effectiveness. This
means using evolutionary principles to improve solutions and drawing on the collective
intelligence of an ant colony. By incorporating cutting-edge optimisation techniques,
this project aims to improve the program’s performance and produce higher-caliber and
more effective results.

Department of CSE, IIITDM Kancheepuram, May 2024 21


REFERENCES
[1] D. R. Jorues and M. A. BeItrarno, “Solving partitioning problems with genetic
algorithms,” in Proceedings of the 4th ICGA, 1991, pp. 442–449.

[2] A. Singh and A. K. Gupta, “Two new heuristics for the equal piles problem.” in
IICAI, 2005, pp. 3408–3423.

[3] E. Falkenauer, “Applying genetic algorithms to real-world problems,” in Evolution-


ary algorithms. Springer, 1999, pp. 65–88.

[4] W. A. Greene, “Genetic algorithms for partitioning sets,” International Journal on


Artificial Intelligence Tools, vol. 10, no. 01n02, pp. 225–241, 2001.

[5] O. Sabuncu and M. C. Simsek, “Solving assembly line workload smoothing prob-
lem via answer set programming.” in ICLP Workshops, 2020.

[6] B. Hilprecht, C. Binnig, and U. Röhm, “Towards learning a partitioning advisor


with deep reinforcement learning,” in Proceedings of the Second International
Workshop on Exploiting Artificial Intelligence Techniques for Data Management,
2019, pp. 1–4.

[7] R. Mishra and A. Jaiswal, “Ant colony optimization: A solution of load balancing
in cloud,” International Journal of Web & Semantic Technology, vol. 3, no. 2, p. 33,
2012.

22
Weekly Review Report

Insert the image of the Weekly review report

23
Plagiarism Report

Insert the 1st page of the plagiarism report (containing the similarity index). Make sure
that it is duly signed by you as well as your supervisor.

24

You might also like