January 27, 2021, 07:48:10 AM

Author Topic: Brute Force Pathfinding  (Read 1150 times)

Offline Pakz

  • Full Member
  • ***
  • Posts: 195
    • My homepage
Brute Force Pathfinding
« on: January 29, 2018, 06:43:59 AM »
I coded this a while ago. I though that I would try to create a pathfinding method using Brute Force. The actual pathfinding is done by only adding up one possibility at a time. There are 4 directions in a path. Number 1 to 4(up,right,down,left) By starting with one character and building up from there every possible path is created.

There is a function that tests the current path if it reached the destination. Shortest Path found.

I noticed that I could only use a small map, and even then it can take a while(or time out) if the path is complex.

For really short paths this can be used I think.

Emscripten demo:

Monkey2 code here :


SimplePortal 2.3.6 © 2008-2014, SimplePortal