Genetic Algorithms

In a genetic algorithm, a population of strings (called chromosomes or the genotype of the genome), which encode candidate solutions (called individuals, creatures, or phenotypes) to an optimization problem, evolves toward better solutions. Traditionally, solutions are represented in binary as strings of 0s and 1s, but other encodings are also possible. The evolution usually starts from a population of randomly generated individuals and happens in generations. In each generation, the fitness of every individual in the population is evaluated, multiple individuals are stochastically selected from the current population (based on their fitness), and modified (recombined and possibly randomly mutated) to form a new population. The new population is then used in the next iteration of the algorithm. Commonly, the algorithm terminates when either a maximum number of generations has been produced, or a satisfactory fitness level has been reached for the population. If the algorithm has terminated due to a maximum number of generations, a satisfactory solution may or may not have been reached.

Genetic algorithms find application in bioinformatics, phylogenetics, computational science, engineering, economics, chemistry, manufacturing, mathematics, physics and other fields.

A typical genetic algorithm requires:

1. a genetic representation of the solution domain,
2. a fitness function to evaluate the solution domain.

A standard representation of the solution is as an array of bits. Arrays of other types and structures can be used in essentially the same way. The main property that makes these genetic representations convenient is that their parts are easily aligned due to their fixed size, which facilitates simple crossover operations. Variable length representations may also be used, but crossover implementation is more complex in this case. Tree-like representations are explored in genetic programming and graph-form representations are explored in evolutionary programming.

The fitness function is defined over the genetic representation and measures the quality of the represented solution. The fitness function is always problem dependent. For instance, in the knapsack problem one wants to maximize the total value of objects that can be put in a knapsack of some fixed capacity. A representation of a solution might be an array of bits, where each bit represents a different object, and the value of the bit (0 or 1) represents whether or not the object is in the knapsack. Not every such representation is valid, as the size of objects may exceed the capacity of the knapsack. The fitness of the solution is the sum of values of all objects in the knapsack if the representation is valid, or 0 otherwise. In some problems, it is hard or even impossible to define the fitness expression; in these cases, interactive genetic algorithms are used.

Genel kategorisine gönderildi | Yorum bırakın

Hayyam…

şarap, in  vino veritas Şarap sonsuz hayat kaynağıdir, iç;
Gençlik sevincinin pınarıdır, iç;
Gamı yakar eritir ateş gibi,
Sağlık sularından şifalıdır, iç.

Can bir şaraptır, insan onun destisi;
Beden bir ney gibidir, kan o neyin sesi.
Hayyam, bilir misin nedir bu ölümü varlık:
Hayal fenerinde bir ışık pırıltısı.

Dünyada akla değer veren yok madem,
Aklı az olanın parası çok madem,
Getir şu şarabı, alın aklımızı:
Belki böyle beğenir bizi el alem!

Ömür defterinden bir fal açtım gönlümce;
Halden anlar bir dost gelip falı görünce;
Ne mutlu sana, dedi; daha ne istersin:
Ay gibi bir sevgili, yıl gibi bir gece.

Bahar geldi; başka bir şey istemem kafamda;
Hele akla hiç yer vermem bahar soframda;
Şarap, seninleyim bu mevsim, koru beni:
Söğüt ağacı, sen de ser gölgeni altıma.

Gece, gül bahçesinde ararken seni,
Gülden gelen kokun sarhoş etti beni;
Seni anlatmaya başlayınca güle
Baktım kuşlar da dinliyor hikayemi.

Düşünce göklerinin baş konağı sevgidir sevgi;
Gençlik destanının baş yaprağı sevgidir sevgi;
Ey sevginin sırlarından habersiz yaşayanlar,
Bilin ki tüm varlığın baş kaynağı sevgidir sevgi.

Bu uçsuz bucaksız dünya içinde, bil ki,
Mutlu yaşamak iki türlü insana vergi;
Biri iyinin kötünün aslını bilir,
Öteki ne dünyayı bilir, ne kendini.

Bu varlık denizi nerden gelmiş bilen yok;
Öyle büyük bir inci ki bu büyük sır delen yok;
Herkes aklına eseni söylemiş durmuş,
İşin kaynağına giden yolu bulan yok.

Seher yeli eser yırtar eteğini gülün
Güle baktıkça çırpınır yüreği bülbülün
Sen şarap içmene bak, çünkü nice gül yüzler
Kopup dallarından toprak olmadalar her gün.

Gönlümün dilediği gül yüzüne bakmak;
Elimin özlediği kadehi kavramak.
Her zerrem nasibini almalı dünyadan
Yarın güle kavuşturmadan beni toprak.

Gönül dedi: Ben neyim ki, bir damla sadece;
Ben nerde, görmediğim koca deniz nerde!
Böyle diyen gönül denize kavuşunca
Baktı kendinden başka şey yok görünürde.

Dün gece usul boylu sevgilim ve ben,
Bir kıyıda gül rengi şarap içerken;
Sedefli bir kabuk açıldı karşımızda;
Sabah müjdecisi çıkıverdi içinden.

Eşi dostu verdik birer birer toprağa;
Kiminden bir taş bile kalmadı ortada.
Sen, yorgun katır, hala bu kalleş çöldesin;
Sırtında bunca yük, yürü bakalım hala.

Dert içinde sevinci bul da yaşa;
Haksız düzende haklı ol da yaşa;
Sonu nasıl olsa yokluk dünyanın,
Varından yoğundan kurtul da yaşa.
Genel kategorisine gönderildi | Yorum bırakın