|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#16
|
|||
|
|||
|
RE: The time draws near
Dang, that Dijkstra guy beat us to it!
|
|
#17
|
|||
|
|||
|
RE: The time draws near
Ah well I've lost, lol.
|
|
#18
|
|||
|
|||
|
RE: The time draws near
Here's a little something you all might be interested in:
http://www.skilldrill.com/LeaderBoardList.asp?htxtTestID=194&n=Foundation+Series%3A+PHP4 Skill Drill has a PHP4 Foundation series test - it's free to take and if you score high enough, they give you a certificate. I should be ranked #1 but I'm currently ranked #3 ("meetraz") because they don't consider elapsed time in your ranking |
|
#19
|
|||
|
|||
|
RE: The time draws near
I ended up going with the A* algorithm, which does Dijkstra’s algorithm one better, by using a heuristic estimate to determine which nodes (squares in the maze) are closest to the goal (exit).
Theoritically, the A* algorithm will find the shortest path quicker because it will be following the path that seems to lead to the goal in less steps. Unfortunately for me, I don't think I implemented it very efficiently, because it seems to be about 100 times slower on large maps than some of the Lee-Moore implementations that many of you have done. Check it out at: http://codezilla.com/php/a-star/ |
|
#20
|
|||
|
|||
|
RE: The time draws near
I used the Lee More algorithm... And I like it! Here's my solution: www.gemueseauflauf.de/maze and the code www.gemueseauflauf.de/maze/code.txt
|
|
#21
|
|||
|
|||
|
RE: The time draws near
How about lines of code? Who has the shortest solution?
I didn't try to shorten mine at all, but I was suprised at how short the finished solution was. With HTML and fluff, I'm at ~150 lines, if I take that out, I'm at ~90 lines. |
![]() |
| Viewing: Codewalkers Forums > PHP Contests > Older Contests > The time draws near |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|