[galib] how to add my custom arguments to Initializer and Objective?
Jose daVeiga
jfernand at ucla.edu
Sat Feb 26 15:13:37 EST 2005
Hi,
I am using GA lib for a plugin I am writing for MAYA (www.maya.com).
To initialize my genome I need to populate it with the xyz values of
surfaces. I also need to call MAYA through its specific API to be able
to evaluate the surfaces I would be updating with the values from the
genes. I am able to do all the MAYA stuff I need but now I need to get
the genetic stuff to work. In sum, I would need my initializer and
objective functions to look like this:
float Objective1( GAGenome& g, MDagPath objectPath, MObject component)
void DeterministicInitializer (GAGenome&, MDagPath objectPath, MObject
component)
I could possibly set objectPath and component as global variables, and
then access them inside my Objective1 and DeterministicInitializer...but
thats just wrong! ;)
I've been reading the documentation and I can't seem to figure out a way
to do this. Any suggestions would be welcome.
Thanks,
Jose
PS- I am also looking to write a progress bar, when the duration is the
number of generations, and I am wondering how can I get the current
generation number after evolve() is called/running?
José daVeiga
PhD Candidate: Architecture, Technology
Department of Architecture and Urban Design
University of California, Los Angeles
------------------------------------------------------------
+1 (310) 415-9893 (C) jfernand at ucla.edu
www.bol.ucla.edu/~jfernand
------------------------------------------------------------
Master of Arts in Architecture (UCLA '03 - Technology)
Master of Architecture (UCLA '98 - MarchII)
Professional Degree in Architecture (Lusiada University '96)
LEEDtm Accredited Professional ('04)
Licensed Architect in Portugal since '97
------------------------------------------------------------
"If builders built buildings the way programmers write programs,
then the first woodpecker that came along would destroy
civilization." - Pablo Picasso
More information about the galib
mailing list