Brute Force Pathfinding

About Monkey 2 Forums Monkey 2 Code Library Brute Force Pathfinding

This topic contains 1 reply, has 2 voices, and was last updated by  cocon 1 year, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #12706


    I wanted to try and see if this would work.

    What I did here is create a pathfinding routine that works by creating every possible path starting at size 0 growing until the path is found. Because it grows, the first valid path will be the shortest. It seems to work on my laptop on small maps. 8×8 size.

    I find it difficult to explain how it works but maybe the code will speak for itself.


    Here a emscripten page showing the code.



    Good one, it can be combined it with my multi loops here, this will allow the CPU to rest a few times. 🙂

    Multiple loops at the same time (fast and slow)

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.