schrum2 / MM-NEATv2

MM-NEAT version 2.0 is no longer supported. Please get MM-NEAT 3+ from https://github.com/schrum2/MM-NEAT
Other
11 stars 5 forks source link

Substrate combining unit information with SimpleSqrtEvaluationFunction3 scores #449

Closed schrum2 closed 7 years ago

schrum2 commented 7 years ago

The SimpleSqrtEvaluationFunction3 class gives each unit a score according to the following computation: Each unit u of the player is worth the following: (u.getResources() RESOURCE_IN_WORKER) + (UNIT_BONUS_MULTIPLIER u.getCost()*Math.sqrt( u.getHitPoints()/u.getMaxHitPoints() ))

We should steal some of these ideas. Make another type of substrate, AllOfPlayerTypeSqrt3Substrate, that extends AllOfPlayerTypeSubstrate and replaces scoreForUnit with a score similar to what is above.

schrum2 commented 7 years ago

I've actually already created AllOfPlayerTypeSqrt3Substrate, but you need to incorporate it with the NN complex eval function.

Also, I noticed that AllOfPlayerTypeSubstrate currently does not know what player it is calculating information for. This needs to be fixed in AllOfPlayerTypeSubstrate, and therefore also in AllOfPlayerTypeSqrt3Substrate (which should simply need an extra parameter in the constructor)

schrum2 commented 7 years ago

All that is left is to incorporate AllOfPlayerTypeSqrt3Substrate into the constructor of the complex eval function