Using a Genetic Algorithm to Create Prey Tactics - PowerPoint PPT Presentation

About This Presentation
Title:

Using a Genetic Algorithm to Create Prey Tactics

Description:

Use a Genetic Algorithm to evolve a prey tactic when being attacked. ... Once paired against a different predator, the learned tactics no longer applied ... – PowerPoint PPT presentation

Number of Views:55
Avg rating:3.0/5.0
Slides: 26
Provided by: cse4
Learn more at: https://www.cse.unr.edu
Category:

less

Transcript and Presenter's Notes

Title: Using a Genetic Algorithm to Create Prey Tactics


1
Using a Genetic Algorithm 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
  • Preys primary goal is to follow the shoreline
    clock-wise
  • Must avoid predators and land

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
  • p/16 p / 2 radians
  • Vision Range
  • p/16 p / 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 preys 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

Seed Fitness
0.1337 130189
0.8712 74867
0.7107 89023
0.835 67161
  • Average 90310

18
Results
19
Results
  • Evolved Prey vs Default Predator

Seed Fitness
0.1337 173523
0.8712 303250
0.1707 116531
0.835 205971
  • Average 199819
  • 221 Increase

20
Results
  • Evolved Predator vs Default Prey

Seed Fitness
0.1337 22693
0.8712 50037
0.1707 41991
0.835 59181
  • Average 43476
  • 48 Decrease

21
Results
  • Evolved Predator vs Evolved Prey

Seed Fitness
0.1337 26873
0.8712 34326
0.1707 19303
0.835 30181
  • Average 27671
  • 70 Decrease

22
Results
  • Evolved Predator vs Evolved - Evolved Prey

Seed Fitness
0.1337 172865
0.8712 152757
0.1707 200454
0.835 249813
  • 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 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.
Write a Comment
User Comments (0)
About PowerShow.com