
March 3rd, 2004, 08:11 PM
|
 |
Major General
|
|
Join Date: Oct 2003
Location: Crystal Tokyo
Posts: 2,453
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Better, Simpler Programming Contest
Quote:
Originally posted by atul:
What about... another program altogether?
...
One more thing for the value-evaluation: number of different troops already existent. The target composition could be from a priori decided values, and a big boost would be given to troop type that is underrepresented.
Like in previous example, longbows would have large value boost for being a minority (and a slight penalty for doing so badly). This would keep the overal troop composition more consistent (no so big fluctuations as single troop types get both killed and have their prod values reduced at the same time) but allow a long-term change.
|
That would work quite well. In that case, every unit could have a base value, specified by Users, or by some algorithm that generates a number from the unit stats ("basevalue"). Then, each turn, the AI could generate a multiplier for a unit type based on its rareness and success rate ("valuemult"). These generate the current value for each unit that turn ("currentvalue"). Then, the algorithm would run as originally specified, optimizing for the highest "currentvalue" - and the problem of multiple turns would go away, since the "currentvalue" of an underrepresented unit would keep increasing each turn until the algorithm started building them.
That way, this problem is kept simple and solvable, and the "combined arms / mutiple turn optimization" is pushed into another, much simpler algorithm: just generate a value multiplier based on success rate and rareness.
I'd like to point out that if your first bunch of longbows were wiped out by fliers, that might indicate your enemy was routinely using fliers on "attack archers", and thus halting archer production would be wise=)
|