A * algorithm, genetic algorithm

Source: Internet
Author: User

A * algorithm

Path scoring

The key to choosing which squares to go through in the path is the following equation:

F = G + H

Over here:
* G = move from Start a, along the resulting path, to the specified squares on the grid. The upper and lower left and right walk is 10, diagonal diagonal Walk is 14, the basic proportion.
* H = estimated movement cost of moving from that square on the grid to end B. h values can be estimated in different ways. The method we use here is called the Manhattan method, which calculates the sum of the horizontal and vertical squares from the current grid to the destination, ignoring the diagonal direction.

F is printed in the upper left corner, G in the lower left corner, and h in the lower right corner.

Genetic algorithm Reference 1 example reference 3

Basic process of genetic algorithm:

He has three basic operations: Select operation (also called copy operation), crossover operation crossover, mutation operation mutation

A * algorithm, genetic algorithm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.