MCPcopy Create free account
hub / github.com/ResearchCodesHub/QuantumGeneticAlgorithms / Q_GA

Function Q_GA

QGA.py:250–267  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

248# #
249########################################################
250def Q_GA():
251 generation=0;
252 print("============== GENERATION: ",generation," =========================== ")
253 print()
254 Init_population()
255 Show_population()
256 Measure(0.5)
257 Fitness_evaluation(generation)
258 while (generation<generation_max-1):
259 print("The best of generation [",generation,"] ", best_chrom[generation])
260 print()
261 print("============== GENERATION: ",generation+1," =========================== ")
262 print()
263 rotation()
264 mutation(0.01,0.001)
265 generation=generation+1
266 Measure(0.5)
267 Fitness_evaluation(generation)
268
269print ("""QUANTUM GENETIC ALGORITHM""")
270input("Press Enter to continue...")

Callers 1

QGA.pyFile · 0.85

Calls 6

Init_populationFunction · 0.70
Show_populationFunction · 0.70
MeasureFunction · 0.70
Fitness_evaluationFunction · 0.70
rotationFunction · 0.70
mutationFunction · 0.70

Tested by

no test coverage detected