#include #include #include "binary_value.h" #include using namespace std; int main(int argc, char* argv[]) { try { typedef eoBit EoType; eoParser parser(argc, argv); eoState state; // keeps all things allocated, including eoEasyEA and eoPop! eoEvalFuncPtr eval( binary_value ); eoGenContinue term(20); eoCheckPoint checkpoint(term); eoAlgo& ga = make_ga(parser, eval, checkpoint, state); eoPop& pop = init_ga(parser, state, double()); if (parser.userNeedsHelp()) { parser.printHelp(cout); return 0; } apply(eval, pop); run_ga(ga, pop); // run the ga } catch(exception& e) { cout << e.what() << endl; } }