Results 1 to 22 of 22

Thread: Maze Mater 5000

  1. #1

    Thread Starter
    Hyperactive Member dogfish227's Avatar
    Join Date
    Oct 2002
    Location
    GA
    Posts
    409

    Maze Mater 5000

    i just made a program that solves all mazes im shure its not the best but it works (sofar) download it and give me feedback thanx

    http://nategames00.tripod.com/m/mazemaster.html

  2. #2
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    That is actually pretty simple.....But if the end is not attached to a wall I have no idea but a brute force solution....

    I have no idea of what kind of algorithm you have used, but it seams like it uses a lot more moves then it has too...

    I just made this little sample to show you what I mean. Make the walls with mouse cursor. Push the "lines (- - - - -) to make a wall. The MOUSE will try to come out of the maze by trying to find a way to the right....I have made it slow so you will see how it works...
    Attached Files Attached Files

  3. #3

    Thread Starter
    Hyperactive Member dogfish227's Avatar
    Join Date
    Oct 2002
    Location
    GA
    Posts
    409
    That is actually pretty simple.....But if the end is not attached to a wall I have no idea but a brute force solution....
    im not shure what you meant by that the person will still find the end even if its not attached to a wall

    as far as algorithem i used is i just made one up on my own

    basicly it goes throgh the maze and marks where dead ends are when its found them and also marks where its been and it uses these to determine the way it sould go right now it dosent even look for the finish

    and thirdly the always try to go right works most of the time but their is a way that it can get you stck in an continuous circle



    blue is the start and green if the finish

    if you keep gong right you will get stuck and never make it tp the finish

  4. #4
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    For some reason I can't see your picture, but I'll try to explain again.

    I have posted a picture with two different types of mazes. The first one is what you probably would find in the real world. A maze with the start and the finish at the outer wall. If you think about how a maze in the real world is, I can't think of a single maze that not have the start and the finish like this. With my algorithm it will always find the exit in this kind of mazes. And if there is no finish, it will always find back to where it started, so it can get out that way....

    In the other picture I have posted a picture (probably something like you have posted) of a maze that has the start and the finish in the middle of the room. This would probably not happen in the real world at all (any suggestions???). I'm not sure if it is an algorithm that can solve this problem. What you are doing is more like a brute force algorithm (trying every possible way). The only way I could think of making this work is using my algorithm and let it first look left and see if there is a wall there, it not, let it come back later if it not finds the exit a long it path (hugging to the right).

    I hope this will help a bit...If not post again, and we can try to figure something out...

  5. #5

    Thread Starter
    Hyperactive Member dogfish227's Avatar
    Join Date
    Oct 2002
    Location
    GA
    Posts
    409
    your right the right always algorithm allways works if the start and finish are on the out sides of the maze but my maze program lets you put the start in the middel of the maze as you can see in the picture i tried attaching again it will not work in that maze
    Attached Images Attached Images  

  6. #6
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    No that is true, because your green spot is not starting with an entrance to the room, but rather inside the room...So the best way would probably be to use both the left and the right algorithm. It starts to use the "keep hugging to the right" algorithm, and if he ends up at the same spot looking the same direction, then use the "keep hugging to the left" algorithm...

    I have been thinking of what I said about letting the object "see", and in this particular maze it would actually see the solution right the way....but that was just an coincidence....but I thought about something like, "first look to the left, and record if there is possible to move this way, then turn back, and then to the right, if it is possible to move this way, do so, else move back and move forward, else move the recorded way else turn back"......and if it then comes back to where it started facing the same way, then go to the first recorded way he has not been at.....I have to think a little bit more about this, but see if you can figure something out of this one....

  7. #7
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Nope I have thought about it, my idea was terrible...

  8. #8
    New Member
    Join Date
    Oct 2002
    Location
    HERE
    Posts
    8
    nate games are cool

  9. #9

    Thread Starter
    Hyperactive Member dogfish227's Avatar
    Join Date
    Oct 2002
    Location
    GA
    Posts
    409
    actualy thats not such a bad idea i think im gana add some stuff that will let it do that it'll look down the path and mabey a corner path and see if thier is a finish thier

    or i could make it so it continuously looks down paths until it finds wich way leads to the finish that way it do it right the first time every time

    but itd probaly take a long time to move each time

  10. #10
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Computers are so fast now days...don't think about the speed. Your maze is already doing 400 moves in a sec on my computer, and I don't think it will slow down that much if you add sight....

  11. #11
    Addicted Member
    Join Date
    Apr 2002
    Location
    Israel
    Posts
    152
    well I have looked at your maze program it's pretty good but when I give it the maze2 file it runs most of the squares two times thats not good for speed

    well I have attached my own maze program it MAKES mazes and it's not difficult to write the code to slove it(well some day I'll write it but not now) take a look at it I think the worst thing is the painting speed anyway here is the file
    Attached Files Attached Files

  12. #12
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Not bad...but i'is not possible to change the values in the textboxes. Is that a bug???

  13. #13
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Sorry, I understood what was wrong now....You have to have the same number in each of the textboxes....

    By the way, this is a normal maze that uses the "keep hugging to the right" algorithm to find the end.....

    Do you want to post your code KingArthur, so I can try using that algorithm to solve it????

  14. #14
    Fanatic Member sql_lall's Avatar
    Join Date
    Jul 2002
    Location
    Up Above (i.e. AUS)
    Posts
    571

    Talking OK, something else..

    i'm not sure if it still exists, but...
    there was a post recently with a few other maze programs on, but i was unable to find it. However, i will post the code for mine here too if u want to look at it.


    EDIT: here it is:
    http://www.vbforums.com/showthread.p...highlight=maze

    BTW: nice maze-making software, 't would be interesting to race a maker vs a solver...
    Last edited by sql_lall; Nov 6th, 2002 at 04:31 AM.
    sql_lall

  15. #15
    Addicted Member
    Join Date
    Apr 2002
    Location
    Israel
    Posts
    152
    hi NoteMe
    No I probably won't send the whole code but I can give you hint's on how it is written if you want :: I don't have much time for my solver but if I want to solve a maze I think it must be a perfect maze(well not sure but I think so)

    hi sql_lall
    Grate Idea to make a maze solving contest will be a good practice for my rusted skills

    what do you guys think about it? the only problem is that we will need a file format wich every body can load in his program think about it could be funny

  16. #16
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Yes that would be fun....but I have too much to do before Christmas, so I don't have time. But if you ask again after Christmas I probably would have competed....hehehe

  17. #17

    Thread Starter
    Hyperactive Member dogfish227's Avatar
    Join Date
    Oct 2002
    Location
    GA
    Posts
    409

    mazemaster5000 pro

    yeah mazemaster 5000 pro is almost working all i have left is to do some error traping

    does ne one know a statement that will check to see if a file exists

    and i also need a statement the check if a disk is inserted into a dirve if the statement above does not also do that

  18. #18
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Do you want to seek in a spessial folder, on a whole HD. Looking in a folder is easy, looking in all folders on a HD, is not that simple.

    If only in one folder, like the one your app is in:

    ChDir App.Path

    If Dir "MyFile.TXT" = "" Then
    'File does not exists
    else
    'File exists
    End if


    You could also use the Dir function to look for all files that maches a template that includes wildcards...

  19. #19

    Thread Starter
    Hyperactive Member dogfish227's Avatar
    Join Date
    Oct 2002
    Location
    GA
    Posts
    409

    mazemaster5002

    ok i got the error checking no more program crashing when you forget to prees browes befor load

    also ive made a new algorithem the you can tell it to use to solve the maze you can select between the orignal one and the new one.

    the new algorithem "looks" down the mazes paths for dead ends and instead of marking where not to go it marks where to go.

    if you select in the selection menue
    way2 you will see the maze looking and going back to previous corners if it looks tword a dead end (it will look like the person is jumping around the maze at times)
    if you select way2 first time it will use the same algorithem it used in way2 reg but also use varbles that came out of way2 to solve the maze on its first try but still not nessisarly the fastest way

    wayone of courese is the original way of solveing it

    also ive put the code for mazemaster up on my site if you want to look at or use it for any thing i havent yet commented and orginaized it thoght so it will be real hard to read.
    Last edited by dogfish227; Nov 11th, 2002 at 01:33 PM.

  20. #20

    Thread Starter
    Hyperactive Member dogfish227's Avatar
    Join Date
    Oct 2002
    Location
    GA
    Posts
    409
    in case you dont want to scroll all the way back up to the top of the form heres the sit again

    http://nategames00.tripod.com/m/mazemaster.html

  21. #21

    Thread Starter
    Hyperactive Member dogfish227's Avatar
    Join Date
    Oct 2002
    Location
    GA
    Posts
    409
    o yeah and you can find the code here

    http://nategames00.tripod.com/m/pg.html

  22. #22
    Addicted Member
    Join Date
    Apr 2002
    Location
    Israel
    Posts
    152
    hi guys
    well I have worked on my maze program now it has the slove function and it will solve any PERFECT MAZE(altought I havn't tested it on unferfect mazes) I think it's speed is very good and I didn't get any errors till now
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width