SlideShare a Scribd company logo
1 of 24
Download to read offline
Evolving Neural Network Agents in
           the NERO Video Game
                      Stelios Petrakis
The Paper

“Evolving Neural Network Agents in the NERO Video Game”

Kenneth O. Stanley / Bobby D. Bryant / Risto Miikkulainen

Winner of ‘Computational Intelligence and Games’ 2005 Best Paper Award




This paper introduces the real-time NeuroEvolution of Augmenting
Topologies (rt-NEAT) method for evolving increasingly complex artificial
neural networks in real time, as a game is being played.
Problem


In most video games, scripts cannot learn or adapt to control the
agents: Opponents will always make the same moves and the
game quickly becomes boring.

The rtNEAT method allows agents to change and improve during
the game.

In order to demonstrate this concept in the NeuroEvolving
RoboticOperatives (NERO) game, the player trains a team of
robots for combat.
Introduction for rtNEAT


rtNEAT is a real-time enhancement of the NeuroEvolution of
Augmenting Topologies method (NEAT; Stanley and Miikkulainen
2002b, 2004).

NEAT evolves increasingly complex neural networks.

Real-time NEAT (rtNEAT) is able to complexify neural networks
as the game is played, making it possible for agents to evolve
increasingly sophisticated behaviors in real time.
Properties that games A.I. should have

   Large state / action space

   Diverse behaviors

   Consistent individual behaviors

   Fast Adaptation

   Memory of past states
Learning techniques for NPCs in games
 Supervised techniques                         Not good. Agents need
  Backpropagation                              to learn online as game
                                               is played
  Decision Tree Learning
 Traditional Reinforcement Learning (RL)
  Q-Learning                                   Not suitable due to the
  Sarsa(λ)                                     constraints explained in
                                               previous slide
 Neuroevolution (NE)
  Artificial Evolution neural networks using a genetic algorithm

                                        Suitable! rtNEAT
                                        technique can be
                                        used
NEAT

NEAT combines the usual search for the appropriate network
weights with complexification of the network structure, allowing
the behavior of evolved neural networks to become increasingly
sophisticated over generations.

It outperforms other neuroevolution (NE) methods

NEAT was originally designed to run offline and is based on 3 key
ideas
NEAT key ideas
•    Evolving network structure requires a flexible genetic encoding
       Connection Genes
          In-node
          Out-node
          Connection Weight
          Connection gene expression
          Innovation number
•    Individuals compete primarily within their own niches instead of with the
    population at large
       Protection of Topological innovations (explicit fitness sharing
       reproduction mechanism)

•    NEAT begins with a uniform population of simple networks with no
    hidden nodes
rtNEAT
In NEAT the entire population is replaced at each generation.
In rtNEAT only a single individual is replaced every few game
ticks.

One of the worst individuals is removed and replaced with a child
of parents chosen from among the best.

Challenge : Protection of innovation through speciation and
complexification.

Let fi be the fitness of individual i. Fitness sharing adjusts it to fi/|S|,
where |S| is the number of individuals in the species. In other
words, fitness is reduced proportionally to the size of the species.
rtNEAT Main Loop
 Remove the agent with the worst adjusted fitness from the
 population assuming one has been alive sufficiently long so that
 it has been properly evaluated.

 Re-estimate   F   for all species

 Choose a parent species to create the new offspring

 Adjust compatibility threshold Ct dynamically and reassign all
 agents to species

 Place the new agent in the world
Removing the worst agent

The agent with the worst adjusted fitness should be
removed, since adjusted fitness takes into account
species size, so that new smaller species are not
removed as soon as they appear.

rtNEAT only removes agents who have played for more
than the minimum amount of time m (not young ones).
Re-estimating F


By removing the worst agent from a specie, species size
has been decreased, therefore F has changed.


We need to recalculate F for the next step; choosing
parent species.
Choosing the parent species
                                                    The average fitness
NEAT                                                of species k
              Fk                           Population size
         nk =      P
              Ftot
                               The sum of all the
Number of offspring            average species’
assigned to species k          fitnesses

rtNEAT                         The probability of choosing a given parent
                               species is proportional to its average fitness.
                        Fk
            Pr( S k ) =        The expected number of offspring for each
                        Ftot   species is proportional to nk, preserving the
                               speciation dynamics of original NEAT
Dynamic Compatibility Thresholding
Ct determines whether an individual is compatible with a species’
representative.

When there are too many species, Ct is increased to make species more
inclusive.

When there are too few, Ct is decreased to be stricter.

An advantage of this kind of dynamic compatibility thresholding is that it keeps
the number of species relatively stable.

After changing Ct in rtNEAT, the entire population must be reassigned to the
existing species based on the new Ct.

In original NEAT, if a network does not belong in any species a new species is
created with that network as its representative
Replacing the old agent with the new one

 Two options:

  Neural Network can be removed from the body
  and replaced without any changed in the body of
  the agent

  Agent dead, so body + neural network are replaced.
Determining Ticks Between Replacements
If agents are replaced too frequently, they do not live long enough to reach the minimum
time m to be evaluated.
On the other hand, if agents are replaced too infrequently, evolution slows down to a
pace that the player no longer enjoys.

A law of eligibility can be formulated that specifies what fraction of the population can
be expected to be ineligible once evolution reaches a steady state

                                                    The ticks
                   m                                between
                I=                                  replacements

                   Pn                                 The minimum time alive




             The fraction of the population that is too
             young and therefore cannot be replaced
Let rtNEAT select n


              m       m
          I =    ⇒ n=
              Pn      PI

It is best to let the user choose I because in general it
is most critical to performance; if too much of the
population is ineligible at one time, the mating pool is
not sufficiently large.
NERO
www.nerogame.org

In NERO, the learning agents are simulated robots, and the goal is to train a team of
robots for military combat.

The robots begin the game with no skills and only the ability to learn.
Sensors
Robots have several types of sensors.
DEMO / Trailer
References



 http://www.nerogame.org/
 Evolving Neural Network Agents in the NERO Video
 Game (Stanley, Bryant, Miikkulainen 2005)
Thanks!

More Related Content

Similar to Evolving Neural Network Agents In The Nero Video

EEG Based Classification of Emotions with CNN and RNN
EEG Based Classification of Emotions with CNN and RNNEEG Based Classification of Emotions with CNN and RNN
EEG Based Classification of Emotions with CNN and RNNijtsrd
 
Evolving Neural Networks Through Augmenting Topologies
Evolving Neural Networks Through Augmenting TopologiesEvolving Neural Networks Through Augmenting Topologies
Evolving Neural Networks Through Augmenting TopologiesDaniele Loiacono
 
Artificial Intelligence Applications in Petroleum Engineering - Part I
Artificial Intelligence Applications in Petroleum Engineering - Part IArtificial Intelligence Applications in Petroleum Engineering - Part I
Artificial Intelligence Applications in Petroleum Engineering - Part IRamez Abdalla, M.Sc
 
Deep learning lecture - part 1 (basics, CNN)
Deep learning lecture - part 1 (basics, CNN)Deep learning lecture - part 1 (basics, CNN)
Deep learning lecture - part 1 (basics, CNN)SungminYou
 
Neuralnetwork 101222074552-phpapp02
Neuralnetwork 101222074552-phpapp02Neuralnetwork 101222074552-phpapp02
Neuralnetwork 101222074552-phpapp02Deepu Gupta
 
Lifelong Learning for Dynamically Expandable Networks
Lifelong Learning for Dynamically Expandable NetworksLifelong Learning for Dynamically Expandable Networks
Lifelong Learning for Dynamically Expandable NetworksNAVER Engineering
 
Neural Networks Ver1
Neural  Networks  Ver1Neural  Networks  Ver1
Neural Networks Ver1ncct
 
Learning Sparse Neural Networksvia Sensitivity-Driven Regularization
Learning Sparse Neural Networksvia Sensitivity-Driven RegularizationLearning Sparse Neural Networksvia Sensitivity-Driven Regularization
Learning Sparse Neural Networksvia Sensitivity-Driven RegularizationEnzo Tartaglione
 
AI Class Topic 6: Easy Way to Learn Deep Learning AI Technologies
AI Class Topic 6: Easy Way to Learn Deep Learning AI TechnologiesAI Class Topic 6: Easy Way to Learn Deep Learning AI Technologies
AI Class Topic 6: Easy Way to Learn Deep Learning AI TechnologiesValue Amplify Consulting
 
Reasoning Over Knowledge Base
Reasoning Over Knowledge BaseReasoning Over Knowledge Base
Reasoning Over Knowledge BaseShubham Agarwal
 
Reasoning Over Knowledge Base
Reasoning Over Knowledge BaseReasoning Over Knowledge Base
Reasoning Over Knowledge BaseShubham Agarwal
 
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...Edureka!
 
ISMB2014読み会 イントロ + Deep learning of the tissue-regulated splicing code
ISMB2014読み会 イントロ + Deep learning of the tissue-regulated splicing codeISMB2014読み会 イントロ + Deep learning of the tissue-regulated splicing code
ISMB2014読み会 イントロ + Deep learning of the tissue-regulated splicing codeKengo Sato
 
IRJET - Audio Emotion Analysis
IRJET - Audio Emotion AnalysisIRJET - Audio Emotion Analysis
IRJET - Audio Emotion AnalysisIRJET Journal
 
Artificial Neural Network in Medical Diagnosis
Artificial Neural Network in Medical DiagnosisArtificial Neural Network in Medical Diagnosis
Artificial Neural Network in Medical DiagnosisAdityendra Kumar Singh
 
Quantum neural network
Quantum neural networkQuantum neural network
Quantum neural networksurat murthy
 
Evolving Comprehensible Neural Network Trees
Evolving Comprehensible Neural Network TreesEvolving Comprehensible Neural Network Trees
Evolving Comprehensible Neural Network TreesAmr Kamel Deklel
 
Neural network final NWU 4.3 Graphics Course
Neural network final NWU 4.3 Graphics CourseNeural network final NWU 4.3 Graphics Course
Neural network final NWU 4.3 Graphics CourseMohaiminur Rahman
 

Similar to Evolving Neural Network Agents In The Nero Video (20)

EEG Based Classification of Emotions with CNN and RNN
EEG Based Classification of Emotions with CNN and RNNEEG Based Classification of Emotions with CNN and RNN
EEG Based Classification of Emotions with CNN and RNN
 
Evolving Neural Networks Through Augmenting Topologies
Evolving Neural Networks Through Augmenting TopologiesEvolving Neural Networks Through Augmenting Topologies
Evolving Neural Networks Through Augmenting Topologies
 
Artificial Intelligence Applications in Petroleum Engineering - Part I
Artificial Intelligence Applications in Petroleum Engineering - Part IArtificial Intelligence Applications in Petroleum Engineering - Part I
Artificial Intelligence Applications in Petroleum Engineering - Part I
 
Deep learning lecture - part 1 (basics, CNN)
Deep learning lecture - part 1 (basics, CNN)Deep learning lecture - part 1 (basics, CNN)
Deep learning lecture - part 1 (basics, CNN)
 
Ai in games
Ai in gamesAi in games
Ai in games
 
Neuralnetwork 101222074552-phpapp02
Neuralnetwork 101222074552-phpapp02Neuralnetwork 101222074552-phpapp02
Neuralnetwork 101222074552-phpapp02
 
Lifelong Learning for Dynamically Expandable Networks
Lifelong Learning for Dynamically Expandable NetworksLifelong Learning for Dynamically Expandable Networks
Lifelong Learning for Dynamically Expandable Networks
 
Neural Networks Ver1
Neural  Networks  Ver1Neural  Networks  Ver1
Neural Networks Ver1
 
Learning Sparse Neural Networksvia Sensitivity-Driven Regularization
Learning Sparse Neural Networksvia Sensitivity-Driven RegularizationLearning Sparse Neural Networksvia Sensitivity-Driven Regularization
Learning Sparse Neural Networksvia Sensitivity-Driven Regularization
 
AI Class Topic 6: Easy Way to Learn Deep Learning AI Technologies
AI Class Topic 6: Easy Way to Learn Deep Learning AI TechnologiesAI Class Topic 6: Easy Way to Learn Deep Learning AI Technologies
AI Class Topic 6: Easy Way to Learn Deep Learning AI Technologies
 
Reasoning Over Knowledge Base
Reasoning Over Knowledge BaseReasoning Over Knowledge Base
Reasoning Over Knowledge Base
 
Reasoning Over Knowledge Base
Reasoning Over Knowledge BaseReasoning Over Knowledge Base
Reasoning Over Knowledge Base
 
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
 
ISMB2014読み会 イントロ + Deep learning of the tissue-regulated splicing code
ISMB2014読み会 イントロ + Deep learning of the tissue-regulated splicing codeISMB2014読み会 イントロ + Deep learning of the tissue-regulated splicing code
ISMB2014読み会 イントロ + Deep learning of the tissue-regulated splicing code
 
IRJET - Audio Emotion Analysis
IRJET - Audio Emotion AnalysisIRJET - Audio Emotion Analysis
IRJET - Audio Emotion Analysis
 
Artificial Neural Network in Medical Diagnosis
Artificial Neural Network in Medical DiagnosisArtificial Neural Network in Medical Diagnosis
Artificial Neural Network in Medical Diagnosis
 
Quantum neural network
Quantum neural networkQuantum neural network
Quantum neural network
 
Artificial Neural Network
Artificial Neural NetworkArtificial Neural Network
Artificial Neural Network
 
Evolving Comprehensible Neural Network Trees
Evolving Comprehensible Neural Network TreesEvolving Comprehensible Neural Network Trees
Evolving Comprehensible Neural Network Trees
 
Neural network final NWU 4.3 Graphics Course
Neural network final NWU 4.3 Graphics CourseNeural network final NWU 4.3 Graphics Course
Neural network final NWU 4.3 Graphics Course
 

Recently uploaded

Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 

Recently uploaded (20)

Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 

Evolving Neural Network Agents In The Nero Video

  • 1. Evolving Neural Network Agents in the NERO Video Game Stelios Petrakis
  • 2. The Paper “Evolving Neural Network Agents in the NERO Video Game” Kenneth O. Stanley / Bobby D. Bryant / Risto Miikkulainen Winner of ‘Computational Intelligence and Games’ 2005 Best Paper Award This paper introduces the real-time NeuroEvolution of Augmenting Topologies (rt-NEAT) method for evolving increasingly complex artificial neural networks in real time, as a game is being played.
  • 3. Problem In most video games, scripts cannot learn or adapt to control the agents: Opponents will always make the same moves and the game quickly becomes boring. The rtNEAT method allows agents to change and improve during the game. In order to demonstrate this concept in the NeuroEvolving RoboticOperatives (NERO) game, the player trains a team of robots for combat.
  • 4. Introduction for rtNEAT rtNEAT is a real-time enhancement of the NeuroEvolution of Augmenting Topologies method (NEAT; Stanley and Miikkulainen 2002b, 2004). NEAT evolves increasingly complex neural networks. Real-time NEAT (rtNEAT) is able to complexify neural networks as the game is played, making it possible for agents to evolve increasingly sophisticated behaviors in real time.
  • 5. Properties that games A.I. should have Large state / action space Diverse behaviors Consistent individual behaviors Fast Adaptation Memory of past states
  • 6. Learning techniques for NPCs in games Supervised techniques Not good. Agents need Backpropagation to learn online as game is played Decision Tree Learning Traditional Reinforcement Learning (RL) Q-Learning Not suitable due to the Sarsa(λ) constraints explained in previous slide Neuroevolution (NE) Artificial Evolution neural networks using a genetic algorithm Suitable! rtNEAT technique can be used
  • 7. NEAT NEAT combines the usual search for the appropriate network weights with complexification of the network structure, allowing the behavior of evolved neural networks to become increasingly sophisticated over generations. It outperforms other neuroevolution (NE) methods NEAT was originally designed to run offline and is based on 3 key ideas
  • 8. NEAT key ideas • Evolving network structure requires a flexible genetic encoding Connection Genes In-node Out-node Connection Weight Connection gene expression Innovation number • Individuals compete primarily within their own niches instead of with the population at large Protection of Topological innovations (explicit fitness sharing reproduction mechanism) • NEAT begins with a uniform population of simple networks with no hidden nodes
  • 9. rtNEAT In NEAT the entire population is replaced at each generation. In rtNEAT only a single individual is replaced every few game ticks. One of the worst individuals is removed and replaced with a child of parents chosen from among the best. Challenge : Protection of innovation through speciation and complexification. Let fi be the fitness of individual i. Fitness sharing adjusts it to fi/|S|, where |S| is the number of individuals in the species. In other words, fitness is reduced proportionally to the size of the species.
  • 10. rtNEAT Main Loop Remove the agent with the worst adjusted fitness from the population assuming one has been alive sufficiently long so that it has been properly evaluated. Re-estimate F for all species Choose a parent species to create the new offspring Adjust compatibility threshold Ct dynamically and reassign all agents to species Place the new agent in the world
  • 11. Removing the worst agent The agent with the worst adjusted fitness should be removed, since adjusted fitness takes into account species size, so that new smaller species are not removed as soon as they appear. rtNEAT only removes agents who have played for more than the minimum amount of time m (not young ones).
  • 12. Re-estimating F By removing the worst agent from a specie, species size has been decreased, therefore F has changed. We need to recalculate F for the next step; choosing parent species.
  • 13. Choosing the parent species The average fitness NEAT of species k Fk Population size nk = P Ftot The sum of all the Number of offspring average species’ assigned to species k fitnesses rtNEAT The probability of choosing a given parent species is proportional to its average fitness. Fk Pr( S k ) = The expected number of offspring for each Ftot species is proportional to nk, preserving the speciation dynamics of original NEAT
  • 14. Dynamic Compatibility Thresholding Ct determines whether an individual is compatible with a species’ representative. When there are too many species, Ct is increased to make species more inclusive. When there are too few, Ct is decreased to be stricter. An advantage of this kind of dynamic compatibility thresholding is that it keeps the number of species relatively stable. After changing Ct in rtNEAT, the entire population must be reassigned to the existing species based on the new Ct. In original NEAT, if a network does not belong in any species a new species is created with that network as its representative
  • 15. Replacing the old agent with the new one Two options: Neural Network can be removed from the body and replaced without any changed in the body of the agent Agent dead, so body + neural network are replaced.
  • 16.
  • 17. Determining Ticks Between Replacements If agents are replaced too frequently, they do not live long enough to reach the minimum time m to be evaluated. On the other hand, if agents are replaced too infrequently, evolution slows down to a pace that the player no longer enjoys. A law of eligibility can be formulated that specifies what fraction of the population can be expected to be ineligible once evolution reaches a steady state The ticks m between I= replacements Pn The minimum time alive The fraction of the population that is too young and therefore cannot be replaced
  • 18. Let rtNEAT select n m m I = ⇒ n= Pn PI It is best to let the user choose I because in general it is most critical to performance; if too much of the population is ineligible at one time, the mating pool is not sufficiently large.
  • 19. NERO
  • 20. www.nerogame.org In NERO, the learning agents are simulated robots, and the goal is to train a team of robots for military combat. The robots begin the game with no skills and only the ability to learn.
  • 21. Sensors Robots have several types of sensors.
  • 23. References http://www.nerogame.org/ Evolving Neural Network Agents in the NERO Video Game (Stanley, Bryant, Miikkulainen 2005)