Self-Replicating Turtle - Revisited
#61
Posted 01 July 2014 - 02:14 PM
#62
Posted 01 July 2014 - 03:01 PM
Keep in mind, if the player doesn't move very much (sits still), turtles can move infinitely in any direction with no problems.
Looking forward, I'd love to see the one or two new turtles fueled up to the max, given a starting inventory, and then sent off into the wild, seeking a suitable place to replicate again! For purity, the program could be identical to its parent, but having a given inventory would simplify derivative generations. Perhaps send Miner2 in one direction and the parent in the opposite direction, while Miner3, if it exists, does something like tree farming. A fractal pattern could be made so children don't tread on old ground.
#63
Posted 01 July 2014 - 03:22 PM
#64
Posted 02 July 2014 - 04:12 AM
It doesn't seem to have actually found the birch trees that were nearby. It never bothered the chunkloader either, but I placed it a few blocks above the starting tree like the original thread specified, with an air gap.
Edit: I saw it break the torch marker for a mine again. It's placing the torch, then reinforcing the entrance which breaks the block the torch is on.
The diamond mine sign in the back says Level 2, sector 5. And it's hard to see because of the sign, I just realized, but it did make 2 turtles.
Edited by Beeskee, 02 July 2014 - 08:10 AM.
#65
Posted 02 July 2014 - 06:44 AM
Thanks for posting the pic of the completed run. I am puzzled why it did not get the birch trees, and why the mine entrance gets trashed.
Could you post the seed of your world, the coordinates of both the sugar cane and the tree you start from, and the direction you are facing.
I am already working on allowing use on a server, and could incorporate these bug fixes at the same time.
@Buho
I did start on making an enhanced version with ideas similar to those you suggested, but I am a bit short on spare time at the moment.
Edited by Inksaver, 02 July 2014 - 06:46 AM.
#66
Posted 02 July 2014 - 07:45 AM
The mine entrance thing happens several times early on during the first run.
Seed: -737401980332805217 - be advised, if you use just the seed, the starting spot is unsuitable. I built up the tree and planted sugar cane manually in creative mode. The world save below was edited to make the area more suitable. It didn't need much work.
x=-156 y=65 z=197 facing west - starting spot - I can't get the sugar cane coordinates, I'm doing another test run and the originals were harvested, but it was very close by and the replicating turtle found that just fine. The save I made shows everything though:
World save from just before start
Logs from the first run
I made a backup before I began. The world save is from just before the start, the only thing that needs to be done is to download the program onto the already-placed turtle, and set a label on it.
The only mods were ComputerCraft 1.63, ChickenChunks 1.3.3.4 for the chunk loader, CodeChickenCore 0.9.0.9 which is a library needed for chunk loader, and NotEnoughItems 1.6.1.9.
There is a placed chunkloader so you'll need that mod if you don't have it. Let me know if it's a problem and I can make a copy of the starting save with the chunk loader removed.
Edit: Spotted another thing as I was watching the second run end, the turtle sucks up a bunch of redstone from the storage chest and then dumps most of it on the ground to decay, during the part of the process where it is constructing the new turtles. Oops (You already won, this is for the "bribe the player with resources" bonus now, btw. And again this is amazing, I love it.)
Second run:
Ended with 5 spare diamond Run 1 had 3 spare diamond. No gold this time tho. ~4-5 hours. Logs
My suggestion for the endgame is to place the turtles off to the side and include a mini tree farm program or mining program or whatever, based off your existing code, designed to use the unused area the turtle is conveniently facing. Then the main turtle can optionally continue mining.
And speaking of "won", I dunno if the original person is still around, but I'd love to get you some prize or something for completing this.
3rd run glitch: x=-123 y=65 z=149 facing east - built up a bit like 1 and 2 with extra wood and sugar cane - the replicator seemed to think it had the sugar cane chest placed already and dumped them all on the ground to decay. I terminated the run, sorry I don't have a save from just before I started that one, I knew I should have. Logs - Happened again in run 4, it does not seem to like finding sugar cane early. Further testing - seems to happen when it identifies sugar cane before sand.
Edited by Beeskee, 02 July 2014 - 11:26 AM.
#67
Posted 02 July 2014 - 11:55 AM
#68
Posted 02 July 2014 - 12:10 PM
#69
Posted 02 July 2014 - 06:18 PM
I did create a new world using the seed, and have identified the location from your screenshot. I am guessing you placed the sugar cane on the sand to the left, next to the water. The exact location should not matter too much, but I wanted it to be harvested before sand as an experiment.
BTW I noted you made a backup of your file. You might be interested in a VB6 project I wrote to make backups every 5 minutes of any minecraft world you are using, either in vanilla or technic formats. The VB sourcecode and a compiled .exe file are available. You will need to add the enclosed .ocx files to C:\Windows\SysWOW64\ and register them (Instructions in readme.txt). It runs on any version of Windows except RT as long as you register the ActiveX components
http://www.4shared.c...aft_Backup.html
Edited by Inksaver, 02 July 2014 - 06:53 PM.
#70
Posted 03 July 2014 - 04:37 AM
I resaved run1start and run4start with /defaultgamemode creative, I think that will do it.
They still have chunkloaders from here: http://www.chickenbo...sions/links.php
Run4 starting spot:
x=-116 y=65 z=197 facing north
I also zipped up the whole server. The contents of the mods directory can be copied into the client mods directory.
And yeah I went a bit overboard with the sugar cane probably, but it seemed like the turtle identifying that before the sand was the only problem.
The problem in the code seems to be around ~1377, that section is marked "storageSand not yet placed". But then on line 1390 in that same block of code, it's storing identified sugar cane.
The backup utility seems cool, tho since I run mine as servers various programs can't back that up since the files are locked.
Edit:
I started a new world and a new run, with some new fun.
world2
seed: -4093190322563353815
run1: x: 183, y: 65, z: 256, facing south 0
I started this one in single player creative mode first and the start spot is near spawn so it should be good. There's also a beacon.
This one has failed twice in 2 different ways. The first, it had too much wood and crashed. Turns out there's a generated mineshaft below. Oops. The second failure, it ran out of fuel in the bottom of the lake, thinking sand was wood.
The logs are in the world zips under computer #0's directory.
I was able to reproduce the error in a third run, and remembered to take a screenshot this time. I also got a look at what was going on with the flower and dirt, there's a 2-block dirt 'cliff' with a flower on top, it finds that and thinks it found something else. Logs are in the zip in world2\computer\0
Edit: I finally saw enough about what was going on with the signs/torches at the entrances. It happens when the block the sign or torch is placed on is a grass block or becomes a grass block, since it can't compare that to the dirt. Still, might want to rearrange the code a little to make it reinforce the entrance with cobble and then place down the marker. Confirmed with more observation, it leaves dirt blocks alone but re-breaks grass blocks. Grass grows randomly, sometimes fast. You can't count on a dirt block not becoming a grass block unless you're certain the area has no grass anywhere nearby.
Edited by Beeskee, 03 July 2014 - 09:55 AM.
#71
Posted 03 July 2014 - 10:16 PM
Beeskee, on 03 July 2014 - 04:37 AM, said:
seed: -4093190322563353815
run1: x: 183, y: 65, z: 256, facing south 0
I started this one in single player creative mode first and the start spot is near spawn so it should be good. There's also a beacon.
This one has failed twice in 2 different ways. The first, it had too much wood and crashed. Turns out there's a generated mineshaft below. Oops. The second failure, it ran out of fuel in the bottom of the lake, thinking sand was wood.
The logs are in the world zips under computer #0's directory.
I was able to reproduce the error in a third run, and remembered to take a screenshot this time. I also got a look at what was going on with the flower and dirt, there's a 2-block dirt 'cliff' with a flower on top, it finds that and thinks it found something else. Logs are in the zip in world2\computer\0
This looks to be a great world for testing. I did think about what might happen if a disused mine was encountered. Now is my chance. There is a lot to do, so it will take some time to sort all these things out. Thanks again for your interest and input.
#72
Posted 04 July 2014 - 04:28 AM
Ended with 4 spare diamonds, though it had to hit the bedrock to do so. It appears to have avoided the generated mineshaft this time.
Edited by Beeskee, 04 July 2014 - 04:34 AM.
#73
Posted 04 July 2014 - 06:18 PM
I note from the page source you use postimage.org to host your screenshots.
How do you rate them compared with some of the others which seem to have lots of restrictions and limits?
I have nearly used up all my allotted 500k allowed on computercraft forums, so need to find an alternative.
#74
Posted 04 July 2014 - 06:28 PM
#75
Posted 04 July 2014 - 07:17 PM
I am onto it.
@Beeskee
I managed to download and use world2 in creative mode
I am now running the script to start debugging. This could be a long night...
#76
Posted 04 July 2014 - 10:17 PM
I used to use Imageshack but they delete images too and they just locked down non-paying accounts.
I'll probably check out imgur myself.
Edit: Oops:
As long as images are getting at least 1 view every 6 months, they will stick around forever. After that, your image may be removed to create more space for newer images.
Edited by Beeskee, 04 July 2014 - 10:20 PM.
#77
Posted 08 July 2014 - 08:59 PM
@Beeskee - I play ComputerCraft exclusively on Tekkit, so your notes on how it may work with such a modpack really intrigued me. I too may give a go and re-working this system to be compatible with Tekkit. My main concern is that it seems with first thought that the code may have to be not just tweaked but truly overhauled. A lot of the functions, such as getAllTrees (or whatever that was called) could be transplanted, for sure. For the most part, however, I believe it would have to be re-done simply so the turtle could have a directed system that can handle indentifying, sorting, and storing of all the miscellaneous ores and blocks that are added.
#78
Posted 12 July 2014 - 12:51 PM
The changes requested by some of you are taking much longer than expected, and some major re-coding is required.
So far the following has been completed:
1) User start menu re-done to include creating an ini file to store your preferences, and allow the use of pastebin both to store logs, and to allow the new turtles crafted to download the code from pastebin via an instruction stored on the floppy disc. This allows server users to run the script, as no modifications are needed on the computercraft config files
2) The world2 posted by Beeskee in post #70 where early discovery of both sand and gravel has been fixed.
Still to be done is the discovery of wooden items in the disused mineshaft in this world. Nearly there!
@ReconTurtle
The logging system is an object, so should be fairly easy to export as an api. I have not looked into this in any depth, but I guess I am looking for something similar to the Python 'import' method of including modules written separately. As you say this is an incredibly useful way of debugging the code. I may well add the logging system as a tutorial when I get time. If you want to have a go yourself, the function to look at is called createLogfileObject(). I have modified this quite heavily in the version I am still working on, so it will be different when I upload the next version.
Running the script on Tekkit would be a real pain, due to the number of extra blocks available, and the shortage of storage space within the turtle. It would take a major re-write and not even sure it would be possible
#79
Posted 17 July 2014 - 11:28 AM
You can now use the script on a server, and logfiles can be turned off completely.
The starting menu has been modified, and an .ini file is created to store your preferences if you are repeating runs to test it out.
If disused mines are encountered, the fences, planks and any other combustibles are simply used to refuel.
Please report any bugs you come across along with world seed, starting coordinates and position of the sugar cane.
crashes caused by the cc 1.63 bug concerning the .place() methods and long grass have been intercepted and dealt with, so you don't get the turtle contents spewing out because the chest is not in the right place. (I will be posting this fix in the bug reports forum.)
The world2 in post #70 now works properly.
Enjoy
#80
Posted 13 August 2014 - 10:16 PM
When I discovered ComputerCraft a month ago, I figured asked immediately: does a turtle can be autonomous and craft other turtles and so on?
When I realized that yes, it was possible, I was surprised to see so few videos on it! I have found quickly the self-replicating challenge and the beginnings of some youtube chain, to see that no one had succeeded...
What a joy to see your videos! Again, congratulations! That's very impressive!
It made me feel inclined to do the same!
So I did from scratch!
Well, not as robust (I do not do the thing of the torch, I not manage jungle tree, abandoned mines, buckets of lava ...) but it is less than 2000 lines of code!
I want to know: are you planning to continue working on it, with created turtles working together ...? You have ideas?
Edited by Mister_Y, 13 August 2014 - 10:59 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users