I donβt think you will need a genetic algorithm or something funny; good old fashion recursion and dynamic programming should be enough. I initially think that you should be able to achieve your goal by doing your first breadth first search. Starting from your starting point, you visit all neighbors with an account more than this path value - all cells start at infinity, and the costs of black cells will be infinite, and these are paths that you can turn off). Once you reach the goal, if you reach the goal, you can go back to find the way. This is greedy, but if your paths behave like this, then everything should be fine.
For paths with a grayer and swirling and rotary configuration, it might be a good idea to convert the bitmap to a graph, with the edge weight being the grayscale values ββ(or differences in grayscale values, depending on what this data actually means) . Therefore, you should be able to use any algorithm for the shortest paths based on this interpretation.
nlucaroni
source share