Cross entropy and the fitness function I'm training some neural networks using NEAT C++, and would like to use the cross-entropy error function:
$$E = -t\ln(y) -(1-t)\ln(1-y)$$
to train a network for a two-class classification problem.
NEAT C++ is a C++ library that allows one to use a special kind of neuro evolution (namely that of augmenting topologies) to train the networks. Yet to be able to use it, one needs to define a fitness function (and not an error function, such as the one above). 
Question:
How can I construct a fitness function from the cross-entropy error function?
Everything below this line is wrong I guess because $E\in [0,\infty]$, and thus it's impossible to define a maximum. How should I do it then?

I was thinking about this: calculate the maximum error $E_{\text{max}}$ somehow and define the fitness, given a certain network output $y$, as:
$$f(y)=E_{\text{max}} - E(y)$$
This way the fitness will be $0$ when $E(y)=E_{\text{max}}$ and it should reach a maximum if $E(y)=0$. 
Is this the right method? If so how do I calculate the maximum error $E_{\text{max}}$?
note: NEAT does not allow the use of negative fitness functions, so using $f(y)=-E(y)$ would not work. Also I would like to refrain from using arbitrary stuff such as $f(y)=10000000 - E(y)$.
 A: First of all: NEAT is an algorithm that is usually used for reinforcement learning. I guess it won't work very well in your case. You should rather find a good network architecture by cross-validation and train your network with stochastic gradient descent, conjugate gradient, ...
Since it is just a fitness function it usually does not matter if it has an upper bound. You almost certainly will not find a perfect solution in every classification problem. So you should think about another stop criterion than "find the maximal fitness".
However, you could take -E. Its upper bound is 0.
A: You'll also see the function you've described referred to as the log loss in the machine learning literature. It is a loss function, you do not want to maximize it, you want to minimize it. 
If you have a minimization problem, you can simply negate it to obtain a maximization problem. 
Since you need non-negative values just add the minimum value of your negated objective. You can find this minimum because your data is finite, i.e. the worst you can do is get everything wrong.
edit: An alternative, still assuming your problem is binary prediction, would be to simply maximize 
$$\sum\mathbf{1}\{y = t\},$$
since you generally don't need a differentiable function for genetic algorithms anyway.
