UnitOptimizer
Changed the module as we discussed. Now Lists are optimized against each
other. A start value is chosen to make the iteration more scientific and
then in every iteration a new optimum is chosen for both lists.
I currently have a problem with async/future that prevents me from
nicely parallelizing everything, seems to be connected with templates.
UnitOptimizer: Solved the gcc future issue with references. Now pointers are used as there seems to be no other possibility. The module is now fully parallelized
UnitOptimizer
- Parallelization is done, unfortunately I had to use pointers as the
gcc does not allow call by reference when passing objects to functions
executed in a new thread by calling async. Doesn't look pretty but blame
the gcc guys for that
- TODO: Testing. I will cover that the next days in the LSS CIP, as I
don't have enough computing power available at home.
MicroSimulation
Issue: Segfault in PotentialField class in PlayerState.h, occuring
during the initialization process. Temporarily outcommented the problem
causing part
UnitOptimizer
Issues: Parallelization currently not working. There seems to be an
undetected Race condition. The fitness variables are set to wrong values
UnitOptimizer
As the algorithm does not seem to converge against a certain optimum and
instead seems to be almost only dependent from the last iteration, it is
more reasonable to also include the old fitness value into the
calculation of the new. So the optimum after n iteration is the optimum
of all iteration instead of only the current. Consequently a weight was
introduced that determines how highly the old fitness value is weighted
in the calculation of the new in each iteration.
UnitOptimizer: Slight parameter adaption
UnitOptimizer
Attempt with weights was not succesfull. Switched back to old version,
but now the n best enemy genes are used for the evaluation where n is
the number of available threads. Also the best ten percent are kept
after each iteration
Switched to clang++ due to gcc -O2 bug
UnitOptimizer
- Code simplifications and optimizations
- Now runs again compiled with gcc higher optimization levels
part2.pro
Switched back to gcc as it is working again with higher optimization
levels
UnitOptimizer: More performance improvements, the number of threads started was significantly reduced, instead they are reused as often as possible