Presentation is loading. Please wait.

Presentation is loading. Please wait.

Using a GA to Create Prey Tactics Presented by Tony Morelli on 11/29/04.

Similar presentations


Presentation on theme: "Using a GA to Create Prey Tactics Presented by Tony Morelli on 11/29/04."— Presentation transcript:

1 Using a GA to Create Prey Tactics Presented by Tony Morelli on 11/29/04

2 Abstract  Evolve a predator/prey system  Inputs are the distances/angles between each predator/prey and other obstacles  Outputs are the bearing and speed to avoid confrontations while maintaining a task.  Focus on a prey whose mission is to follow the shoreline.

3 Introduction  Use a Genetic Algorithm to evolve a prey tactic when being attacked.  This example uses animals placed inside the SWARM architecture.  Objective for the prey is to identify a predator and avoid contact with it.  Prey behaviors/actions will be evolved against a hand coded predator.

4 Introduction  Evolving predator/prey is useful because it can demonstrate what happens in nature as well as create new military tactics.  GA is useful because we have a set of behaviors and a set of triggers for those behaviors. Hand coding this is difficult. A GA should find the best set of behaviors and triggers.

5 Background  Bauson & Ziemke  Evolved View Angle, View Range  Speed was used as a constraint  Prey prefers a camera with wide angle and short range, while a predator prefers small angle and long range  Predators dominated prey

6 Results Summary  Evolved prey outperformed hand coded prey when placed against a hand coded predator.  Evolved predator outperformed hand coded predator when placed against hand coded prey  Evolved predator outperformed evolved prey

7 Introduction  Methodology  Results and Analysis  Conclusions/Future Work

8 Methodology  Prey needs to know it is being attacked and then react to the situation  Prey’s primary goal is to follow the shoreline clock-wise  Must avoid predators and land Avoid Land Avoid Predators Follow Shoreline

9 Methodology  Genetic Algorithm was used to evolve prey tactics  GA by Ryan Leigh  1 Point Crossover  Elitist Selection  Crossover: 0.7  Mutation: 0.1  Population: 20  Generations: 20

10 Methodology  Parameters  Distance from predator  Far, Near, Close, TooClose  50-944 pixels  Speed  Slow, Normal, Fast, Superfast  0.025-0.3  Turning Rate  π/16 – π / 2 radians  Vision Range  π/16 – π / 2 radians

11 Methodology  51 Bit String  Bits 0-7 – Far  Bits 8-15 – Near  Bits 16-23 – Close  Bits 24-30 – Too Close  Bits 31-33 – Turning Rate  Bits 34-36 – Vision Range  Bits 37-43 – Fast Speed  Bits 44-50 – Normal Speed

12 Methodology  Parameter values were evolved  When each parameter was used was not evolved  If enemy is too close change speed to Super Fast  The values for super fast and too close were evolved, not the logic surrounding them

13 Methodology  Once an attack is identified, the prey will try to avoid contact.  When anything gets within certain ranges, or a crash is projected within a certain range, the prey will react to it

14 Fitness Evaluation  Success is measured by time  Until the prey thinks he is being attacked, fitness increments by 1 every update  If the prey is wondering around and never encounters a predator, his evasive skills are not tested, so this allows to keep that prey alive in the gene pool  Once an attack is detected fitness is incremented by 5 every update  We really want to measure the prey’s evasive ability. This weight allows for that.

15 Methodology  The simulation was run for 5 minutes  This was at an accelerated rate  5 minutes would take a few seconds  If at any point the predator/prey collide, or either one hits land, the simulation ends  Fitness was calculated and the GA performed its job.

16 Methodology  First the default predator and the default prey went head to head to calculate a fitness.  Next the prey was evolved against the default predator. The top prey then went head to head against the default predator  The predator was evolved against the default prey. The top predator then went head to head against the default prey  Finally the evolved predator and the evolved prey were matched up and the fitness of the prey was evaluated.

17 Results  Default Predator vs Default Prey SeedFitness 0.1337130189 0.871274867 0.710789023 0.83567161  Average: 90310

18 Results

19 Results  Evolved Prey vs Default Predator SeedFitness 0.1337173523 0.8712303250 0.1707116531 0.835205971  Average: 199819  221% Increase

20 Results  Evolved Predator vs Default Prey SeedFitness 0.133722693 0.871250037 0.170741991 0.83559181  Average: 43476  48% Decrease

21 Results  Evolved Predator vs Evolved Prey SeedFitness 0.133726873 0.871234326 0.170719303 0.83530181  Average: 27671  70% Decrease

22 Results  Evolved Predator vs Evolved - Evolved Prey SeedFitness 0.1337172865 0.8712152757 0.1707200454 0.835249813  Average: 193972  214% Increase

23 Analysis  As expected, evolved prey was highly successful when compared to the default predator  Evolved predator was much better than evolved prey  Evolved prey developed specialized parameters that were successful against 1 type of predator  Once paired against a different predator, the learned tactics no longer applied  No general knowledge

24 Conclusions  The GA did work against a known predator  My evolved prey did not develop any general knowledge

25 Future Work  Need to evolve prey against the evolved predator and see if the prey can survive.  Need to add in logic for random turning when there is no limit on turning  Need to add in logic for handling multiple predators.  Should plan a route instead of just reacting and running away.


Download ppt "Using a GA to Create Prey Tactics Presented by Tony Morelli on 11/29/04."

Similar presentations


Ads by Google