Thread: MAZE Problem

  1. #61
    Registered User
    Join Date
    Mar 2008
    Posts
    85
    oooooooooo

    so all code are wrong ?
    or I need to find a different way to do it?

    cheers

  2. #62
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by peacealida View Post
    oooooooooo

    so all code are wrong ?
    or I need to find a different way to do it?

    cheers
    I hadn't looked at the stuff you had added from the previous error post to this one. Yes, every single line of code you added from x:32 to (x+1):02 (x depends on your time zone) is wrong, and cannot be made right.

    Find a C++ book. Start on page 1. By the time you get to page 200 or so, this will all seem much easier.

  3. #63
    Registered User
    Join Date
    Mar 2008
    Posts
    85
    I don't think I have that much time.....
    I only have 30 days left for this .
    and i need to find a way to display the animation on the browser in SVG format.

    I will move on to this tomorrow
    tabstop. Thanks for your every great help and attempt. Without your help I wouldn't get the map done.

    Thanks

  4. #64
    Registered User guesst's Avatar
    Join Date
    Feb 2008
    Location
    Lehi, UT
    Posts
    179
    You could compress your map data. I'm not suggesting anything radical, something simple like keeping track of alternating runs of 0 and 1, then write a function to populate the map from the data. So like your matrix data:
    Code:
      { {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
        {0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0},
        {0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0},
        {0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0},
        {0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0},
        {0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0},
        {0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0},
    ...
    etc
    would be reduced to :
    Code:
        {0,1,30,1,2,1,28,1,3,26,1,5...}
    etc. (Note, I started with the assumption that the first bit would be 0. In this map that wasn't the case, so I had to start with a 0.)

    This would effectively reduce the map in memory to a more manageable size. Treat the whole map like a single line and just be sure to wrap around your data structure appropriately. (By the way, this is a similar method used in the classic BASIC program LOVE.)

    I recently came up with a more robust method of compression, but I don't think this program calls for that.
    Type-ins are back! Visit Cymon's Games at http://www.cymonsgames.com for a new game every week!

  5. #65
    Registered User
    Join Date
    Mar 2008
    Posts
    85
    Hi
    thanks every1
    Finally i got code working now.

    I am wonder, is it possible to leave a colour path on the maze, where the ant has been?
    and I Am looking to create fix point for the ann to start with and end at the other fixed point
    thanks thanks

    also my program does create a XML file, but i really duno how to show it under SVG
    any1 had such experience?
    thanks

  6. #66
    Registered User
    Join Date
    Mar 2008
    Posts
    85
    the colour problem has been solve now


    But how can i get it start and end in a fixed point.
    Also any1 can explain what is mutation in genetic programming
    please
    thanks thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Laptop Problem
    By Boomba in forum Tech Board
    Replies: 1
    Last Post: 03-07-2006, 06:24 PM
  2. Having trouble solving maze.
    By eurus in forum C Programming
    Replies: 3
    Last Post: 02-17-2006, 01:52 AM
  3. Replies: 5
    Last Post: 11-07-2005, 11:34 PM
  4. searching problem
    By DaMenge in forum C Programming
    Replies: 9
    Last Post: 09-12-2005, 01:04 AM
  5. half ADT (nested struct) problem...
    By CyC|OpS in forum C Programming
    Replies: 1
    Last Post: 10-26-2002, 08:37 AM