maze

Started by
31 comments, last by Nice Coder 19 years ago
Depends on the connectivity, but probably not.

Look into ant colony optimization and or ant systems, but ant colony will be better, since it was designed to solve problems like this, especially if optimality is not required. Since that can't be guaranteed anyways.
Advertisement
Quote:Original post by fractoid
well, for a 40x40 maze, I'd guess you wouldn't have more than 30 or 40 intersections. Is that a small enough number to brute-force TSP?

<referential tsp linky>


Its not the number of intersections.

Its the number of pills that i need. (you only need to get a path from pill to pill, ect.)

I've got a really sneaky idea.

From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
Use two stacks

1) the visited stack
2) a 'desision' stack that contains alt movements

I''m a firm believer in the philosophy of a ruling class, especially since I rule.
Quote:Original post by fractoid
well, for a 40x40 maze, I'd guess you wouldn't have more than 30 or 40 intersections. Is that a small enough number to brute-force TSP?

<referential tsp linky>


Hell no.

40! is HUGE.

We need a sneaky algo.

From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
Quote:Original post by Nice Coder
Hell no.
40! is HUGE.
We need a sneaky algo.

From,
Nice coder
Sorry, poor choice of words. I meant use a heuristic-but-relatively-time-consuming-compared-to-greedy algorithm, of the sort on that page. Not just a naieve recursive implementation, which, as you point out, would be fine if you have a quantum computer to run it on. :P
Quote:Original post by fractoid
Quote:Original post by Nice Coder
Nice coder
Sorry, poor choice of words. I meant use a heuristic-but-relatively-time-consuming-compared-to-greedy algorithm, of the sort on that page. Not just a naieve recursive implementation, which, as you point out, would be fine if you have a quantum computer to run it on. :P


Ok.

I was just getting a WTF moment.

[lol]

From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
Quote:Original post by Nice Coder
How many is a 'few'?

(i've got an idea. But it all depends on how many things there are to search.)

From,
Nice coder



what do you mean with "how many is a 'few'"?
-- Nietzsche ist tot --
How many items are we talking about?
2? 3? 10?

From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
oh,
see http://www.clutter.ch/ex.png; it's a screenshot of a given maze.
-- Nietzsche ist tot --
Ok. 11 items. (10 pils, one powerpill).

You could get a path in a few miliseconds.

ok 11! = 39,916,800

Which is doable in 30 seconds. (you have 40M nodes to search).

Just as long as it doesn't increase (one more item, and you in the 400Mitem mark. WHich is a little heigh. Two more and your in the billion item mark).

Ok, assuming 1Billion instructions per second.
You have 30 seconds.
So 30billion / 39,916,800 = 751 instructions per node max.

From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.

This topic is closed to new replies.

Advertisement