HP Forums
Traffic jam game algorithm? - Printable Version

+- HP Forums (http://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not quite HP Calculators - but related (/forum-8.html)
+--- Thread: Traffic jam game algorithm? (/thread-9117.html)



Traffic jam game algorithm? - HP67 - 09-19-2017 07:17 PM

Does anybody have a description of an algorithm to solve this game?

I just found a paper on Dijkstra's algorithm that describes this but have not had a chance to go over it.

Is there any other worthwhile reading on this game? I'd like to write a solver program for a 48/50 and I imagine a recursive solution won't be manageable.


RE: Traffic jam game algorithm? - sa-penguin - 09-23-2017 07:29 AM

This sounds like a variation of "tile blocks".
Typically in a 4x4 grid, with numbers (or a picture).

A limiting factor in the traffic jam is: you can't rotate a blocking car 90 degrees to let the "red" car out.


RE: Traffic jam game algorithm? - HP67 - 09-24-2017 02:09 PM

It's an interesting problem and from just looking at the pictures in the paper apparently dijkstra dealt with or possibly designed the game.

Math just doesn't compute with me so I don't have much hope to solve it at this point. And I don't have time right now either. But I hope to get back to it. Would make a great calculator game on the 50g.


RE: Traffic jam game algorithm? - pier4r - 09-24-2017 02:32 PM

[partially related]

Sometimes when I bike I think would be nice to have a sort of "maze" game (even without much graphics) where the players should pick the path that allow a speed (not necessarily linear, but neither with wild fluctuations, given a max speed) right enough to have all the semaphores "green" in a row. Given that the path has a start and an end.

This while simulating traffic and semaphores.

Because on the bike either I have the traffic that prevents me to reach the semaphore when it is still green, or my speed is insufficient (too fast or too slow) to reach the semaphore when it is green and I must stop.