# Bit of Thursday fun.....

Printable View

Show 25 post(s) from this thread on one page
Page 2 of 3 First 123 Last
• 14th June 2012, 11:52 AM
tom_newton
Quote:

Originally Posted by sparkeh
Slightly different solution for me: https://docs.google.com/open?id=0B8C...0pSNzV3UVpucDA
:)

Does that work if you change left for right in both cases?
• 14th June 2012, 11:57 AM
sonofsanta
Quote:

Originally Posted by sparkeh
Slightly different solution for me: https://docs.google.com/open?id=0B8C...0pSNzV3UVpucDA
:)

Oh for... didn't know you could change the "wall ahead" to "wall on the left", I kept having my bloke turn left to check :doh:
• 14th June 2012, 12:06 PM
mac_shinobi
*** SPOILER *****

This is how I did it , more then likely a messy way of doing it but it seemed to work

Quote:

Repeat While Not wall ahead
Do Move Forward
+ If not wall to the right then
turn right
turn right
+ if not wall to the left then
turn left
Move Forward
Tried to upload a screen grab but wouldn't let me
• 14th June 2012, 12:11 PM
mac_shinobi
Quote:

Originally Posted by sparkeh
Slightly different solution for me: https://docs.google.com/open?id=0B8C...0pSNzV3UVpucDA
:)

That's a lot more elegant than my solution - sigh * grumble grumble *

I couldn't get your solution to work but I did get the Else bit ( clicking the plus symbol ) DOH
• 14th June 2012, 12:12 PM
tom_newton
Quote:

Originally Posted by sonofsanta
Oh for... didn't know you could change the "wall ahead" to "wall on the left", I kept having my bloke turn left to check :doh:

Yeah, @OB1 did that ;)
• 14th June 2012, 12:14 PM
sonofsanta
Done it now, so much easier when you know all the commands available to you... *grumble*

Attachment 14282

Which is pretty much the same as Tom's, but with the evil of a nested if. sparkeh's looks neatest so far, I reckons.

And no I have not just been doing this all morning :p although I am clearly out of practice at my algorithms.
• 14th June 2012, 12:28 PM
apeo
Heres how i did it:

Repeat forever
--if not wall ahead
----move forward
----turn left
--else
----turn right
--end if
end do

I didnt know you can change the wall ahead LOL
• 14th June 2012, 12:58 PM
DT2
Attachment 14286Here's mine... little different but it works....
• 14th June 2012, 01:10 PM
apeo
@DT2 Nice.. Little man goes straight there.
• 14th June 2012, 01:47 PM
TechMonkey
My issue was I could make a script so he got to the end but hypothetically if the map was reversed he would get caught in the loop. So would these answers still work if you were given a mystery map, especially if you think about the island problem with wall following. Or am I over thinking the problem as usual?
• 14th June 2012, 01:50 PM
LiamH
Mines a bit like DT2's, just using an extra else if in the original if.

Attachment 14289

Edit, okay its a LOT like DT2's lol
• 14th June 2012, 01:56 PM
sonofsanta
Annoyingly this doesn't seem to work in IE8, with or without the Smoothwall, so students can't use it as a ten minute muck about at the end of a lesson - anyone else had problems with that/found a way around it that doesn't involve me pushing a Chrome MSI out especially for this?
• 14th June 2012, 02:00 PM
tom_newton
It's a shame there isn't a second "level" as someone pointed out - because some solutions work for certain classes of maze, and some are general. I don't believe any of the simple ones we have created here are fully general (is the left wall follower general for all mazes?) - it would be fun to find out :)
• 14th June 2012, 02:01 PM
LiamH
@sonofsanta

Worked in firefox here, we have a portable network install that the kids used to have a play.
• 14th June 2012, 02:03 PM
sonofsanta
Quote:

Originally Posted by LiamH
@sonofsanta

Worked in firefox here, we have a portable network install that the kids used to have a play.

Yeah it worked fine in my FireFox, but the rest of the computers around school only have IE, and I'm not going to faff about pushing out new software just for this at the moment - too many more important things to do, unfortunately (not that you'd know from the time I spent playing with this, but still)

If there's a way of getting it to work in IE8, lovely, if not, it may have to wait for IE9/Chrome in September.
Show 25 post(s) from this thread on one page
Page 2 of 3 First 123 Last