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 10 months, 2 weeks ago.

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

    Pakz
    Participant

    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.

    https://cromdesi.home.xs4all.nl/emscripten/bruteforcepathfinding/Untitled1.html

    #12714

    cocon
    Participant

    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.