genetic-algorithm-path-planning-master
所属分类:matlab编程
开发工具:Python
文件大小:1272KB
下载次数:4
上传日期:2019-12-08 20:38:14
上 传 者:
小溪xxx
说明: 路径规划解决机器人避开障碍物 用于遗传算法初学者练习
(It is used for beginners to practice genetic algorithm and solve the problem of robot avoiding obstacles with genetic algorithm)
文件列表:
__init__.py (0, 2019-05-31)
config (0, 2019-05-31)
config\Config.py (2287, 2019-05-31)
config\__init__.py (0, 2019-05-31)
docs (0, 2019-05-31)
docs\gifs (0, 2019-05-31)
docs\gifs\GA_path_planning.gif (364798, 2019-05-31)
docs\gifs\GA_path_planning_2.gif (102245, 2019-05-31)
docs\images (0, 2019-05-31)
docs\images\1.png (29171, 2019-05-31)
docs\images\2.png (29293, 2019-05-31)
docs\images\3.png (29305, 2019-05-31)
docs\images\4.png (29315, 2019-05-31)
docs\images\5.png (29313, 2019-05-31)
docs\images\demo_gif_images (0, 2019-05-31)
docs\images\demo_gif_images\1.png (31597, 2019-05-31)
docs\images\demo_gif_images\10.png (31185, 2019-05-31)
docs\images\demo_gif_images\11.png (32029, 2019-05-31)
docs\images\demo_gif_images\12.png (32194, 2019-05-31)
docs\images\demo_gif_images\13.png (32211, 2019-05-31)
docs\images\demo_gif_images\14.png (32122, 2019-05-31)
docs\images\demo_gif_images\15.png (32171, 2019-05-31)
docs\images\demo_gif_images\16.png (29526, 2019-05-31)
docs\images\demo_gif_images\17.png (29358, 2019-05-31)
docs\images\demo_gif_images\18.png (29538, 2019-05-31)
docs\images\demo_gif_images\19.png (29518, 2019-05-31)
docs\images\demo_gif_images\2.png (31711, 2019-05-31)
docs\images\demo_gif_images\20.png (29605, 2019-05-31)
docs\images\demo_gif_images\21.png (29431, 2019-05-31)
docs\images\demo_gif_images\22.png (29574, 2019-05-31)
docs\images\demo_gif_images\23.png (29605, 2019-05-31)
docs\images\demo_gif_images\24.png (29514, 2019-05-31)
docs\images\demo_gif_images\25.png (29562, 2019-05-31)
docs\images\demo_gif_images\3.png (29420, 2019-05-31)
docs\images\demo_gif_images\4.png (29433, 2019-05-31)
docs\images\demo_gif_images\5.png (29433, 2019-05-31)
docs\images\demo_gif_images\6.png (31092, 2019-05-31)
... ...
# Python implementation of Genetic Algorithm in Path Planning
![GA_path_planning](https://user-images.githubusercontent.com/37571161/58662732-51820100-8344-11e9-97fb-a66e6e1cc877.gif)
## Running instruction:
- Run the main.py file from directory.
- User can defined path points, links b/w path points, population size, mutation rate
in the Config.py file
## Requirements
- python
- numpy
## Features
- user can define fixed links b/w nodes
- user can initialize population of chromosomes which are initialized randomly
but program insures that two consective nodes should be linked to each other.
- user can calculate chromosome fitness based on total distance of chromosomes
and connectivity of nodes.
- user can find best fitness indices
- user can rank the initial population of chromosomes using roulets wheels
selection method
- user can do crossover on the population
- user can do mutation on the population
## Fixed issues:
- bug fixed in create population function
- bug related to chromosome population fitness best indices removed
- Bug in generate mating pool function of ranking file fixed
- Bug removed in function check fitness based on connection in fitness file
## Example for usage:
#### You can initialize population in main function like:
- chr_population = population()
#### You can calculate fitness & find best fitness indices in main function like:
- chr_pop_fitness, chr_best_fitness_index = fitness(chr_pop=chr_population)
#### You can obtain ranked population in main function like:
- chr_ranked_population = ranking(chr_pop_fitness=chr_pop_fitness, pop=chr_population)
#### You can do crossover & mutation in main function like:
- chr_crossover_mutated_population = dna(chr_pop_fitness=chr_pop_fitness,
ranked_population=chr_ranked_population, chr_best_fitness_index=chr_best_fitness_index,
last_pop=chr_population)
## Objective
- Use Genetic Algorithm for finding a best path for mobile robot in a 2D environment.
- To move from starting point to the endpoint while avoiding collisions with
obstacles and minimizing total distance travelled.
## Flow Chart of Genetic Algorithm
![flow_chart_GA](https://user-images.githubusercontent.com/37571161/58673241-f829ca00-8363-11e9-8***3-9f508ce0f94c.png)
近期下载者:
相关文件:
收藏者: