Results 1 to 12 of 12
  1. #1
    4 Star Lounger
    Join Date
    Sep 2002
    Location
    Stafford, Staffordshire, England
    Posts
    585
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Maybe I'm Amazed!

    Consider the diagram below. It represents a maze on an Excel spreadsheet in which directional instructions are placed in each cell. By followinng the instructions, one can successfully travel from B1 to C3.

    Here is a set of directional instructions to get from B2 to K4.

    Y Y Z Z Z X X X Z Z Z Z Z Z Y Y W W W W Y Y Z Z Z Z Z Z Y Y W W W W W W W W W W Y Y Z Z Z Z Y Y W W W

    Each of the letters W; X; Y; Z, corresponds to the directions Right; Left; Up and Down, but I've misplaced the key.
    Can you help me out?

    <img src=/S/whisper.gif border=0 alt=whisper width=29 height=17> Thanks Ricky!
    <font color=blue><font face="Script MT Bold"><big>Rob</big></font face=script></font color=blue>

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Maybe I'm Amazed!

    <table border=1><td><span style="background-color: #FFFF00; color: #FFFF00; font-weight: bold">W</span hide></td><td><span style="background-color: #FFFF00; color: #FFFF00; font-weight: bold">Up</span hide></td><td><span style="background-color: #FFFF00; color: #FFFF00; font-weight: bold">X</span hide></td><td><span style="background-color: #FFFF00; color: #FFFF00; font-weight: bold">Left</span hide></td><td><span style="background-color: #FFFF00; color: #FFFF00; font-weight: bold">Y</span hide></td><td><span style="background-color: #FFFF00; color: #FFFF00; font-weight: bold">Right</span hide></td><td><span style="background-color: #FFFF00; color: #FFFF00; font-weight: bold">Z</span hide></td><td><span style="background-color: #FFFF00; color: #FFFF00; font-weight: bold">Down</span hide></td></table>

    Steve

  3. #3
    4 Star Lounger
    Join Date
    Sep 2002
    Location
    Stafford, Staffordshire, England
    Posts
    585
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Maybe I'm Amazed!

    Amazing, Steve! Was it really that easy?
    <font color=blue><font face="Script MT Bold"><big>Rob</big></font face=script></font color=blue>

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Maybe I'm Amazed!

    Yes. <img src=/S/sigh.gif border=0 alt=sigh width=15 height=15> [Though maybe its just my "unique abilites" <img src=/S/grin.gif border=0 alt=grin width=15 height=15>]

    <span style="background-color: #FFFF00; color: #FFFF00; font-weight: bold">From B2 to K4 you go Right 9 and down 2 (does not matter what the path).

    Your string has:
    17 Ws, 3 Xs, 12 Ys, 19 Zs

    You need to find a difference of 9(Right) and difference of 2(Down) in pairs:
    12-3 = 9 so 12(Y) is Right and that makes 3(X) left and 19-17 = 2 so 19(Z) is Down and 17(W) is up</span hide>

    Steve

  5. #5
    5 Star Lounger
    Join Date
    Jul 2004
    Location
    Ohio
    Posts
    629
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Maybe I'm Amazed!

    i used the same solution, just a little too late <img src=/S/razz.gif border=0 alt=razz width=25 height=17>
    <img src=/w3timages/blueline.gif width=33% height=2>
    <big>John</big>

  6. #6
    4 Star Lounger
    Join Date
    Sep 2002
    Location
    Stafford, Staffordshire, England
    Posts
    585
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Maybe I'm Amazed!

    You are Sir, a modern day Odysseus - unencumbered with false modesty, and fully deserved. <img src=/S/bow.gif border=0 alt=bow width=15 height=15>
    <font color=blue><font face="Script MT Bold"><big>Rob</big></font face=script></font color=blue>

  7. #7
    4 Star Lounger
    Join Date
    Sep 2002
    Location
    Stafford, Staffordshire, England
    Posts
    585
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Maybe I'm Amazed!

    See <!post=here,526,010>here<!/post>
    <font color=blue><font face="Script MT Bold"><big>Rob</big></font face=script></font color=blue>

  8. #8
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Maybe I'm Amazed!

    I have been playing with <post#=525,578>post 525,578</post: > for quite a while now and looking for "improvements"!!!! I'll get back to you if I have any ideas, it's quite fun <img src=/S/cool.gif border=0 alt=cool width=15 height=15>
    Jerry

  9. #9
    4 Star Lounger
    Join Date
    Sep 2002
    Location
    Stafford, Staffordshire, England
    Posts
    585
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Maybe I'm Amazed!

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>
    <font color=blue><font face="Script MT Bold"><big>Rob</big></font face=script></font color=blue>

  10. #10
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Maybe I'm Amazed!

    Rob

    I feel I am entering the lions den here but as promised, I have created an Excel robot maze solver. This is not about my excel programming everybody, it is about robot logic Please don't criticise my excel code, it has been a fun learning experience for me <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

    The robot I have created is a bulk standard, factory made urRobot. He is very similar to a Karel Robot but he can only live in Excel. Excel robot finds its way around a maze by using a sensor array, the array 'feels' to it's left, front and a secondary anti-bump sensor on its right. It also has an inbuilt digital compass so it is 'aware' of its current travelling direction

    Excel robot is designed to work by simple rules:

    1) If there is a gap in the left wall, always turn left
    2) If there is a dead end turn 180 degrees and continue
    3) If there is a corner at its current location use sensors to 'feel' and alot correct movement program.

    Excel robots main sensor is to 'feel' the left wall and follow it. After every move it makes, it does a sensor sweep to check if it is at a junction or a dead end, if not it continues its course.

    As Excel robot is a bulk standard robot, it does not have sophisticated sensor arrays so it can only start and work in the following conditions.

    1) Can only start at a dead end
    2) All corridors of the maze must be 2 units or more in length.

    Failure to do 1) and he will not start as it has to calibrate its inbuilt compass and failure to do 2) will cause it to smash through a wall and go crazy....you have been warned!!!!

    The attached excel world shows the starting point in the test mazes for excel robot in red, just highlight the cell and run the macro....enjoy
    Jerry

  11. #11
    5 Star Lounger Ruff_Hi's Avatar
    Join Date
    Feb 2001
    Location
    New York, New York, USA
    Posts
    768
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Maybe I'm Amazed!

    Looking good. I'm a bit unsure about why it jumps 2 squares when in turns a corner - guess it must be in the code somewhere - I will take a look. Also, it doesn't seem to realize when it gets to the X.

    Lastly, this will work in a closed maze but not an open maze (assuming that I have the terminology around the right way). A closed maze is where there is one really big loop and wall following will work. An open maze consists of two or more closed mazes where you need to cross over from one 'arm' to the other to solve.

    more than you ever wanted to know about mazes - there are some downloadable stuff about half way down.
    (Location Australia, then UK, but now USA. Heart, outlook, attitude, etc always Australian)
    Quote: "All Happiness is the release of internal pressure"

  12. #12
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Maybe I'm Amazed!

    Hi Tim,

    The jump of two squares was the real killer for me. What happens is the robot is continually checking the left wall. Say it is travelling east and comes to a corner it checks what corner type it is and then moves , say,northnorth. The robots sensors first trys to find a left wall but cant't so at corners I moved it an extra cell so it could find a left wall. In my frustration I may have put in an extra activecell.offset but it got rather frustrating.
    Jerry

Posting Permissions

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