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

Turtle Collaborative Construction Team: Has it been done?

Started by ArcaniX5696, 30 January 2013 - 12:14 PM
ArcaniX5696 #1
Posted 30 January 2013 - 01:14 PM
I had a vision of turtles working autonomously together to build a structure, and thought "Surely, someone has already done this." so I headed to the Programs section of these forums and have not really found anything like this so I turn here for help (and maybe a bit of an idea pitch, as it turns out…).

I imagine a system where a "Master" (this could be a computer/another turtle/etc… the 'what' is irrelevant; let's call this the "Manager") can accept a blueprint for a structure and command and control X number of turtles (let's call them "Workers") to guide the construction of the blueprint. At it's simplest form, I imagine the blueprint to be a simple three-dimensional array where the array co-ordinates would map relatively to MC World co-ordinates and the array value would contain what blockID to be placed at it's co-ordinate.

Once a Manager had been given a blueprint and a relative starting point for the construction, it would figure out how many nearby Worker turtles it had "in it's team" and begin breaking down the larger blueprint into smaller pieces (eg. 32 block strips) and issue one piece at a time to each Worker for construction. Upon receiving their orders, Workers would collect the required inventory from either a static inventory location or a Logistics Pipes Request Pipe location provided by the Manager, move to the appropriate location, and proceed to execute the build orders. Once completed, the Worker would notify the Manager of it's completion and receive the next work order until the whole project was finished.

How fast or slow a project was built would be entirely dependent on how many Worker turtles the user provides to the "construction team" and resource availability.

If this exists, please let me know where I can find it (and possibly ignore the rest of this post).
If this hasn't been built, is there any interest amongst the community to see a project like this?

If so, I can contribute to the design and coding, and although I've been programming off-and-on for over 20 years, I've only been working in Lua and CC for just under two weeks. Though I'm definitely not the best coder out there, I'm definitely not the worst either. I'm piecing the last bits of GUI code on a "Logistics Pipes Inventory Dashboard" app I spun together out-of-need in my SSP world and once I've finished, I'll upload it to the Programs section and I'm sure you'll quickly gauge where my skills are at (whatever you think of them! =) )

I can't do it alone, though; the scale is simply too large when I have a job/family/etc to tend to, as well. Would anyone else around here be interested in working on a project like this?

If you're still reading up till this point, here are a couple of "idea extensions" I've thought of:
  • Blueprint Creation: hrm… not exactly sure about this one yet… any ideas? (for development, I was likely going to hand-code a sample array and serialize it to a file for loading as the blueprint)
  • Blueprint Acquisition: if we can get past the creation part, what if one of those "AppStore" ideas was implemented within the Manager app, except it would be a "BlueprintStore" where users could access a catalog of existing blueprints to download/build.
NeverCast #2
Posted 30 January 2013 - 02:53 PM
A similar thing has been done by nitrofingers.
Although not exactly how you describe. Look at it anyway.

Do a search for 3D Printer.
Orwell #3
Posted 30 January 2013 - 03:05 PM
I made a turtle program that prints schematic files. Like the ones you can use in WorldEdit or MCEdit. It uses only one turtle and is terribly outdated (it was designed for the 9 slots turtle, no fuel support yet, etc.). Also, it didn't really manage which spaces where empty and didn't require the turtle to move over there. But I promised I was going to patch it up, so you inspired me to support multi-turtle colaberation…

So if you want inspiration for the blueprint part, it could be useful to take a look at it: http://www.computercraft.info/forums2/index.php?/topic/1949-turtle-schematic-file-builder
Also, I wouldn't make the coordinates map to world coordinates. Turtles don't have to know where in the world they are. You could use a coordinate system that has his origin at the starting point of the first/master turtle.
PhilHibbs #4
Posted 31 January 2013 - 04:42 AM
Also, I wouldn't make the coordinates map to world coordinates. Turtles don't have to know where in the world they are. You could use a coordinate system that has his origin at the starting point of the first/master turtle.
Yes, world co-ordinates break the "fourth wall" in the same way that Block IDs do.
billysback #5
Posted 31 January 2013 - 05:19 AM
you mean like this:
http://www.computercraft.info/forums2/index.php?/topic/6226-3d-model-builder/
KillaVanilla #6
Posted 01 February 2013 - 02:35 PM
I suppose I could try and help. Be warned, though: I'm a very lazy person, and may not actually show up to help. I could help via github or such, though.
As for the turtle/job allocations, why not just use round-robin scheduling, instead of "strips"? The only problems I can see with this would be handling turtle-turtle collisions, which is (probably) trivial, and turtle-block collisions, which would be harder (perhaps designate a "clear area" job before building?)


Also, I don't think that is quite what he had in mind– wait yeah, that pretty much is what he had in mind, but with the possibility of adding more turtles.
Orwell #7
Posted 01 February 2013 - 02:52 PM
I suppose I could try and help. Be warned, though: I'm a very lazy person, and may not actually show up to help. I could help via github or such, though.
I can totally imagine you on a job interview. :lol:/>
ArcaniX5696 #8
Posted 01 February 2013 - 04:07 PM
Awesome! Thanks for pointing out some of the projects that have come before… I've not had as much time to play around with the laptop over the past couple of days, so wasn't able to really post up here.

I'll follow-up with an edit soon and a proper response.