📄 readme
字号:
1050 format(1x,' # Binary Code',8x,'Param1 Param2 Param3',
+ ' Param4 Fitness')
1075 format(i3,1x,16i1,4(1x,f6.2),1x,f6.2)
1275 format(/' Average Values:',10x,4(1x,f6.2),1x,f6.2/)
1500 format(i5,3x,16i2)
The CPU time related lines of code reference a Macintosh specific
time function (SECNDS). To avoid compiler errors with other computers,
I have commented out these lines of code. If you wish to have cputime
output,then you will have to change the time functions for the specific
computer you are running on. Most modern Unix machines will recognize
the 'etime' function; these lines are added to the code along with the
variable 'tarray' and 'cpu...again, to avoid compiler errors with
different computers, these lines of code are also commented out.
A common problem arises with the Microsoft PowerStation compiler, i.e.,
PowerStation does not recognize the abbreviation NML for NAMELIST. If
you are using PowerStation, you will likely have to substitute NAMELIST
for all instances of NML.
Please feel free to contact me with questions, comments, or errors
(hopefully none of latter).
Enjoy!
David L. Carroll
University of Illinois
140 Mechanical Engineering Bldg.
1206 W. Green Street
Urbana, IL 61801
e-mail: carroll@uiuc.edu
Phone: 217-333-4741
fax: 217-244-6534
###############################################################################
micro-GA Tip:
My favorite GA technique is still the micro-GA. At this point, I recommend
using the micro-GA with uniform crossover and a small population size. The
following inputs gave me excellent performance:
microga = 1
npopsiz = 5
maxgen = 100
iunifrm = 1
I have also gotten good performance with the single-point crossover (iunifrm=0),
micro-GA.
If you decide to use the micro-GA, you will not need to worry about the
population sizing or creep mutation tips below.
See the Krishnakumar reference below for more information about micro-GA's.
###############################################################################
Population Sizing Tip:
I've had a lot of people ask me about population sizing, especially
people who are attempting large problems where 100 individuals is probably
not enough. The true authority on the subject is David Goldberg, but here is
a crude population scaling law in my paper (based on Goldberg & Deb, 1992):
npopsiz = order[(l/k)(2**k)] for binary coding
where l = nchrome and k is the average size of the schema of interest
(effectively the average number of bits per parameter, i.e. approximately
equal to nchrome/nparam, rounded to the nearest integer). I find that when
I have uniform crossover and niching turned on (which I recommend doing),
that this scaling law is usually overkill, i.e. you can most likely get by
with populations at least twice as small.
Remember to make the parameter 'indmax' (in 'params.f') greater than or equal
to 'npopsiz'.
###############################################################################
Creep Mutation Probability Tip:
I generally like to have approximately the same number of creep mutations and
jump mutations per generation. Using basic probabilistic arguments, it can be
shown that you will get approximately the same number of creep and jump
mutations when
pcreep = (nchrome/nparam) * pmutate
where pmutate (the jump mutation probability) is 1/npopsiz.
###############################################################################
Suggested reading that I have found to be of use:
Goldberg, D. E., and Richardson, J., "Genetic Algorithms with
Sharing for Multimodal Function Optimization," Genetic Algorithms and their
Applications: Proceedings of the Second International Conference on Genetic
Algorithms, 1987, pp. 41-49.
Goldberg, D. E., "Genetic Algorithms in Search, Optimization and
Machine Learning," Addison-Wesley, 1989.
Goldberg, D. E., "A Note on Boltzmann Tournament Selection for
Genetic Algorithms and Population-Oriented Simulated Annealing," in:
Complex Systems, Vol. 4, Complex Systems Publications, Inc., 1990, pp.
445-460.
Goldberg, D. E., "Real-coded Genetic Algorithms, Virtual Alphabets,
and Blocking," in: Complex Systems, Vol. 5, Complex Systems Publications,
Inc., 1991, pp. 139-167.
Goldberg, D. E., and Deb, K., "A Comparitive Analysis of Selection
Schemes Used in Genetic Algorithms," in: Foundations of Genetic Algorithms,
ed. by Rawlins, G.J.E., Morgan Kaufmann Publishers, San Mateo, CA, pp.
69-93, 1991.
Goldberg, D. E., Deb, K., and Clark, J. H., "Genetic Algorithms,
Noise, and the Sizing of Populations," in: Complex Systems, Vol. 6, Complex
Systems Pub., Inc., 1992, pp. 333-362.
Krishnakumar, K., "Micro-Genetic Algorithms for Stationary and
Non-Stationary Function Optimization," SPIE: Intelligent Control and
Adaptive Systems, Vol. 1196, Philadelphia, PA, 1989.
Syswerda, G., "Uniform Crossover in Genetic Algorithms," in:
Proceedings of the Third International Conference on Genetic Algorithms,
Schaffer, J. (Ed.), Morgan Kaufmann Publishers, Los Altos, CA, pp. 2-9,
1989.
###############################################################################
If you are interested in my work (which may give some insights into how
and why I coded some aspects of my GA), I can mail copies of three papers of
mine.
G. Yang, L.E. Reinstein, S. Pai, Z. Xu, and D.L. Carroll, "A new genetic
algorithm technique in optimization of permanent 125-I prostate implants,"
Medical Physics, Vol. 25, No. 12, 1998, pp. 2308-2315.
Carroll, D. L., "Chemical Laser Modeling with Genetic Algorithms,"
AIAA J., Vol. 34, 2, 1996, pp.338-346.
(A preprint version of this paper can now be downloaded in PDF format
via my website:
<http://www.staff.uiuc.edu/~carroll/gatips.html> look for AIAA1996.pdf)
Carroll, D. L., "Genetic Algorithms and Optimizing Chemical Oxygen-Iodine
Lasers," Developments in Theoretical and Applied Mechanics, Vol. XVIII,
eds. H.B. Wilson, R.C. Batra, C.W. Bert, A.M.J. Davis, R.A. Schapery, D.S.
Stewart, and F.F. Swinson, School of Engineering, The University of Alabama,
1996, pp.411-424.
(This paper can now be downloaded in PDF format via my website:
<http://www.staff.uiuc.edu/~carroll/gatips.html> look for SECTAM18.pdf)
###############################################################################
Disclaimer: this program is not guaranteed to be free of error
(although it is believed to be free of error), therefore it should
not be relied on for solving problems where an error could result in
injury or loss. If this code is used for such solutions, it is
entirely at the user's risk and the author disclaims all liability.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -