Hey, thanks for watching! Sorry for the wait :) If you want to learn how to do this stuff yourself, contact me about private tutoring lessons at merlintutoring.com
You're doing brilliant things! It's a pity that the site is not working anymore, and there is almost no activity on the channel anymore... Bro, you're doing great stuff.
I can't help but keep thinking what could happen if you organized them like an ant hive. First one is hive queen and sets up the others, creating a dedicated sugarcane farmer, charcoal farmer and miners. Once it gathers enough resources, it makes a new queen that sets off to distant lands and starts anew 😄
i was thinking abaut a turtle hunter that has the goal of "deactivating" all the turtle, serching for dropped items and following all the tunnels that they make XD
It would be cool if you added code for the following: If it encounters a dead turtle, it deposits some fuel to bring it back to life. When collecting logs, it plants any saplings it may find. The option to make charcoal if it's near death and can't find coal in time.
@@oblivion_2852i see where the idea comes from, but really the relative scarcity of lava source blocks compared to coal’s abundance makes it harder to obtain fuel. keep in mind, i believe the turtle has a total sight of three blocks combined, so i wouldn’t count on it to be too intelligent!
If they could ALSO have chunk loaders, this could be extremely funny. Just imagine if you decide to fly away for 3000 block, start 4 there (to make sure the actually survive) and at some point the make their way back to spawn but in the hundreds.
@@panikking6012 A vonneumann probe is a spacecraft capable of self replication, generally in media it's things like the replicators from stargate, basically if you can send it somewhere and have it replicate endlessly it's a von-Neumann probe
You can make the sugarcane process a bit faster by making the turtle place down the collected sugarcane until its placed down 4 and then have it pick all of it back up
Genius! Totally didn't think of that, that's a great idea. I think you'd have one on each side of the turtle and then have the turtle spin forever checking if any had grown. Turning doesn't use fuel so it can just keep turning indefinitely. Ideas for v2.0!
Very cool! Suggestions to improve the success rate/reduce the need for initial ressources: 1. Turning doesn't cost fuel. So whenever the turtle is mining it should be turning in circles scanning all adjacent blocks for ressources. That way it has a high chance of finding coal on the way down to bedrock already, and it has a higher chance of finding diamonds/requires less fuel per diamond. 2. I think the point of the challenge is to have the turtle start with nothing. Otherwise you could simply give it dirt and a sapling and have it build a tree farm and fuel up until it has enough to be 99.999% successful. So maybe try to find the sugarcane aswell (I know that's hard, but it's only a question of having enough fuel) and the chest should be no problem since it has to find wood anyways. The turtle can just build a little hole and drop it's inventory into there and suck the items back up after crafting. 3. To increase chances of survival of the offspring, it would make sense for the parent to gather enough fuel to be able to venture into a new area after giving birth. That way the turtles wont fight for ressources.
Hey! I love hearing from someone who thinks about these things too... I should have talked more about this in the video, for me the challenge was a little different than just the self replicating. I also wanted the process to be as fast as possible while still having a comfortably >50% success rate, which may be why I didn't do some of these things: 1. Originally the program actually did exactly what you're describing, in fact I took it right from my Mastermine program (from a previous video) in which turtles look left and right. I was conflicted when I changed it, but my issue was time. BREAK-MOVE-LOOK is 2 time costing steps for 3 scanned blocks, whereas looking left and right is 6 for 5. As for when the turtle is going down to bedrock, you're absolutely right, it should be checking for ore and currently isn't. I could / should add. 2. It's funny, if you don't start the turtle with sugarcane it will look for it, and there's even some special instructions so that it will mine sugarcane from the top of the stock down. It isn't smart enough too look along riverbeds, so that's a possible improvement. Again, I cared more here about replication and time rather than starting with nothing, but it's just a matter of what you're optimizing for. 3. Since the turtles go in straight lines away from each other and in different directions (always 90 degrees off) they won't be fighting for resources for long. That said, the straight line approach has its drawbacks and my next iteration I think will be more area-based. Keep the suggestions coming because I'm always suiting up for the next project!
@@WizardNamedMerlin Hey! Thank you for the quick and thorough reply! Given that you were (at least secondarily) optimizing for time your approach makes perfect sense. An interesting metric could be to measure how big the turtle population can get in a certain amount of time. If we assume it doesn't die out, your balance between success and speed is probably not far from optimal (although both sides can still be improved on obviously). When writing I did think about your turtles travelling far distances once they reach diamond height and was wondering whether you made sure to always have them face into different directions. In that case that should work quite well although long-term the turtles will probably spread according to some gaussian-like distribution around the starting point, with a lot of starvation around the center. So I think an area-based approach like you suggested could improve long-term performance a lot. I'd be very interested if you find the time to implement something like that. Now that I know that you're optimizing for time I do have another suggestion though. I noticed that crafting takes a very long time. Although this can be imrpoved slightly (detecting matching crafting steps like making planks from logs and merging them into one) this wont change. However the turtle is also waiting a long time for sugarcane to grow. So I think it could save a minute to craft everything that can be crafted without paper while waiting. Another idea might be to use the waiting time to gather some more coal. Last idea for now, which might be against your philosophy: The turtles waste some fuel to figure out there level above bedrock. Especially when they end up having to gather coal before going back down to find diamonds. It would be a lot more efficient to gather coal first and then go down to find diamonds only once (unless extremely unlucky). To do that the turtle would need to know it's height before execution. Now I think it would be cheating to tell the first turtle. However to me it would be totally acceptable if a parent told it's child which height it is on. On could think of it as heritance. If you don't like that I understand. But if you don't have anything against it I think this would bring quite a big performance imrpovent. Cheers!
@@anonymousanon4822 Now you're speaking my language! I agree a good metric is turtle pop / game time, I'd like to see how different methods match up. And like you said, there are DEFINITELY ways to improve both on my design. xD gaussian-like distribution is hilarious, you're totally right. It's pretty theoretical since turtles cover such a large distance, but after x amount of time starvation would happen at the center. And there's another reason an area based approach would be better. After this video I found a way to make turtles load chunks the same way as players, as well as speeding them up with the carpet mod. Population actually did start rising exponentially (in terms of game time), but lag caused the time between ticks to drop which ironically caused roughly linear pop growth. So another thing to optimize for in terms of practicality would trying to load as few chunks as possible (area based). I might make a video about this at some point. Crafting while sugarcane is growing is a good idea too, cuz almost all of the crafting can be done without it. @angelomatulac3764 suggested placing new sugarcane once it grows too, and I feel like combining these two ideas could really cut down on total time. And as for your idea of y-position inheritance, I love it! The way the program is set up (if I remember right), turtles only go down to bedrock if they don't already know their position. So it would actually be a really easy change to make. The first turtle would go down and check, but every following turtle would be set. Not sure what's next for this project, but thanks for the ideas!
@@WizardNamedMerlin it might be worthwhile to allow turtles to both "inherit" and "prepare" by gathering more materials than they need, and passing some of those onto a second cycle, either the descendants, or the second iteration of the original
@@WizardNamedMerlin Might be a bit late, but i'm wondering how you managed to make turtles load chunks? Was this using a custom resource, or did you find some weird trick to make it work? I'm currently thinking about also programming self replicating turtles, with possibly way more advanced swarming behaviour in the future, but my main issue is loading chunks. I could use a mod that adds a chunk loader for turtles, but the main one i found uses ender eyes in the recipe, which is impossible for turtles to get since they can't travel through dimensions. I could change the recipe, purely for this, but if you found a better way of doing this i'd love to hear!
I saw a video where a guy programmed a turtle for tele operation outside of minecraft in essence being able to “hack” into a server. (Yes he was able to make more turtles he could control)
Yeah, that's a fantastic project by Ottomated: th-cam.com/video/pwKRbsDbxqc/w-d-xo.html That's one way to make self-replicating turtles, have them be human controlled!
Thanks! Yeah, I wanted to end the video with that but I had some trouble getting chunks to load properly. I'm still working on a solution and I think I'll find one soon.
@@WizardNamedMerlin I might be a little late with that. But just in case you still haven't found a solution for that. To prevent the unloading issue without any external mods I log everything in a file after every move and make the turtle read the file on startup to figure out where it left of. This obviously might be a lot of work to integrate into your code and it also means that they still won't work in unloaded chunks, but at least they won't be lost somewhere at the end of the world for all eternity. Btw the spiritual successor mod (Open Computers) has this as a built in feature. Drones keep their memories buffered in unloaded chunks and continue automatically where they left of, when the chunk gets loaded again.
Amazing! I would love to see this with chunk loaded turtles and using the carpet mod to tick warp to see how many turtles you can get within a certain time
Wouldn't that be cool? I wrote a data pack that would chunk load turtles, but it didn't work with crop growth so it broke when it got to sugarcane. I thought about trying the carpet mod (because it has chunk tick features), I'll look more into that.
if every turtle were to replicate in an hour, there would be 2^24 turtles in only 24 hours, or 16777216 turtles. if the game was on a super computer id love to try and play while they tear apart the world
How does the program react to unminable blocks? If it can handle them I think it could be cool to prepare a 1000x1000 "terrarium" with barrier block walls and elevated ore concentrations and watch them spread around and eventually deplete the coal and die out. Maybe have the turtles mine themselves (if that's possible) once they have no chance of regaining coal, or better yet, keep some coal to share with "dead" turtles they stumble upon. The project is very cool, you are like a wizard.
i am very surpised that this video only has ~1.3k views because this is so incredibly interesting and informative! i've seen something similar before but this is the first fully automatic one i've seen. thanks for making such an incredible video :)
This is extremely cool! It’s incredible to imagine what other behaviors the turtle could express throughout its life cycle, and how it could interact with players, I’ve never used this mod before so I don’t know how laggy it is, but I hope it runs well enough for complex behaviors and large populations to be possible
ive made turtles do massive quarries using shulkers for temporary storage and a bucket for lava, and it definitely increased the efficiency of them. i made them opportunistic and able to refuel on lava and coal. also, clearing across XZ or YZ at a time was much better at finding fuel than across XY. because of lava as fuel, the same algorithm also worked in the nether too :)
Thought about making something like this too but... didn't. I would have turtles have different roles - some would gather resources, other manage storage and craft items, other still collect fuel and supply refueling chests or even deliver it to the turtles that need it... Fun stuff.
Absolutely lovely. It's a shame you stopped making videos, there doesn't seem to be anything else on youtube that scratches quite the same itch that this video does. It's extremely cool and really inspiring.
this is something I want to accomplish with OpenComputers, although robots are considerably harder to build than turtles, and I'll probably need a power grid of sorts
This is a really cool project, it goes against the original principle, but a central base would make this far more reliable and practical. Ender chests can be used to send items back and forth to a central base where fuel would be grown, turtles would be crafted, floppy disks would be programmed, excess items would be offloaded, etc. This way, you wouldn't have to consider running out of fuel or the long wait time for sugar cane to grow, and the turtles could focus on producing resources or deploying new members. If you let it run for several hours while waiting for the turtles to duplicate enough, you could probably get one of the higher output mining machines in minecraft with like 100 turtles milling about near bedrock.
Oooooh, i'll definitely be giving this challenge a shot. I already have some ideas like a better algorithm to find ores, especially for the diamonds. This is really interesting.
Very interesting project! Lava would also be a great way to refuel. Question: How does the 2'nd turtle turn on and boot the program by itself? I'm a bit new to this mod. Maybe I missed something.
Good question, this is something I didn't know was possible until I wrote the program. Firstly, a turtle can boot an adjacent turtle/computer by calling for instance "peripheral.call('bottom', 'turnOn')". Secondly, when a computer boots, it will run any file labeled "startup" either in it's directory, or (importantly) on any disks that are connected. So all the first turtle has to do is copy it's code to a file called "startup" on the disk (with some extra code for unpacking the first time it's run), and then boot the second turtle, and the rest is automatic.
Dude! This is really cool and I was very sad to see you hadn't made more videos on this. Do you plan to expand the concept? I think this is super interesting :D
Fun fact I almost once made an opencomputers robot that was self-aware, but due to a bug it would constantly "learn" the same block over and over and over again causing it to fill its entire memory bank with "stone" I realized that it was impossible to differentiate things with the implementation that I used and it was cosmically hard to come up with one that did, so I just quit. Point is, this brings me back to the good old days of modded minecraft.
you could definitely make this more efficient if you add some logic of keeping some of the materials like the remaining paper so that the turtle could potentially make more than one turtle at once or not have to spend as much time the second time to make a turtle
Holy, this is amazing improvement suggestion: Instead of dumping resources that it doesn't need, it puts them in a chest and then picks them back up to help with the constructiuon of a new turtle
thats awesome i tryed doinh that in ftb lite back in the day but my turtles keept dying before they could gather enough materials i love how you solved the fuel problem this video honestly gibes me motivation to revive my old code agaim
responsiveness: reacts to blocks around it growth: you could view the sugar cane process as it "growing" the brain of its next of kin metabolism: poops out extraneous blocks energy transformation: uses fuel to power itself reproduction: creates a replica of itself
Cool video, bro. Have my subscribe! Waiting for another one witch you show us how many of them survived after a long time, how many will exists after a certain period, and how much minecraft supoorts until it crashes. xD
Thanks so much! I would love to make a video like that, and I'm currently working on solving the problem of loading in chunks around turtles. All the fun ways to crash Minecraft :)
Hey, this video is informative and I think there is a lack of content on youtube for this wonderful mod with so much potential. Full let's play with automation and various farms, tree farms, food farms, quarries, how to use turtles as companions in a survival game !
If you ever wanna try this again with opencomputers, the geolyzer can be installed and act as a little ground penetrating radar. Alternatively if you use wireless cards you can also have a central geolyzer scan the area then feed data to the hive.
Can you set area provisions and the ability to destroy structures? This has the capability to be an extremely difficult to counter directed grey goo weapon for use in faction servers
I'd love to see a version of this where the clone can have it's code randomly (or pseudorandomly) editted. Just starting it up and letting it run for a while would be cool
Now I'm wondering, are you able to set a limit for how many they make on their own and have them all return to the original position the first one was made so that you can wipe the code from the files and have a bunch of turtles? Also, love the mining code you made, just started using it and they are already proving how useful they are!
I’ve been wanting to try self replication for some time, but it never occurred to me to combine crafting and mining in one turtle. This is amazing. Only issue I have with the program is that the search runs in a straight line forever until it finds the ore or (more likely) runs out of loaded chunks. Would be great if it turned right occasionally. Maybe have it measure the distance from the last turn, turn when distance is greater than TURNDIST and increment TURNDIST.
I'm also planning on building something similar! Granted I was just going to run a websocket on an express server to give them all their commands to control them all with minimal lua :p Bonus suggestion: a preist turtle that delivers fuel to dead turtles to revive them! Granted that'd work better with the websocket so you know where they all are :)
You could definitely add a tree farm mode to vastly improve the turtles life span you would have the to give it a starter sapling and they could still starve if somthing dusrupts the farm or they get unlucky with sapling drops but this way there is a strain that is slow but can clean the arias others have already stripped the coal from. Similarly the turtle could carry a water bucket (or something even self upgrade) so it can grow shuger cane anywhere. And a truly industrious one could farm cobblestone but that seems unnecessary.
The turtles will have multiplied to expand their population’s sustainance to expand beyond the plain in which they were created. They will be so many that they have to move elsewhere to live. Eventually they will learn about the player and learn about how the player uses the precious resources that they use to multiply. The turtles will then work to eriadicate the human and end their wasteful ways. This is huge…
maybe have them use a partner to send resources back to base? I'd love for it to be more practical for survival but amazing nonetheless. Really feels like the turtle is just playing minecraft on it's own. Especially since it can "Die" and doesn't respawn so it builds more of itself to prevent that.
nice! i probably would've made them abit more oppertunistic tho. like farming more than just one sugarcane at a time and getting coal/iron/redstone/diamonds that it doesnt need also, what if the turtle parameters (like for item targets) were mutatable? like, just chuck all the mutatable parameters into a new json file, then mutate and send? so some new turtles just fail somewhere, while others get really successful.
On tekkit 2, when I put in the code, everything starts off working great, put in the coal, goes to next step, put in the chest and it checks the box, but putting in sugar canes doesn't seem to do anything. i replaced all the minecraft:sugarcane in the code with minecraft:reeds and that worked!
I can't think of how someone can get this amount of dedication for a minecraft project, the largest file i made for cc was only 700 lines, how much time did it take you to code this?
I would love this. It might be hard since wireless turtles need enderpearls for their modems, which are a bit of a task for turtles to farm. Still, worth looking into
Have you considered using lava as a fuel instead of coal? You wouldn’t have to go up to coal level when you were running low on fuel, and in addition you could actually get infinite fuel if you kept a full lava bucket, a single piece of dripstone, and a cauldron on the turtle at all times. Dripstone dripping lava over a cauldron produces infinite lava buckets, albeit very slowly, and you can place that down anywhere that’s not underwater. The downside of this is the turtle would have to find dripstone to duplicate itself, but dripstone caves are not actually particularly rare. It also seems like it’d be a surer bet to have the turtle keep a sapling around to get the wood rather than searching out naturally existing trees. You could actually do this at the same time as it’s waiting for the sugar cane to grow by putting a sapling on one side of it and a sugar cane on the other. Then the only time you’d depend on the surface biome is for sand. You need to be mindful because the turtle has limited inventory slots, obviously, but you’d only need to hold about 4 extra items and it looks like you have the slots open for that.
ottomated made a websocket that lets him connect to servers and play as a turtle without being whitelisted, this seems like a program that would be perfect to be packaged along side it
My ideas of self replicating turtles solved the problem of fuel going on the lines of "Consume anything and everything that burns" lol It was kinda the idea to destruct the entire world anyways so i never had to bother with tree farms, it was supposed to consume the forests anyway
I wrote a datapack to load chunks (github.com/merlinlikethewizard/tchunk) but yes, if they get unloaded right now there's no saved state. Some room for future improvement...
Yeah, it's a good point and you're totally right, it would improve the success / fail rate a good amount. The reason I didn't was because I also wanted replication to be fast, and looking left/right would have slowed it down a bit. Actually in my original mining program they did exactly this and it worked pretty well. As I keep working on autonomous turtle projects I'm noticing that there are a lot of different approaches and it's all about the trade-offs
@@WizardNamedMerlinI was also thinking about chunk loading. Is this program capable of recovering from interruption by having chunks unloaded and reloaded?
Hi, so you went over how coal was the main fuel in the turtles, but what if the turtles had a subroutine to build tree farms about 10 blocks above bedrock? I mean it isnt helpful to us as the player if all little asdfghj jr does is dig in straight lines and turn lava lakes into obsidian. I mean it passes the test of self replication, but with the right structure, it could be much more
I always think it's crazy when people can get something built with thousands of lines of code. I'm just learning as a hobby and thinking about that hurts my head. I work in IT but on servers and networks. I'm not a programmer. I like to tinker and learn things tho so programming always interests me. I've wrote simple programs in CC but I can't imagine 6k lines of code.
Great question! The turtle keeps several items for the next generation that it won't have to remake (e.g. glass panes). The reason it throws away some things is that if it keeps too many it will fill all 16 slots of its inventory and not be able to mine other necessary materials. I tried to find a balance between keeping hard-to-find things and keeping inventory space open.
@@WizardNamedMerlin I see it throwing away paper and I thinks that very weird because paper was the hardest item to get in my opinion. But what items did you choose to keep and why?
Great video! I have a couple of technical questions. I noticed that crops are growing even while you're in spectator mode. Is that a function of turtles themselves? Also, do they self load chunks, or is a player required? I mostly play vanilla, so sorry if this seems obvious. 😅
Actually these are great questions! I wrote a datapack for chunk-loading turtles (github.com/merlinlikethewizard/tchunk) that basically makes an area effect cloud which follows them around loading chunks as they go. I also use a fabric mod called TickTock that causes random ticks in forceloaded chunks, otherwise plants wouldn't grow even if the chunk was loaded.
I like that idea! In future projects I'm hoping to have wireless replicating turtles (a little more difficult), and maybe they could gps track to find fallen brethren :)
Sorry that this isn't related to the video, but I'm struggling with mastermine. The turtles seemingly go offline in 1.18+ after reaching a certain depth, looks like around y=13? Unsure at the exact depth. I'm not sure how to code so I have no idea how to fix it, if you're able to make it work it'd be awesome, Thanks! Edit: It can also seemingly get stuck calibrating the turtles
Yeah, sorry I've been away from the Mastermine project for a bit. My guess is because I wrote it in 1.16 I didn't protect against negative y values, so when it drops below 0 it breaks. Seems like a problem multiple people are having, so I'll go take a look at the code soon. Thanks for letting me know!
it would be cool if the program made sure it does not move away too far from its starting location and all the children dont either. then you can just have an area being overrun with them while right now they will move out of render distance
Maybe put a special line of code to automatically return back to the surface, and shut down (or even go back to a base where it would be dissassembled.)
Hey, thanks for watching! Sorry for the wait :)
If you want to learn how to do this stuff yourself, contact me about private tutoring lessons at merlintutoring.com
You're doing brilliant things! It's a pity that the site is not working anymore, and there is almost no activity on the channel anymore... Bro, you're doing great stuff.
Hey do you still do this computer craft tutoring? I have an turtle project that may be interesting to discuss
I wonder... could you do Robologenesis for Opencomupter's robots?
I would've loved to see a timelapse of exponential turtle expansion! Shame it seems your gone from your channel.
Website is down now, sadly
I can't help but keep thinking what could happen if you organized them like an ant hive. First one is hive queen and sets up the others, creating a dedicated sugarcane farmer, charcoal farmer and miners. Once it gathers enough resources, it makes a new queen that sets off to distant lands and starts anew 😄
This is sick
SkynetCraft
I'm going to do this now, cool idea
@@UnknownGamer40464RTSCraft
i was thinking abaut a turtle hunter that has the goal of "deactivating" all the turtle, serching for dropped items and following all the tunnels that they make XD
It would be cool if you added code for the following:
If it encounters a dead turtle, it deposits some fuel to bring it back to life.
When collecting logs, it plants any saplings it may find.
The option to make charcoal if it's near death and can't find coal in time.
on that note, anytime it sees coal or other fuel source it should take it. like near the end of vid the final 2 go right past some coal and ignore it
The odds of one encountering another dead turtle is like next to 0
@@Zero-4793wouldn't an easy option just be to have the turtle craft a bucket? Or can't turtles use buckets on lava?
@@oblivion_2852i see where the idea comes from, but really the relative scarcity of lava source blocks compared to coal’s abundance makes it harder to obtain fuel. keep in mind, i believe the turtle has a total sight of three blocks combined, so i wouldn’t count on it to be too intelligent!
@@emilianozamora399 But given deep time, it's very possible.
If they could ALSO have chunk loaders, this could be extremely funny.
Just imagine if you decide to fly away for 3000 block, start 4 there (to make sure the actually survive) and at some point the make their way back to spawn but in the hundreds.
lag
@@kajetus0688shouldn't be too bad, i think
@@hisamiyomotsu1337depends on how fast they reproduce but surely there would be lag at some point.
I'd really love to watch the exponential growth in a big ol' timelapse.
Congratulations! You have made a VonNeumann probe.
Can you explain this to me? It sounds funny i just don't know enough.
@@panikking6012 A vonneumann probe is a spacecraft capable of self replication, generally in media it's things like the replicators from stargate, basically if you can send it somewhere and have it replicate endlessly it's a von-Neumann probe
The sylandro: "We come in peace!"
Loved the video, honestly I felt like I was watching a Discovery Channel documentary about wild life. I'd never seen a CCTurtle giving birth before.
You can make the sugarcane process a bit faster by making the turtle place down the collected sugarcane until its placed down 4 and then have it pick all of it back up
Genius! Totally didn't think of that, that's a great idea. I think you'd have one on each side of the turtle and then have the turtle spin forever checking if any had grown. Turning doesn't use fuel so it can just keep turning indefinitely. Ideas for v2.0!
I've dreamed of building self replicating turtles -I'm glad to see others more dedicated than I am have made it a reality
Very cool!
Suggestions to improve the success rate/reduce the need for initial ressources:
1. Turning doesn't cost fuel. So whenever the turtle is mining it should be turning in circles scanning all adjacent blocks for ressources. That way it has a high chance of finding coal on the way down to bedrock already, and it has a higher chance of finding diamonds/requires less fuel per diamond.
2. I think the point of the challenge is to have the turtle start with nothing. Otherwise you could simply give it dirt and a sapling and have it build a tree farm and fuel up until it has enough to be 99.999% successful. So maybe try to find the sugarcane aswell (I know that's hard, but it's only a question of having enough fuel) and the chest should be no problem since it has to find wood anyways. The turtle can just build a little hole and drop it's inventory into there and suck the items back up after crafting.
3. To increase chances of survival of the offspring, it would make sense for the parent to gather enough fuel to be able to venture into a new area after giving birth. That way the turtles wont fight for ressources.
Hey! I love hearing from someone who thinks about these things too...
I should have talked more about this in the video, for me the challenge was a little different than just the self replicating. I also wanted the process to be as fast as possible while still having a comfortably >50% success rate, which may be why I didn't do some of these things:
1. Originally the program actually did exactly what you're describing, in fact I took it right from my Mastermine program (from a previous video) in which turtles look left and right. I was conflicted when I changed it, but my issue was time. BREAK-MOVE-LOOK is 2 time costing steps for 3 scanned blocks, whereas looking left and right is 6 for 5. As for when the turtle is going down to bedrock, you're absolutely right, it should be checking for ore and currently isn't. I could / should add.
2. It's funny, if you don't start the turtle with sugarcane it will look for it, and there's even some special instructions so that it will mine sugarcane from the top of the stock down. It isn't smart enough too look along riverbeds, so that's a possible improvement. Again, I cared more here about replication and time rather than starting with nothing, but it's just a matter of what you're optimizing for.
3. Since the turtles go in straight lines away from each other and in different directions (always 90 degrees off) they won't be fighting for resources for long. That said, the straight line approach has its drawbacks and my next iteration I think will be more area-based.
Keep the suggestions coming because I'm always suiting up for the next project!
@@WizardNamedMerlin Hey! Thank you for the quick and thorough reply! Given that you were (at least secondarily) optimizing for time your approach makes perfect sense. An interesting metric could be to measure how big the turtle population can get in a certain amount of time. If we assume it doesn't die out, your balance between success and speed is probably not far from optimal (although both sides can still be improved on obviously).
When writing I did think about your turtles travelling far distances once they reach diamond height and was wondering whether you made sure to always have them face into different directions. In that case that should work quite well although long-term the turtles will probably spread according to some gaussian-like distribution around the starting point, with a lot of starvation around the center. So I think an area-based approach like you suggested could improve long-term performance a lot. I'd be very interested if you find the time to implement something like that.
Now that I know that you're optimizing for time I do have another suggestion though. I noticed that crafting takes a very long time. Although this can be imrpoved slightly (detecting matching crafting steps like making planks from logs and merging them into one) this wont change. However the turtle is also waiting a long time for sugarcane to grow. So I think it could save a minute to craft everything that can be crafted without paper while waiting. Another idea might be to use the waiting time to gather some more coal.
Last idea for now, which might be against your philosophy: The turtles waste some fuel to figure out there level above bedrock. Especially when they end up having to gather coal before going back down to find diamonds. It would be a lot more efficient to gather coal first and then go down to find diamonds only once (unless extremely unlucky). To do that the turtle would need to know it's height before execution. Now I think it would be cheating to tell the first turtle. However to me it would be totally acceptable if a parent told it's child which height it is on. On could think of it as heritance. If you don't like that I understand. But if you don't have anything against it I think this would bring quite a big performance imrpovent.
Cheers!
@@anonymousanon4822 Now you're speaking my language! I agree a good metric is turtle pop / game time, I'd like to see how different methods match up. And like you said, there are DEFINITELY ways to improve both on my design. xD gaussian-like distribution is hilarious, you're totally right. It's pretty theoretical since turtles cover such a large distance, but after x amount of time starvation would happen at the center.
And there's another reason an area based approach would be better. After this video I found a way to make turtles load chunks the same way as players, as well as speeding them up with the carpet mod. Population actually did start rising exponentially (in terms of game time), but lag caused the time between ticks to drop which ironically caused roughly linear pop growth. So another thing to optimize for in terms of practicality would trying to load as few chunks as possible (area based). I might make a video about this at some point.
Crafting while sugarcane is growing is a good idea too, cuz almost all of the crafting can be done without it. @angelomatulac3764 suggested placing new sugarcane once it grows too, and I feel like combining these two ideas could really cut down on total time.
And as for your idea of y-position inheritance, I love it! The way the program is set up (if I remember right), turtles only go down to bedrock if they don't already know their position. So it would actually be a really easy change to make. The first turtle would go down and check, but every following turtle would be set.
Not sure what's next for this project, but thanks for the ideas!
@@WizardNamedMerlin it might be worthwhile to allow turtles to both "inherit" and "prepare" by gathering more materials than they need, and passing some of those onto a second cycle, either the descendants, or the second iteration of the original
@@WizardNamedMerlin Might be a bit late, but i'm wondering how you managed to make turtles load chunks? Was this using a custom resource, or did you find some weird trick to make it work? I'm currently thinking about also programming self replicating turtles, with possibly way more advanced swarming behaviour in the future, but my main issue is loading chunks. I could use a mod that adds a chunk loader for turtles, but the main one i found uses ender eyes in the recipe, which is impossible for turtles to get since they can't travel through dimensions. I could change the recipe, purely for this, but if you found a better way of doing this i'd love to hear!
I saw a video where a guy programmed a turtle for tele operation outside of minecraft in essence being able to “hack” into a server. (Yes he was able to make more turtles he could control)
Yeah, that's a fantastic project by Ottomated: th-cam.com/video/pwKRbsDbxqc/w-d-xo.html
That's one way to make self-replicating turtles, have them be human controlled!
@@WizardNamedMerlin pretty sure he did implement ability for turtle to autonomously reproduce
this is really cool! would love to see a timelapse of how quickly they can replicate
Thanks! Yeah, I wanted to end the video with that but I had some trouble getting chunks to load properly. I'm still working on a solution and I think I'll find one soon.
@@WizardNamedMerlin idk if you'd consider it cheating but you could use one of those mods that adds a chunk loader?
@@WizardNamedMerlin I might be a little late with that. But just in case you still haven't found a solution for that. To prevent the unloading issue without any external mods I log everything in a file after every move and make the turtle read the file on startup to figure out where it left of. This obviously might be a lot of work to integrate into your code and it also means that they still won't work in unloaded chunks, but at least they won't be lost somewhere at the end of the world for all eternity. Btw the spiritual successor mod (Open Computers) has this as a built in feature. Drones keep their memories buffered in unloaded chunks and continue automatically where they left of, when the chunk gets loaded again.
@@WizardNamedMerlin so unfortunate you didn't get around to doing this, it sounds so entertaining
@@BobDawgs Yesterday he updated his Github page about chunk loading, he might still be working on it!
Amazing! I would love to see this with chunk loaded turtles and using the carpet mod to tick warp to see how many turtles you can get within a certain time
Wouldn't that be cool? I wrote a data pack that would chunk load turtles, but it didn't work with crop growth so it broke when it got to sugarcane. I thought about trying the carpet mod (because it has chunk tick features), I'll look more into that.
@@WizardNamedMerlin Keep me updated!
It might also work to just restrict the world border to render distance
Crops only grow around the player, the chunk being loaded is not the only requirement
Bro really looked at a turtle and said "AY, Go craft yaself"
And it bloody did
So you are telling me, you created a self replicating gray goo, that can create clones by it self? Because that would be insanely cool and impressive
if every turtle were to replicate in an hour, there would be 2^24 turtles in only 24 hours, or 16777216 turtles. if the game was on a super computer id love to try and play while they tear apart the world
@@thepizzaguy8477 holy shit. Yes
@@thepizzaguy8477 16777216! That's my favorite number!
@@WizardNamedMerlin neat
@@WizardNamedMerlin how do I get it to come back home?
How does the program react to unminable blocks? If it can handle them I think it could be cool to prepare a 1000x1000 "terrarium" with barrier block walls and elevated ore concentrations and watch them spread around and eventually deplete the coal and die out. Maybe have the turtles mine themselves (if that's possible) once they have no chance of regaining coal, or better yet, keep some coal to share with "dead" turtles they stumble upon.
The project is very cool, you are like a wizard.
I love everything about this :) ideas for the future... 🧙
i am very surpised that this video only has ~1.3k views because this is so incredibly interesting and informative! i've seen something similar before but this is the first fully automatic one i've seen. thanks for making such an incredible video :)
using old textures? BASED
This is extremely cool! It’s incredible to imagine what other behaviors the turtle could express throughout its life cycle, and how it could interact with players, I’ve never used this mod before so I don’t know how laggy it is, but I hope it runs well enough for complex behaviors and large populations to be possible
ive made turtles do massive quarries using shulkers for temporary storage and a bucket for lava, and it definitely increased the efficiency of them. i made them opportunistic and able to refuel on lava and coal.
also, clearing across XZ or YZ at a time was much better at finding fuel than across XY. because of lava as fuel, the same algorithm also worked in the nether too :)
Thought about making something like this too but... didn't. I would have turtles have different roles - some would gather resources, other manage storage and craft items, other still collect fuel and supply refueling chests or even deliver it to the turtles that need it... Fun stuff.
Absolutely lovely. It's a shame you stopped making videos, there doesn't seem to be anything else on youtube that scratches quite the same itch that this video does. It's extremely cool and really inspiring.
this is something I want to accomplish with OpenComputers, although robots are considerably harder to build than turtles, and I'll probably need a power grid of sorts
omg imagine adding parameters for each of the turtles and having the parameters slightly change per generation mimicking evolution
Super relevant. I just finished reading the Bobiverse series. Now I want to make a network on these.
This is a really cool project, it goes against the original principle, but a central base would make this far more reliable and practical. Ender chests can be used to send items back and forth to a central base where fuel would be grown, turtles would be crafted, floppy disks would be programmed, excess items would be offloaded, etc. This way, you wouldn't have to consider running out of fuel or the long wait time for sugar cane to grow, and the turtles could focus on producing resources or deploying new members.
If you let it run for several hours while waiting for the turtles to duplicate enough, you could probably get one of the higher output mining machines in minecraft with like 100 turtles milling about near bedrock.
Oooooh, i'll definitely be giving this challenge a shot. I already have some ideas like a better algorithm to find ores, especially for the diamonds. This is really interesting.
Very interesting project!
Lava would also be a great way to refuel.
Question: How does the 2'nd turtle turn on and boot the program by itself? I'm a bit new to this mod. Maybe I missed something.
Good question, this is something I didn't know was possible until I wrote the program. Firstly, a turtle can boot an adjacent turtle/computer by calling for instance "peripheral.call('bottom', 'turnOn')". Secondly, when a computer boots, it will run any file labeled "startup" either in it's directory, or (importantly) on any disks that are connected. So all the first turtle has to do is copy it's code to a file called "startup" on the disk (with some extra code for unpacking the first time it's run), and then boot the second turtle, and the rest is automatic.
@@WizardNamedMerlin Thank you for answering! Now it is all clear.
This reminds me of the dude who made a remote-control turtle to get onto a server without getting whitelisted
A tip, f3+n can be used to quickly swap between spectator and creative mode
Dude, you're an absolute genius
Dude! This is really cool and I was very sad to see you hadn't made more videos on this. Do you plan to expand the concept? I think this is super interesting :D
Fun fact I almost once made an opencomputers robot that was self-aware, but due to a bug it would constantly "learn" the same block over and over and over again causing it to fill its entire memory bank with "stone" I realized that it was impossible to differentiate things with the implementation that I used and it was cosmically hard to come up with one that did, so I just quit.
Point is, this brings me back to the good old days of modded minecraft.
you could definitely make this more efficient if you add some logic of keeping some of the materials like the remaining paper so that the turtle could potentially make more than one turtle at once or not have to spend as much time the second time to make a turtle
Holy, this is amazing
improvement suggestion:
Instead of dumping resources that it doesn't need, it puts them in a chest and then picks them back up to help with the constructiuon of a new turtle
thats awesome i tryed doinh that in ftb lite back in the day but my turtles keept dying before they could gather enough materials i love how you solved the fuel problem this video honestly gibes me motivation to revive my old code agaim
reminds me of ottomated's video! neat! thanks for sharing
that's an interesting thing you did, Merlinlikethewizard
wait
For a reliable fuel source, I am intrigued by kelp. Spreading an endless kelp ocean to harvest as it goes has so much potential.
now we need that very industrial music in the background with a long timelapse and boom, world domination by turtles!
My God, freaking wizard with technology you are.
this remind me about self-replicating slylandro drones from SC2
responsiveness: reacts to blocks around it
growth: you could view the sugar cane process as it "growing" the brain of its next of kin
metabolism: poops out extraneous blocks
energy transformation: uses fuel to power itself
reproduction: creates a replica of itself
Cool video, bro. Have my subscribe!
Waiting for another one witch you show us how many of them survived after a long time, how many will exists after a certain period, and how much minecraft supoorts until it crashes. xD
Thanks so much! I would love to make a video like that, and I'm currently working on solving the problem of loading in chunks around turtles. All the fun ways to crash Minecraft :)
Hey, this video is informative and I think there is a lack of content on youtube for this wonderful mod with so much potential. Full let's play with automation and various farms, tree farms, food farms, quarries, how to use turtles as companions in a survival game !
If you ever wanna try this again with opencomputers, the geolyzer can be installed and act as a little ground penetrating radar. Alternatively if you use wireless cards you can also have a central geolyzer scan the area then feed data to the hive.
The grey goo is inevitable.
(btw, you can do F3+N to toggle spectator mode)
Is that a worldbox reference?
wouldn't it be more efferent to keep the leftover items it will need rather than dumping the leftovers?
probably, but it would be more complicated to program
Can you set area provisions and the ability to destroy structures? This has the capability to be an extremely difficult to counter directed grey goo weapon for use in faction servers
I'd love to see a version of this where the clone can have it's code randomly (or pseudorandomly) editted. Just starting it up and letting it run for a while would be cool
Ive always considered doing something like this but never made it into actuality. Theres some very nice coding going on here! Nice job!
Now I'm wondering, are you able to set a limit for how many they make on their own and have them all return to the original position the first one was made so that you can wipe the code from the files and have a bunch of turtles? Also, love the mining code you made, just started using it and they are already proving how useful they are!
I’ve been wanting to try self replication for some time, but it never occurred to me to combine crafting and mining in one turtle. This is amazing. Only issue I have with the program is that the search runs in a straight line forever until it finds the ore or (more likely) runs out of loaded chunks. Would be great if it turned right occasionally. Maybe have it measure the distance from the last turn, turn when distance is greater than TURNDIST and increment TURNDIST.
this is inspiring me to make a turtle colonization AI thingy using ComputerCraft
I'm also planning on building something similar! Granted I was just going to run a websocket on an express server to give them all their commands to control them all with minimal lua :p
Bonus suggestion: a preist turtle that delivers fuel to dead turtles to revive them! Granted that'd work better with the websocket so you know where they all are :)
It's turtles all the way down.
You could definitely add a tree farm mode to vastly improve the turtles life span you would have the to give it a starter sapling and they could still starve if somthing dusrupts the farm or they get unlucky with sapling drops but this way there is a strain that is slow but can clean the arias others have already stripped the coal from.
Similarly the turtle could carry a water bucket (or something even self upgrade) so it can grow shuger cane anywhere. And a truly industrious one could farm cobblestone but that seems unnecessary.
now it's only a matter of time until someone uses turtles to make Grey Goo
Well done on making grey goo!
Very cool! I remeber seeing someone do it on the OTVserver too :-)
What if the copying process was randomized? Like maybe some variables can change and get better overtime
itd be pretty cool if turtles could communicate and share resources!
I think a chunk loader would be cool, but could be tricky to craft. you can also switch tools from the inventory.
The turtles will have multiplied to expand their population’s sustainance to expand beyond the plain in which they were created. They will be so many that they have to move elsewhere to live. Eventually they will learn about the player and learn about how the player uses the precious resources that they use to multiply. The turtles will then work to eriadicate the human and end their wasteful ways.
This is huge…
Is there anyway to keep track of them, such as which generation they're apart of and how many other turtles they've created? Great work!
maybe have them use a partner to send resources back to base? I'd love for it to be more practical for survival but amazing nonetheless. Really feels like the turtle is just playing minecraft on it's own. Especially since it can "Die" and doesn't respawn so it builds more of itself to prevent that.
You basically just created the grey goo.
nice! i probably would've made them abit more oppertunistic tho. like farming more than just one sugarcane at a time and getting coal/iron/redstone/diamonds that it doesnt need
also, what if the turtle parameters (like for item targets) were mutatable? like, just chuck all the mutatable parameters into a new json file, then mutate and send? so some new turtles just fail somewhere, while others get really successful.
You made gray goo in Minecraft? Aweosme!
Give them chunk loaders and then leave it running a few weeks! CraftyMiningChunkload Turtles!
Can you release the "tfollow" pack
Boom! github.com/merlinlikethewizard/tfollow
Thanks! Sorry I only noticed now!
On tekkit 2, when I put in the code, everything starts off working great, put in the coal, goes to next step, put in the chest and it checks the box, but putting in sugar canes doesn't seem to do anything. i replaced all the minecraft:sugarcane in the code with minecraft:reeds and that worked!
thank you bro im trying to fix it
I can't think of how someone can get this amount of dedication for a minecraft project, the largest file i made for cc was only 700 lines, how much time did it take you to code this?
I think a cool function would be to have a call button that tells all the turtles with this code to travel to a specific location.
I would love this. It might be hard since wireless turtles need enderpearls for their modems, which are a bit of a task for turtles to farm. Still, worth looking into
Bro made a Von Neumann turtle, amazing
Have you considered using lava as a fuel instead of coal? You wouldn’t have to go up to coal level when you were running low on fuel, and in addition you could actually get infinite fuel if you kept a full lava bucket, a single piece of dripstone, and a cauldron on the turtle at all times. Dripstone dripping lava over a cauldron produces infinite lava buckets, albeit very slowly, and you can place that down anywhere that’s not underwater. The downside of this is the turtle would have to find dripstone to duplicate itself, but dripstone caves are not actually particularly rare.
It also seems like it’d be a surer bet to have the turtle keep a sapling around to get the wood rather than searching out naturally existing trees. You could actually do this at the same time as it’s waiting for the sugar cane to grow by putting a sapling on one side of it and a sugar cane on the other. Then the only time you’d depend on the surface biome is for sand. You need to be mindful because the turtle has limited inventory slots, obviously, but you’d only need to hold about 4 extra items and it looks like you have the slots open for that.
ottomated made a websocket that lets him connect to servers and play as a turtle without being whitelisted, this seems like a program that would be perfect to be packaged along side it
My ideas of self replicating turtles solved the problem of fuel going on the lines of "Consume anything and everything that burns" lol
It was kinda the idea to destruct the entire world anyways so i never had to bother with tree farms, it was supposed to consume the forests anyway
Survival of the Fittest: Turtle Edition
"There are lots of things that can go wrong here" Ah yes, the most accurate phrase I've heard from programmers.
Awesome video. How do turtles work with chunk loading? Do they load themselves? If they dont and become unloaded, do they maintain their state?
I wrote a datapack to load chunks (github.com/merlinlikethewizard/tchunk) but yes, if they get unloaded right now there's no saved state. Some room for future improvement...
Apologies if this has already been said, but turtles rotating doesn't use fuel. It could mine more efficiently by checking everywhere around it.
Yeah, it's a good point and you're totally right, it would improve the success / fail rate a good amount. The reason I didn't was because I also wanted replication to be fast, and looking left/right would have slowed it down a bit. Actually in my original mining program they did exactly this and it worked pretty well. As I keep working on autonomous turtle projects I'm noticing that there are a lot of different approaches and it's all about the trade-offs
@@WizardNamedMerlinI was also thinking about chunk loading. Is this program capable of recovering from interruption by having chunks unloaded and reloaded?
Hey Merlin! Been a fan of your work for awhile man, I have a project that's computer craft related you might be interested in!
A project you say? Lemme know the deets! You can find my email on my site: merlintutoring.com
Hi, so you went over how coal was the main fuel in the turtles, but what if the turtles had a subroutine to build tree farms about 10 blocks above bedrock? I mean it isnt helpful to us as the player if all little asdfghj jr does is dig in straight lines and turn lava lakes into obsidian. I mean it passes the test of self replication, but with the right structure, it could be much more
It can determine it's y level based on the deepslate, also it should place down the second sugar cane to grow
Also why the hell does it throw out excess resources
I always think it's crazy when people can get something built with thousands of lines of code. I'm just learning as a hobby and thinking about that hurts my head.
I work in IT but on servers and networks. I'm not a programmer. I like to tinker and learn things tho so programming always interests me. I've wrote simple programs in CC but I can't imagine 6k lines of code.
Thanks TH-cam for showing me this 2 years later
I really want to see a timelapse of a set size world box get eaten by these, then watch them quickly drop in population as the resources get drained
Why does it throw away the items while crafting that can be used for a next generation?
Great question! The turtle keeps several items for the next generation that it won't have to remake (e.g. glass panes). The reason it throws away some things is that if it keeps too many it will fill all 16 slots of its inventory and not be able to mine other necessary materials. I tried to find a balance between keeping hard-to-find things and keeping inventory space open.
@@WizardNamedMerlin I see it throwing away paper and I thinks that very weird because paper was the hardest item to get in my opinion. But what items did you choose to keep and why?
Great video! I have a couple of technical questions. I noticed that crops are growing even while you're in spectator mode. Is that a function of turtles themselves? Also, do they self load chunks, or is a player required? I mostly play vanilla, so sorry if this seems obvious. 😅
Actually these are great questions! I wrote a datapack for chunk-loading turtles (github.com/merlinlikethewizard/tchunk) that basically makes an area effect cloud which follows them around loading chunks as they go. I also use a fabric mod called TickTock that causes random ticks in forceloaded chunks, otherwise plants wouldn't grow even if the chunk was loaded.
Lol can you make the living turtles refuel the dead ones if they find the dead ones?
I like that idea! In future projects I'm hoping to have wireless replicating turtles (a little more difficult), and maybe they could gps track to find fallen brethren :)
@@WizardNamedMerlin Very cool stuff. keep making these crazy designs!
Looks amazing though i feel compelled to ask how it handles the Ocean in the context of gathering coal
Will this work on older versions before the cave update?
Sorry that this isn't related to the video, but I'm struggling with mastermine. The turtles seemingly go offline in 1.18+ after reaching a certain depth, looks like around y=13? Unsure at the exact depth. I'm not sure how to code so I have no idea how to fix it, if you're able to make it work it'd be awesome, Thanks!
Edit: It can also seemingly get stuck calibrating the turtles
Yeah, sorry I've been away from the Mastermine project for a bit. My guess is because I wrote it in 1.16 I didn't protect against negative y values, so when it drops below 0 it breaks. Seems like a problem multiple people are having, so I'll go take a look at the code soon. Thanks for letting me know!
Do turtles no longer accept lava as fuel? I haven't really touched CC in like 6-8? years.
it would be cool if the program made sure it does not move away too far from its starting location and all the children dont either. then you can just have an area being overrun with them while right now they will move out of render distance
Is there a reason you did not use the Inventory API to retrieve specific slots from chests?
I whant a 10h long video of this so satisfying to se them multiply lol
Maybe put a special line of code to automatically return back to the surface, and shut down (or even go back to a base where it would be dissassembled.)
Why not have them keep the surplus paper and iron etc to put toward the next reproduction cycle?