1. ## 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!

2. ## 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. ## Re: Maybe I'm Amazed!

Amazing, Steve! Was it really that easy?

4. ## 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).

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. ## 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>

6. ## 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>

7. ## Re: Maybe I'm Amazed!

See <!post=here,526,010>here<!/post>

8. ## 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>

9. ## Re: Maybe I'm Amazed!

<img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

10. ## 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

11. ## 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.

12. ## 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.

#### Posting Permissions

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