SlideShare ist ein Scribd-Unternehmen logo
1 von 9
Particle Swarm Optimization
to solve navigation and traveling salesman
problems in the Pacman world.
By David Rigan
Introduction
Inspired by the flocking and schooling patterns of birds and fish, Particle Swarm
Optimization (PSO) was invented by Russell Eberhart and James Kennedy in
1995. Originally, these two started out developing computer software simulations
of birds flocking around food sources, then later realized how well their algorithms
worked on optimization problems.
Key Value
The algorithm keeps track of three global variables:
● Target value or condition
● Global best (gBest) value indicating which particle's data is currently closest
to the Target
● Stopping value indicating when the algorithm should stop if the Target isn't
found
Each particle consists of:
● Data representing a possible solution
● A Velocity value indicating how much the Data can be changed
● A personal best (pBest) value indicating the closest the particle's Data has
ever come to the Target
Figure 1. A few common population topologies
(neighborhoods). (A) Single-sighted, where
individuals only compare themselves to the next
best. (B) Ring topology, where each individual
compares only to those to the left and right. (C)
Fully connected topology, where everyone is
compared together. (D) Isolated, where
individuals only compare to those within
specified groups.
Population Topologies
Figure 1.
Flow Diagram
Figure 2. Flow diagram illustrating the
particle swarm optimization algorithm.
Figure 2
Pseudocode
For each particle
{
Initialize particle
}
Do until maximum iterations or minimum error criteria
{
For each particle
{
Calculate Data fitness value
If the fitness value is better than pBest
{
Set pBest = current fitness value
}
If pBest is better than gBest
{
Set gBest = pBest
}
}
For each particle
{
Calculate particle Velocity
Use gBest and Velocity to update particle Data
}
Track Layout
● Initial States
● Target
DEMO
Particle Swarm Optimization
to solve navigation and traveling salesman
problems in the Pacman world.
Source
http://mnemstudio.org/particle-swarm-introduction.htm
http://inst.eecs.berkeley.edu/~cs188/fa18/projects.html

Weitere ähnliche Inhalte

Was ist angesagt?

Particle swarm optimization
Particle swarm optimizationParticle swarm optimization
Particle swarm optimization
Hanya Mohammed
 
Particle Swarm Optimization
Particle Swarm OptimizationParticle Swarm Optimization
Particle Swarm Optimization
Stelios Petrakis
 
PSO and Its application in Engineering
PSO and Its application in EngineeringPSO and Its application in Engineering
PSO and Its application in Engineering
Prince Jain
 

Was ist angesagt? (20)

Particle swarm optimization
Particle swarm optimizationParticle swarm optimization
Particle swarm optimization
 
Particle Swarm Optimization
Particle Swarm OptimizationParticle Swarm Optimization
Particle Swarm Optimization
 
Machine Learning Tools and Particle Swarm Optimization for Content-Based Sear...
Machine Learning Tools and Particle Swarm Optimization for Content-Based Sear...Machine Learning Tools and Particle Swarm Optimization for Content-Based Sear...
Machine Learning Tools and Particle Swarm Optimization for Content-Based Sear...
 
Particle swarm optimization
Particle swarm optimizationParticle swarm optimization
Particle swarm optimization
 
Optimization and particle swarm optimization (O & PSO)
Optimization and particle swarm optimization (O & PSO) Optimization and particle swarm optimization (O & PSO)
Optimization and particle swarm optimization (O & PSO)
 
PSO
PSOPSO
PSO
 
Particle Swarm Optimization Matlab code Using 50, 5000 Swarms
Particle Swarm Optimization Matlab code Using 50, 5000 SwarmsParticle Swarm Optimization Matlab code Using 50, 5000 Swarms
Particle Swarm Optimization Matlab code Using 50, 5000 Swarms
 
metaheuristic tabu pso
metaheuristic tabu psometaheuristic tabu pso
metaheuristic tabu pso
 
Pso kota baru parahyangan 2017
Pso kota baru parahyangan 2017Pso kota baru parahyangan 2017
Pso kota baru parahyangan 2017
 
Bic pso
Bic psoBic pso
Bic pso
 
Particle Swarm Optimization
Particle Swarm OptimizationParticle Swarm Optimization
Particle Swarm Optimization
 
Practical Swarm Optimization (PSO)
Practical Swarm Optimization (PSO)Practical Swarm Optimization (PSO)
Practical Swarm Optimization (PSO)
 
Artificial fish swarm optimization
Artificial fish swarm optimizationArtificial fish swarm optimization
Artificial fish swarm optimization
 
Particle Swarm optimization
Particle Swarm optimizationParticle Swarm optimization
Particle Swarm optimization
 
Cuckoo Search & Firefly Algorithms
Cuckoo Search & Firefly AlgorithmsCuckoo Search & Firefly Algorithms
Cuckoo Search & Firefly Algorithms
 
Pso introduction
Pso introductionPso introduction
Pso introduction
 
PSO and Its application in Engineering
PSO and Its application in EngineeringPSO and Its application in Engineering
PSO and Its application in Engineering
 
Particle swarm optimization
Particle swarm optimizationParticle swarm optimization
Particle swarm optimization
 
Ant Colony Optimization: The Algorithm and Its Applications
Ant Colony Optimization: The Algorithm and Its ApplicationsAnt Colony Optimization: The Algorithm and Its Applications
Ant Colony Optimization: The Algorithm and Its Applications
 
TEXT FEUTURE SELECTION USING PARTICLE SWARM OPTIMIZATION (PSO)
TEXT FEUTURE SELECTION  USING PARTICLE SWARM OPTIMIZATION (PSO)TEXT FEUTURE SELECTION  USING PARTICLE SWARM OPTIMIZATION (PSO)
TEXT FEUTURE SELECTION USING PARTICLE SWARM OPTIMIZATION (PSO)
 

Ähnlich wie Particle swarm optimization on pacman game problem solving

Swarm intelligence pso and aco
Swarm intelligence pso and acoSwarm intelligence pso and aco
Swarm intelligence pso and aco
satish561
 
Particle swarm optimization (PSO) ppt presentation
Particle swarm optimization (PSO) ppt presentationParticle swarm optimization (PSO) ppt presentation
Particle swarm optimization (PSO) ppt presentation
LatestShorts
 

Ähnlich wie Particle swarm optimization on pacman game problem solving (20)

Genetic Algorithm for the Traveling Salesman Problem using Sequential Constru...
Genetic Algorithm for the Traveling Salesman Problem using Sequential Constru...Genetic Algorithm for the Traveling Salesman Problem using Sequential Constru...
Genetic Algorithm for the Traveling Salesman Problem using Sequential Constru...
 
Swarm intelligence pso and aco
Swarm intelligence pso and acoSwarm intelligence pso and aco
Swarm intelligence pso and aco
 
AN IMPROVED MULTIMODAL PSO METHOD BASED ON ELECTROSTATIC INTERACTION USING NN...
AN IMPROVED MULTIMODAL PSO METHOD BASED ON ELECTROSTATIC INTERACTION USING NN...AN IMPROVED MULTIMODAL PSO METHOD BASED ON ELECTROSTATIC INTERACTION USING NN...
AN IMPROVED MULTIMODAL PSO METHOD BASED ON ELECTROSTATIC INTERACTION USING NN...
 
An Updated Survey on Niching Methods and Their Applications
An Updated Survey on Niching Methods and Their ApplicationsAn Updated Survey on Niching Methods and Their Applications
An Updated Survey on Niching Methods and Their Applications
 
Particle Swarm Optimization.pptx
Particle Swarm Optimization.pptxParticle Swarm Optimization.pptx
Particle Swarm Optimization.pptx
 
MARKOV CHAIN AND ADAPTIVE PARAMETER SELECTION ON PARTICLE SWARM OPTIMIZER
MARKOV CHAIN AND ADAPTIVE PARAMETER SELECTION ON PARTICLE SWARM OPTIMIZERMARKOV CHAIN AND ADAPTIVE PARAMETER SELECTION ON PARTICLE SWARM OPTIMIZER
MARKOV CHAIN AND ADAPTIVE PARAMETER SELECTION ON PARTICLE SWARM OPTIMIZER
 
Chicken Swarm as a Multi Step Algorithm for Global Optimization
Chicken Swarm as a Multi Step Algorithm for Global OptimizationChicken Swarm as a Multi Step Algorithm for Global Optimization
Chicken Swarm as a Multi Step Algorithm for Global Optimization
 
Comparison Between PSO and HPSO In Image Steganography
Comparison Between PSO and HPSO In Image SteganographyComparison Between PSO and HPSO In Image Steganography
Comparison Between PSO and HPSO In Image Steganography
 
Markov Chain and Adaptive Parameter Selection on Particle Swarm Optimizer
Markov Chain and Adaptive Parameter Selection on Particle Swarm Optimizer  Markov Chain and Adaptive Parameter Selection on Particle Swarm Optimizer
Markov Chain and Adaptive Parameter Selection on Particle Swarm Optimizer
 
11-Optimization algorithm with swarm.pptx
11-Optimization algorithm with swarm.pptx11-Optimization algorithm with swarm.pptx
11-Optimization algorithm with swarm.pptx
 
Enhanced abc algo for tsp
Enhanced abc algo for tspEnhanced abc algo for tsp
Enhanced abc algo for tsp
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
5 multi robot path planning algorithms
5 multi robot path planning algorithms5 multi robot path planning algorithms
5 multi robot path planning algorithms
 
5 multi robot path planning algorithms
5 multi robot path planning algorithms5 multi robot path planning algorithms
5 multi robot path planning algorithms
 
SI and PSO --Machine Learning
SI and PSO --Machine Learning SI and PSO --Machine Learning
SI and PSO --Machine Learning
 
Particle swarm optimization (PSO) ppt presentation
Particle swarm optimization (PSO) ppt presentationParticle swarm optimization (PSO) ppt presentation
Particle swarm optimization (PSO) ppt presentation
 
A comparison of particle swarm optimization and the genetic algorithm by Rani...
A comparison of particle swarm optimization and the genetic algorithm by Rani...A comparison of particle swarm optimization and the genetic algorithm by Rani...
A comparison of particle swarm optimization and the genetic algorithm by Rani...
 
Metaheuristics for software testing
Metaheuristics for software testingMetaheuristics for software testing
Metaheuristics for software testing
 
Two-Stage Eagle Strategy with Differential Evolution
Two-Stage Eagle Strategy with Differential EvolutionTwo-Stage Eagle Strategy with Differential Evolution
Two-Stage Eagle Strategy with Differential Evolution
 
A Comparison of Particle Swarm Optimization and Differential Evolution
A Comparison of Particle Swarm Optimization and Differential EvolutionA Comparison of Particle Swarm Optimization and Differential Evolution
A Comparison of Particle Swarm Optimization and Differential Evolution
 

Mehr von David Rigan (8)

media penyimpanan eksternal
media penyimpanan eksternalmedia penyimpanan eksternal
media penyimpanan eksternal
 
Green Computing
Green ComputingGreen Computing
Green Computing
 
Sistem operasi untuk perangkat mobile
Sistem operasi untuk perangkat mobileSistem operasi untuk perangkat mobile
Sistem operasi untuk perangkat mobile
 
Permodelan Topik Menggunakan Latent Dirichlet Allocation
Permodelan Topik Menggunakan Latent Dirichlet AllocationPermodelan Topik Menggunakan Latent Dirichlet Allocation
Permodelan Topik Menggunakan Latent Dirichlet Allocation
 
Sistem berkas dan keamana data
Sistem berkas dan keamana dataSistem berkas dan keamana data
Sistem berkas dan keamana data
 
Perbedaan arsitektur komputer dan organisasi komputer
Perbedaan arsitektur komputer dan organisasi komputerPerbedaan arsitektur komputer dan organisasi komputer
Perbedaan arsitektur komputer dan organisasi komputer
 
Pengembangan perangkat lunak model spiral
Pengembangan perangkat lunak model spiralPengembangan perangkat lunak model spiral
Pengembangan perangkat lunak model spiral
 
Diksi
DiksiDiksi
Diksi
 

Kürzlich hochgeladen

Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
chumtiyababu
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
Kamal Acharya
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
jaanualu31
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 

Kürzlich hochgeladen (20)

Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptx
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 

Particle swarm optimization on pacman game problem solving

  • 1. Particle Swarm Optimization to solve navigation and traveling salesman problems in the Pacman world. By David Rigan
  • 2. Introduction Inspired by the flocking and schooling patterns of birds and fish, Particle Swarm Optimization (PSO) was invented by Russell Eberhart and James Kennedy in 1995. Originally, these two started out developing computer software simulations of birds flocking around food sources, then later realized how well their algorithms worked on optimization problems.
  • 3. Key Value The algorithm keeps track of three global variables: ● Target value or condition ● Global best (gBest) value indicating which particle's data is currently closest to the Target ● Stopping value indicating when the algorithm should stop if the Target isn't found Each particle consists of: ● Data representing a possible solution ● A Velocity value indicating how much the Data can be changed ● A personal best (pBest) value indicating the closest the particle's Data has ever come to the Target
  • 4. Figure 1. A few common population topologies (neighborhoods). (A) Single-sighted, where individuals only compare themselves to the next best. (B) Ring topology, where each individual compares only to those to the left and right. (C) Fully connected topology, where everyone is compared together. (D) Isolated, where individuals only compare to those within specified groups. Population Topologies Figure 1.
  • 5. Flow Diagram Figure 2. Flow diagram illustrating the particle swarm optimization algorithm. Figure 2
  • 6. Pseudocode For each particle { Initialize particle } Do until maximum iterations or minimum error criteria { For each particle { Calculate Data fitness value If the fitness value is better than pBest { Set pBest = current fitness value } If pBest is better than gBest { Set gBest = pBest } } For each particle { Calculate particle Velocity Use gBest and Velocity to update particle Data }
  • 7. Track Layout ● Initial States ● Target
  • 8. DEMO Particle Swarm Optimization to solve navigation and traveling salesman problems in the Pacman world.

Hinweis der Redaktion

  1. Terinspirasi oleh pola burung dan ikan, Particle Swarm Optimization (PSO) diciptakan oleh Russell Eberhart dan James Kennedy pada tahun 1995. Awalnya, keduanya mulai mengembangkan simulasi perangkat lunak komputer dari burung yang berbondong-bondong di sekitar sumber makanan, kemudian menyadari bagaimana baik algoritma mereka bekerja pada masalah optimasi.
  2. Algoritma memiliki tiga variabel global: Target Value. Nilai atau Kondisi yang ingin dicapai (Target) Nilai Global Best (gBest). Nilai yang menunjukkan data partikel mana yang saat ini paling dekat dengan Target. Stoping Value. Nilai yang menunjukkan kapan algoritma akan berhenti jika Target tidak ditemukan. Setiap partikel terdiri dari: Data yang mewakili solusi yang memungkinkan Data partikel bisa menjadi apa saja, Pada contoh burung yang berkelompok, datanya adalah koordinat X, Y, Z dari masing-masing burung. Koordinat individu dari masing-masing burung akan mencoba untuk bergerak lebih dekat ke koordinat burung yang lebih dekat dengan koordinat makanan (gBest). Jika data adalah pola atau urutan, maka setiap bagian data akan dimanipulasi hingga polanya sesuai dengan pola target. Nilai Kecepatan yang menunjukkan berapa banyak Data dapat diubah Nilai kecepatan dihitung berdasarkan seberapa jauh data individu dari target mendapatkannya. Semakin jauh, semakin besar nilai kecepatannya. Dalam contoh burung, individu-individu yang paling jauh dari makanan akan berusaha untuk mengikuti yang lain dengan terbang lebih cepat ke arah burung terbaik. Jika data adalah pola atau urutan, kecepatan akan menggambarkan betapa berbedanya pola dari target, dan dengan demikian, berapa banyak yang perlu diubah untuk mencocokkan target. Personal Best (pBest). Nilai Pribadi terbaik yang menunjukkan Data Partikel terdekat yang pernah sampai ke Target Setiap partikel pBest hanya menunjukkan data terdekat yang pernah dituju ke target sejak algoritma dimulai. Nilai gBest hanya berubah ketika nilai pBest partikel mana pun lebih mendekati target daripada gBest. Melalui setiap iterasi dari algoritma, gBest secara bertahap bergerak lebih dekat dan lebih dekat ke target sampai salah satu partikel mencapai target.
  3. Beberapa topologi populasi umum (lingkungan) Single-sighted, di mana individu hanya membandingkan dirinya dengan yang terbaik berikutnya Topologi ring, di mana setiap individu hanya membandingkannya dengan yang kiri dan kanan. Topologi yang terhubung sepenuhnya, di mana setiap orang dibandingkan bersama. Terisolasi, di mana individu hanya dibandingkan dengan mereka dalam kelompok tertentu. Definisi lingkungan dan bagaimana mereka digunakan memiliki efek yang berbeda pada perilaku algoritma.
  4. menginisialisasi partikel menghitung nilai kebugaran untuk setiap partikel Apakah nilai kebugaran saat ini lebih baik daripada pbest Jika Ya > menetapkan kebugaran saat ini sebagai pbest baru Jika Tidak > simpan pbest sebelumnya tetapkan nilai partikel pbest terbaik ke gbest menghitung kecepatan untuk setiap partikel gunakan nilai kecepatan masing-masing partikel untuk memperbarui nilai datanya Apakah target atau jangka waktu maksimum tercapai ? Jika Ya > Berakhir Jika Tidak kembali ke point 2 Diagram alur yang menggambarkan algoritma optimisasi partikel swarm.