This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Noodles's profile picture

Turtle AI possible

Started by Noodles, 28 September 2012 - 07:08 AM
Noodles #1
Posted 28 September 2012 - 09:08 AM
So I was thinking of having a bit fun with turtles.

There would be a main wireless Computer controlling everything.
Mining Turtles to get Ressources.
Crafty Turtles to replicate Turtles.
Maybe just some normal turtles to build structures on the surface.

So my Problem was that I have no Idea what happens if a turtle goes outside of the generated world.
Is it possible to just let the turtles mine the whole world away or can they just go as far as the world is generated ??

And no worries about my coding skills, I might not be the Pro-Coder in Lua, but I have skills in other Languages.

Sorry if I made TYPO`s.

Thanks in advance!
Doyle3694 #2
Posted 28 September 2012 - 09:24 AM
some nice commands:
rednet.open("this is the side the modem is on")
rednet.send(the ID of the computer to send to, "This is the message")
SenderID, Message, Distance = rednet.recieve()
turtle.craft()
turtle.forward()
turtle.back()
turtle.turnRight()
turtle.turnLeft()
turtle.dig()
turtle.digUp()
turtle.digDown()
turtle.place()
Heroj04 #3
Posted 28 September 2012 - 09:30 AM
some nice commands:
rednet.open("this is the side the modem is on")
rednet.send(the ID of the computer to send to, "This is the message")
SenderID, Message, Distance = rednet.recieve()
turtle.craft()
turtle.forward()
turtle.back()
turtle.turnRight()
turtle.turnLeft()
turtle.dig()
turtle.digUp()
turtle.digDown()
turtle.place()

This has nothing to do with his problem.

Anyway the way it used to work was if a turtle left the loaded chunks they would disappear; but I think now they just stop and return false, so I don't think they could destroy your entire world
Luanub #4
Posted 28 September 2012 - 09:51 AM
You could do it using anchor blocks, but eventually Minecraft would run out of memory and would crash. That and the MC world is infinite so it would just keep generating chunks as the turtles moved out away from the area's you've explored.
Noodles #5
Posted 28 September 2012 - 10:08 AM
if (Well are their anchor blocks in CC??) then (how do i use them, how do i craft them)
else (which mod has the best anchor blocks, or chunkloaders of course) end

XD just a joke

I would try to code it so that i would not run out of memory, so for example if they are finished with a certain section of the world the anchor blocks or chunkloader blocks, would be taken away and no turtle would ever enter this area again.
Of course if I had a million turtles their would still be some problems, but it would be a freakin awesome ingame joke, it would be like the replikators from Star Gate ^^, I could actually Code some Trutles to just randomly run around and kill players XD.
Well I could tell the Programm to use just a set amount of turtles so like replikate until there are 100 turtles and then stop replicating.
Luanub #6
Posted 28 September 2012 - 10:19 AM
Railcraft has world anchors. You could even build a rail system with a minecart that has an anchor in it that moves with the turtles.. lol

http://railcraft.wikispaces.com/World+Anchor+%28Device%29
Doyle3694 #7
Posted 28 September 2012 - 10:44 AM
I was nice because you said you were not so good at lua so I gave you some nice commands, If you know them then you're better than you think. but yeah, doe the turtles to turn around instead, that way they'll never enter ungenerated places
BrolofTheViking #8
Posted 28 September 2012 - 05:34 PM
railcraft would be an interesting thing to use… Like they mentioned, there are anchor carts that always keep the world loaded around the cart, as if a player was there I believe. I suppose you could have the turtles build a track in segments, with a boarding rail (a special rail that locks any cart in place when it's unpowered, then gives them an instant boost if it is powered) every once in a while so that a turtles could power it and have the cart follow them. a very interesting concept… I'm wondering, what were you thinking of doing to communicate with all of the turtles? If they are possibly going to go into unloaded chunks, then they might not be in range of a wireless computer. Were you thinking of setting up a grid of computers so you could communicate over longer distances, or having the turtles be smart enough to return to communication range after completing a task, or something else?

Anyway, when and if this is finished, please post videos of it.
Doyle3694 #9
Posted 28 September 2012 - 07:05 PM
well, having turtles go straight one direction longer then generated world is just plain stupid. make him turn around after like 100 blocks or so and make him dig a huge area out instead.