STIN3084-A192-GENETIC-ALGORITHM / ASSIGNMENTS

0 stars 0 forks source link

ASSIGNMENT 1 #1

Open azmanyasin opened 4 years ago

azmanyasin commented 4 years ago

INSTRUCTION

In this assignment, you will implement a simple genetic algorithm in Java. Consider the problem of finding the shortest route through several cities, such that each city is visited only once and in the end return to the starting city (the Travelling Salesman problem). In the TSP optimization problem, there are n cities, assuming that the number of each city is an integer 1,2,3,...,n. and such a chromosome is made up of a n segment. For example, there are 10 cities in the TSP problem, then {1, 3, 4, 2, 6, 9, 10, 8, 5, 7} is a legitimate chromosome and a possible optimal solution.

To make implementing your GA easier, you should break up your program into the following smaller pieces, rather than trying to implement everything as one large program. Write and test each of the functions listed below separately, and then use them as building blocks in your main GA program. Feel free to write any other helper functions that you like. • randomGenome(length) returns a random genome (Integer) of a given length. • makePopulation(size, length) returns a new randomly created population of the specified size, represented as a list of genomes of the specified length. • fitness(genome) returns the fitness value of a genome. • evaluateFitness(population) returns a pair of values: the average fitness of the population as a whole and the fitness of the best individual in the population.

SUBMISSION

  1. Java code.
  2. Screenshot of the output.
  3. Due date 26 July 2020
wilsonkhor1997 commented 4 years ago

https://github.com/wilsonkhor1997/GA-Assignment/issues/1#issue-660661748

aizathakimi97 commented 4 years ago

ASSIGNMENT 1.zip

abraranuar commented 4 years ago

GENETIC ALGORITHM STIN3084 A192 259231 ass1.zip

Jayyijianyi commented 4 years ago

One.zip