Cell Pathfinding (a challenge)

4

CLIGUI 2024-08-13 00:37

I challenge, whoever is interested, to make a program that solves this maze on its own.


RULES:
-Cells only (no sprites)
-No modifications to the maze (or clipping through it)
-keep it simple


I included some simple movement code, but it is unable to solve the maze.


was8bit 2024-08-13 14:01

What do you mean by "clipping" ?


CLIGUI 2024-08-13 14:07 (Edited)

Passing through the wall, or the corner between walls


was8bit 2024-08-13 14:27

Ah ... thanks :)


was8bit 2024-08-13 14:31

Pure random...


CLIGUI 2024-08-13 14:49 (Edited)

Nice, how can the BG still display without flashing if there is no wait VBL? Never mind I see now... no CLS.

Ah so that is what trace does...


was8bit 2024-08-13 15:45

:)

I am currently working on a not-so-random version...


Pablo 2024-08-13 15:55 (Edited)

I'm a bit busy, but i couldn't resist. Thank you both for the fun :)

Edit: updates.

Maze_Solve.nx | Open in app
2024-08-13 18:25
Maze_Solve.nx | Open in app
2024-08-13 15:55

CLIGUI 2024-08-13 16:42

Great solution it is simple and still works on other mazes.

Thanks for participating!


was8bit 2024-08-13 16:54

Mapping

I Maze mapping.nx | Open in app
2024-08-13 16:54

was8bit 2024-08-13 17:02 (Edited)

Pablo, superb :)

But i have an extreme maze ;)

... never mind... it eventually solves it ...

Maze_Solve almost.nx | Open in app
2024-08-13 17:02

was8bit 2024-08-13 17:04

... mine still does result in a path solution ...


Pablo 2024-08-13 18:23 (Edited)

Very cool! I updated mine, thanks for this maze :)

Maze_Solve2.nx | Open in app
2024-08-13 18:23

CLIGUI 2024-08-13 19:06 (Edited)

If the line has to backtrack too far it will run out of memory, like if you removed all the obstacles or put lots of long turning tunnels in the maze.


Pablo 2024-08-13 19:26 (Edited)

Ah, i need to make it iterative. Can you share the maze to test it?


CLIGUI 2024-08-13 19:28 (Edited)

Ok jus a sec. Interestingly it will self destruct if there is no solution, like if you block off the goal


Pablo 2024-08-14 01:35 (Edited)

(´∀`人)

Maze_Solve3.nx | Open in app
2024-08-14 01:35

was8bit 2024-08-14 05:05

This was very fun :):) thanks for sharing :)


CLIGUI 2024-08-14 14:36

Here is the solver in a 32 by 32 maze


was8bit 2024-08-14 16:36

Keeps scrolling...


Pablo 2024-08-14 18:37 (Edited)

Cool, you might need to dimension the P array to the playable map size:

DIM P(900,1)


SP4CEBAR 2024-08-16 08:17

I've heard that a flood fill is pretty good at solving mazes


moechofe 2024-08-21 21:32

I reuse code for another program.


CLIGUI 2024-08-21 22:40

Very nice not one back track, well labeled too


Log in to reply.