Re: [jgap-users] Fibonacci example
Brought to you by:
klausikm
From: Brad S. <bsc...@gm...> - 2009-01-04 22:26:56
|
Yes, this makes sense now. Thank you. :-) On Sun, Jan 4, 2009 at 11:24 AM, Klaus Meffert <jg...@kl...>wrote: > Brad, > > I added the following comments to the source code: > // Define return types of sub programs (see nodeSets). > // The first entry in types corresponds with the first entry in > nodeSets, > // etc. > Class[] types = { > CommandGene.VoidClass, CommandGene.VoidClass, > CommandGene.IntegerClass}; > // The following is only relevant for ADF's and not used here. > Class[][] argTypes = { {}, {}, {} > }; > // Configure desired minimum number of nodes per sub program. > // Same as with types: First entry here corresponds with first entry in > // nodeSets. > int[] minDepths = new int[] {2, 3, 1}; > // Configure desired maximum number of nodes per sub program. > // First entry here corresponds with first entry in nodeSets. > int[] maxDepths = new int[] {2, 9, 1}; > Does this help a bit? > > Please also see http://jgap.sourceforge.net/doc/genetic_programming.html > > If questions remain please come back. > > Best > > Klaus > www.klaus-meffert.com > > > ------------------------------ > *From:* Brad Schleusner [mailto:bsc...@gm...] > *Sent:* Saturday, January 03, 2009 10:32 PM > *To:* jga...@li... > *Subject:* [jgap-users] Fibonacci example > > Could someone explain these lines in the Fibonacci create() function? I > don't understand what these do. > > Found in jgap_3.3.4/examples/src/examples/gp/Fibonacci.java: public > GPGenotype create() > > Class[] types = { > CommandGene.VoidClass, CommandGene.VoidClass, > CommandGene.IntegerClass}; > Class[][] argTypes = { {}, {}, {} > }; > int[] minDepths = new int[] {2, 3, 1}; > int[] maxDepths = new int[] {2, 9, 1}; > > > -- Failure is not an option -- it comes bundled with Windows. |