MATLAB: Best fitness vs mean fitness, initial range

  1. Based on the example of Rastrigin’s function. At the plot function, if I chose ‘best fitness’, on the same graph ‘mean fitness’ will also be plotted. I understand well about ‘best fitness’ whereby it plots the best function value in each generation versus iteration number. It will reach value zero after some times.

    I don’t understand about ‘mean fitness’in the graph plotted. What do those ‘mean fitness’ values mean? How does the ‘mean fitness’ graph help to understand Rastrigin’s function?

  2. What are the meaning of the term initial population, initial score and initial range? I wish to have a better understanding of these terms.

  3. The default value for initial range is [0,1]. Does it mean that 0 is the lower bound (lb) and 1 is the upper bound (ub)? Do these values interfere with the lb and ub values I set in the constraints?

  4. I try to better understand about lb and ub. If my lb is 0 and ub is 5, does it mean that my final point values will be within 0 and 5?

  5. If I know the lb and ub for my problem is between 0 and 5, do I just set the initial range as [0,5] at all times and may I assume that this is the best option for initial range, and I need not try it with any other values?

2

Genetic algorithms are population-based optimization methods. So you have a population of candidate solutions at any given time.

Suppose you’re trying to solve the one-max problem — a simple problem where the goal is to maximize the number of 1-bits in a binary string of length L. With L=8, each candidate solution looks like

00101101  ==> fitness = 4

To solve this problem with a GA, you need to create a population of such individuals at random. Let N=10 be the population size. Then you might get the following 10 individuals (fitness values in [] after the bit strings).

11011001 [5]
00100110 [3]
11010110 [5]
10010110 [4]
01010110 [4]
11101100 [5]
01001001 [3]
11001011 [4]
10111101 [6]
01001010 [3]

This is the “initial population”. The GA will then select parents from this population, breed them, possibly mutate the offspring, and produce a new population from the offspring, possibly including the existing parent population as well. This process is then iterated until you decide to stop the algorithm, typically at a maximum number of evaluations of the objective function or after a maximum number of generations.

Best fitness refers to either the fitness of the best individual in your current population or the fitness of the best individual you have found so far during the run. Depending on the type of GA you’re using, these may or may not be the same thing. For instance, the best fitness for my example population above is 6. However, if the best offspring I create has a fitness of 5 and I don’t allow parents to survive more than one generation, then the best fitness in the next generation could be either 5 or 6, depending on how we interpret “best fitness”. I’m not that familiar with MATLAB’s GA toolbox to be able to tell you which one it means, but my guess is that it’s the overall best fitness the algorithm has encountered during the run at any time.

The average fitness is simply the mean of the fitness values across the entire population. Each generation, the population changes and you get a new average population fitness. Generally, you’re most interested in the best fitness, as you only need one solution and you’ll obviously choose the best one. Average fitness however is useful in showing you what the algorithm is doing. If the average fitness reaches the best fitness, it likely means that the population contains N copies of the best individual and further search is likely to be wasted effort without a restart or large-scale mutation operation.

So what you generally see is that best fitness tends to get better over time, quickly at first, and then slowing down as the algorithm finds better and better solutions that are harder and harder to improve upon. The average fitness will always be no better than the best fitness, and it is typically quite a bit worse, with the difference between the two usually decreasing over time until the algorithm completely converges (the population is uniform, containing N copies of the same “best” individual).

The [ub,lb] questions I can’t really answer. I’m guessing it’s the allowed range on your input variables, but you’ll need to consult the documentation for the toolbox you’re using to know for sure what those parameters mean.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật