Jump to content




New turtle competition-maze!


  • You cannot reply to this topic
43 replies to this topic

#1 Konlab

  • Members
  • 595 posts
  • LocationKerbin

Posted 24 May 2014 - 08:43 AM

Competition ended:
-Nobody's turtle found exit from maze
-But there are some very good works (for example Bom Bloke's work)

Edited by Konlab, 20 June 2014 - 10:32 AM.


#2 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 24 May 2014 - 09:01 AM

are you able to provide an example of the maze?

#3 CometWolf

  • Members
  • 1,283 posts

Posted 24 May 2014 - 09:46 AM

while true do
  turtle.dig()
  turtle.forward()
end
edit: lol, nvm i saw the no breaking blocks rule now :P

Edited by CometWolf, 24 May 2014 - 09:47 AM.


#4 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 24 May 2014 - 10:31 AM

View PostCometWolf, on 24 May 2014 - 09:46 AM, said:

while true do
  turtle.dig()
  turtle.forward()
end
edit: lol, nvm i saw the no breaking blocks rule now :P
close though.
while true do
  if not turtle.forward() then
    turtle.turnRight()
  end
end
done. :)

#5 CometWolf

  • Members
  • 1,283 posts

Posted 24 May 2014 - 10:33 AM

xxx
x x
x xxxx
x <- turtle enters here
x xxxx
x x
xxx

Would make him just go back and forth though :P

#6 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 24 May 2014 - 10:55 AM

View PostCometWolf, on 24 May 2014 - 10:33 AM, said:

xxx
x x
x xxxx
x <- turtle enters here
x xxxx
x x
xxx

Would make him just go back and forth though :P
lol, use code tags to maintain those spaces :P

#7 Konlab

  • Members
  • 595 posts
  • LocationKerbin

Posted 24 May 2014 - 03:58 PM

But this maze will be 50 blocks wide, and theese programs will not working, so this will be challange, and the maze will be from bedrock, so the while true do turtle.dig() ... Don't works!

#8 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 24 May 2014 - 11:32 PM

View PostKonlab, on 24 May 2014 - 03:58 PM, said:

But this maze will be 50 blocks wide, and theese programs will not working, so this will be challange, and the maze will be from bedrock, so the while true do turtle.dig() ... Don't works!
without more details (and/or screenshot) of the maze my submission will be
while true do
  if not turtle.forward() then
    turtle.turnLeft()
  end
end


#9 Dog

  • Members
  • 1,179 posts
  • LocationEarth orbit

Posted 25 May 2014 - 12:23 AM

And, just in case going right is faster in this particular maze, I'll submit theoriginalbit's other suggestion

while true do
  if not turtle.forward() then
    turtle.turnRight()
  end
end

Although either of these can easily be fooled by a room with a single entry that isn't aligned with a corner of the room.

Edited by Dog, 25 May 2014 - 12:23 AM.


#10 Saldor010

  • Members
  • 467 posts
  • LocationThe United States

Posted 25 May 2014 - 12:59 AM

Ha! None of these will win, because what Konlab didn't say, was that none of the turtles would actually have fuel!

#11 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 25 May 2014 - 01:03 AM

View PostJiloacom, on 25 May 2014 - 12:59 AM, said:

Ha! None of these will win, because what Konlab didn't say, was that none of the turtles would actually have fuel!
that's okay, they can just be spinning top Turtles :P

#12 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 25 May 2014 - 03:18 AM

local function refuel()
 while true do
  sleep(1)
  if turtle.getFuelLevel() < math.floor( turtle.getFuelLimit / 3 ) then
   turtle.refuel( 8 )
  end
 end
end
local function checkRight()
 turtle.turnRight()
 local block = turtle.detect()
 turtle.turnLeft()
 return block
end
local function main()
while true do
 if turtle.detect() then
  turtle.turnLeft()
  turtle.forward()
 elseif checkRight() then
  turtle.forward()
 end
end
end
parallel.waitForAny( main, refuel )
Tada, I made it out of the maze.
If you want to make this hard, do 3 dimensions.

#13 Saldor010

  • Members
  • 467 posts
  • LocationThe United States

Posted 25 May 2014 - 01:50 PM

Okay, here's mine :P

os.pullEvent = os.pullEventRaw
while true do
  turtle.turnLeft()
  rednet.broadcast("DID I WIN?!")
  print("DID I WIN?!")
  sleep(0)
end

Edited by Jiloacom, 25 May 2014 - 01:52 PM.


#14 Konlab

  • Members
  • 595 posts
  • LocationKerbin

Posted 25 May 2014 - 01:53 PM

The turtles will have fuel :)
I will create a rednet receiver :)
And the maze will 10x10x10 block cube :P

#15 flaghacker

  • Members
  • 655 posts

Posted 25 May 2014 - 08:42 PM

View PostJiloacom, on 25 May 2014 - 01:50 PM, said:

Okay, here's mine :P/>

os.pullEvent = os.pullEventRaw
while true do
  turtle.turnLeft()
  rednet.broadcast("DID I WIN?!")
  print("DID I WIN?!")
  sleep(0)
end

You forgot to do rednet.open("right") :-P

#16 Saldor010

  • Members
  • 467 posts
  • LocationThe United States

Posted 25 May 2014 - 08:46 PM

View Postflaghacker, on 25 May 2014 - 08:42 PM, said:

View PostJiloacom, on 25 May 2014 - 01:50 PM, said:

Okay, here's mine :P/>

os.pullEvent = os.pullEventRaw
while true do
  turtle.turnLeft()
  rednet.broadcast("DID I WIN?!")
  print("DID I WIN?!")
  sleep(0)
end

You forgot to do rednet.open("right") :-P

... shut up...
:P

#17 valithor

  • Members
  • 1,053 posts

Posted 25 May 2014 - 08:53 PM

Right wall rule in most 2 dimensional mazes you can win by keeping your hand on the right wall or in this case stay against the wall that is on your right when you first enter the maze.

following this rule it is really simple

while true do
	if turtle.forward()==true then
		turtle.turnRight()
		if turtle.detect()==true then[/s]
[s]          turtle.turnLeft()
		end
	elseif turtle.detect()==true then
		turtle.turnRight()[/s]
[s]        if turtle.detect()==true then[/s]
[s]          turtle.turnLeft()[/s]
[s]          turtle.turnLeft()[/s]
[s]        end
	end
end


edit:
Just now saw that the maze had been made 3 dimensional removed my submition

Edited by valithor, 30 May 2014 - 02:04 PM.


#18 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 26 May 2014 - 02:25 AM

my revised submission! Note this script will be easily fooled.
function refuel()
 while true do
  sleep(1)
  if turtle.getFuelLevel() < math.floor( turtle.getFuelLimit / 3 ) then
   turtle.refuel( 8 )
  end
 end
end
local function checkRight()
 turtle.turnRight()
 local block = turtle.detect()
 turtle.turnLeft()
 return block
end
local function main()
while true do
 if not turtle.detectUp() then
  turtle.up()
  turtle.up()
 elseif turtle.detect() then
  turtle.turnLeft()
  turtle.forward()
 elseif checkRight() then
  turtle.forward()
 elseif not turtle.detectDown() then
  turtle.down()
  turtle.down()
 end
end
end
parallel.waitForAny( main, refuel )

Edited by KingofGamesYami, 29 May 2014 - 02:50 PM.


#19 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 28 May 2014 - 10:04 PM

View PostKonlab, on 25 May 2014 - 01:53 PM, said:

I will create a rednet receiver :)

How about a GPS satellite?

#20 TheOddByte

    Lazy Coder

  • Members
  • 1,607 posts
  • LocationSweden

Posted 29 May 2014 - 02:24 PM

View PostDog, on 25 May 2014 - 12:23 AM, said:

And, just in case going right is faster in this particular maze, I'll submit theoriginalbit's other suggestion

while true do
  if not turtle.forward() then
	turtle.turnRight()
  end
end

Although either of these can easily be fooled by a room with a single entry that isn't aligned with a corner of the room.
That wouldn't work! :P
But you pretty much already said that x)
Posted Image

Edited by TheOddByte, 29 May 2014 - 02:26 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users