Here we go !
I finally managed to write the Astar algorithm of pathfinding in JB.
In this case the goal is to find the shorter path between the GREEN pawn and the horizontal line where is the RED pawn.
To build a wall : select "Mur" and click in the crossing between cells,
every clic change the direction or erase it.
"Shorter path" procedure for a game... "Quori
-
- Posts: 56
- Joined: Sat Jun 06, 2009 7:27 am
- Location: FRANCE, Montpellier
"Shorter path" procedure for a game... "Quori
- Attachments
-
- AstarPCChemin.zip
- (38.71 KiB) Downloaded 308 times
-
- Posts: 56
- Joined: Sat Jun 06, 2009 7:27 am
- Location: FRANCE, Montpellier
Here is a version for a maze bigger than 9x9 cells.
maxi 99 x 99
A new important update. on 05/23/2010
Random walls generated. Diagonal possible. Showing work.
Subroutines name translated...
Increasing compute time... 06/05/2010
maxi 99 x 99
A new important update. on 05/23/2010
Random walls generated. Diagonal possible. Showing work.
Subroutines name translated...
Increasing compute time... 06/05/2010
- Attachments
-
- Grille_25x25_optim.zip
- (1.19 MiB) Downloaded 283 times
Last edited by cassiope01 on Sat Jun 05, 2010 11:36 am, edited 10 times in total.
It's very nice of yoour program to support save/load.
Here is a save that finds wrong path (where should not be one).
Here is a save that finds wrong path (where should not be one).
- Attachments
-
- 25x25_06042010_133616.zip
- save file of a problem
- (277 Bytes) Downloaded 236 times
-
- Posts: 56
- Joined: Sat Jun 06, 2009 7:27 am
- Location: FRANCE, Montpellier
You were right tsh73, there was indeed a small bug : corrected.
You can double click on the board and see what append
Here is a new one to compare Joseph E's AStar algorithm code... and a mix with Janet's Maze generator...
You can double click on the board and see what append
Here is a new one to compare Joseph E's AStar algorithm code... and a mix with Janet's Maze generator...
- Attachments
-
- PathFinder_Astar.zip
- (8.1 KiB) Downloaded 275 times