[ODE] Virtual Creature Sample Code here

Rob Leclerc leclerc at cpsc.ucalgary.ca
Tue Apr 15 20:49:33 2003


Looks like this might stall if you let it run long enough. The problem
is in the compare template used for sorting. You can change it to the
following code, this should work. (Fingers crossed). Will update the zip
tomorrow.

//CODE BEGIN
template <class T>
	class NNCompare {
    public:
	bool operator()(T p, T q) {
		return (double)p.fitness > (double)q.fitness;
	}
};
//CODE END


Best,
RDL