Post
Topic
Board Project Development
Re: Artificial Neural Network & Genetic Algorithm Library For Deja Vu
by
bitfreak!
on 19/02/2014, 05:42:57 UTC
Also (I know your using built in libraries but you might know) how are you calculating normalized fitness?
I am not using any libraries other than the libraries I have created myself. The fitness of each net is calculated as a percentage of profit or loss with respect to the starting balance. If the net starts with a balance of $1000 and it makes a profit of $10 during the virtual trading test then it gets a score of 1.01 but if it makes a loss of $10 then it gets a score of 0.99. If it were to double its starting balance then it would obviously get a score of 2. A set number of nets with the highest scores are placed into the elite group for breeding (although the parent pairings and offspring mutations are random). To make the process faster I also included a mechanism which allows nets to "die" if they aren't performing well enough. For example if the net seems to be making a consistent loss or if it isn't placing enough trades then the testing process will be cut short and that net will incur a large score penalty to make sure it isn't included in the elite group. Doing that helps speed up the training process by a large degree and it also mimics natural evolution where the subjects who are bad at surviving die quickly.