galib inside other classes

H. Brown Cribbs cribbs at darwin.dfrc.nasa.gov
Tue Nov 4 12:55:51 EST 1997


Hello GALib Users:
   I was wondering what experience others had had using the Galib
   classes within other classes.  I have a fairly complex system
   I'm designing for some reinforcement learning research and I've
   reached programming dilemma.
   
   My problem entails evolving a individuals who have to be encoded
   and decoded at each generation to go out into its environment for
   evaluation.  This means that I have written a "fake" evaluator
   that simple reads data from each individual's evalData member.
   
   This worked fine in my test problem that did not entail encapsulating
   the ga within another class.  As soon as I did that I ran into the 
   problems with setting my evaluator and initializer due to the pointer
   to a function now being required to be a pointer into a member function.
   
   The only work around I've thought of is to include a pointer to the 
   objects I need to encode/evaluate and define unique default initializer
   and evaluators.  I would do such a thing in a derived class of the 
   GALib's GASteadyStateGA.  Does this seem a "clean" solution? Or is it
   a kludge?
   
   Your opinions would be greatly appreciated as to what my options are,
   and thanks in advance,
 
   Brown Cribbs
 
+---------------------------------------------------------+
|  H. Brown Cribbs, III     |  Currently Visiting:        |
|  Graduate Research Asst   |    NASA Dryden Flight       |
|  Aerospace Engr. & Mech   |         Research Center     |
|  The Univ. of Alabama     |    Edwards AFB, CA          |
+--------------------------------+------------------------+
| mailto://cribbs@xrd.dfrc.nasa.gov            | MOTTO:   |
|   http://www.eng.ua.edu/~hcribbs             |  Semper  |
|  phone:(805) 942 - 8360 (home)               |   Audax  |
|        (805) 258 - 3417 (NASA)               |          |
+----------------------------------------------+----------+





More information about the galib mailing list