artificial intelligence - Army Composition EA. Need help designing Selection and Mutation Operator -
i trying build (part of) ai game created.
problem description
given pool of available units, , specific composition of army of enemy (the human player), use evolutionary algorithm create composition of units available pool defeat enemy's army.
there several types of units in game, of them compete against each other in rock-paper-scissors fashion, meaning unit type defeat b, b defeat c , c defeat a. expensive unit isn't best. if enemy's army diverse, need diverse well.
unit cost rough estimate of power. 1 type unit costing 100 equal 10 type b units cost 10 each. however, slightly offset rock-paper-scissors characteristics of units.
constraints
- keep army small possible. larger armies require more upkeep resources fight.
- keep losses small possible, should never exceed spoils of fight (loot after win), @ least normal difficulties.
ea components
- initialization: create n compositions @ random pool of available units.
- fitness: technically complex, done: simulate within space of own game.
- operators: genetic operators use evolve each army composition possibly improve. far haven't had success this.
the meat of problem, believe, lies in genetic operators. have tried different approaches, seem either @ best stuck in local optima or seem random (each rerun of algorithm against same opponent seems produce wildly different results).
i have tried following operators poor no results:
- for each unit, probability p, change type b
- for each unit, probability p, replace units of type b current cost remains same.
- for each unit, probability p, remove without replacement
- for each composition, probability p, add 1 unit of random type it
so, question is, given problem description, decent mutation , combination operators? feel operators have used far focused on local environment (add 1, change 1, remove 1) , don't use potential of ea.
i try separating army in different squads, each unit type in beginning. depending of size of each squad, split several smaller ones. give option of duplicating squads , doing crossover other genomes more varied result.
if doesn't try mix squads other types, still keeping them small. suspect same mutations have in place.
i've had similar problems of mutations being high , other times being small, resulting in same (too random vs local optima) problems you've run in. adding crossover mechanisms , lowering mutation rate @ same time eliminated them me.
it's 3 week old question, did have success in mean time?
Comments
Post a Comment