Jump to content




Swarm Miner - Quarry Up Where You Want. Version 2.0

turtle wireless

215 replies to this topic

#121 Mad_Professor

  • Members
  • 23 posts

Posted 27 October 2013 - 02:01 PM

View Postwojbie, on 27 October 2013 - 01:21 PM, said:

Having more than one turtle with same number id is a weird situation - code is not designed to handle it - can cause all matter of bugs and hangs.
Best for you would be to get rid of one of duplicates.

alright will do, after they are done with this 128x128 quarry. Also is there any way to remove the wireless modems, it would save me tons of trouble looking for endermen pearls.

View PostHeffeD, on 27 October 2013 - 01:31 PM, said:

View PostMad_Professor, on 27 October 2013 - 11:22 AM, said:

It's single player survival, but I had to switch to peaceful a few times when I was trying to figure this stuff out and kept getting bugged by the mobs. Doesn't seem to affect it though, but just makes it harder to track on the scanner when two id flash two different sets of information.

Switching to peaceful wouldn't do it. Turtles and computers are given a unique ID by ComputerCraft when they are placed in the world.

Without manually editing some config files, the only way to get a duplicate ID is to place the turtle in creative mode. Since creative mode doesn't remove the item you've placed from your inventory, in the case of a turtle or computer, placing the item will duplicate it. The end result is that you have more than one turtle or computer with the same ID. That's the only way it will happen.

Yeah I'm not sure how it happen. I did delete the computer directory in .minecraft/saves/mymap/ thinking it would reset the id count but that was useless attempt. And maybe the duplicates are my fault, I did re-use computers that used to be GPS/Scanner Host.

But I'll toss them when they are done

#122 Warlordjones

  • Members
  • 3 posts

Posted 27 October 2013 - 02:08 PM

Wonderful. Thanks! Should not be exploding the poor server on startup now!

Edit: Darn, editing that doesn't seem to work. When I place the turtle, it hangs on the configuring swarmminer for a while, and then moves 1 block, and stops! It outputs TurtleOS V1.5 into it's console, then hangs, apparently running a program.
Edit2: Works perfectly now! Just me being too darn impatient! <_<
Edit3: Also, when the turtles start, they wait like normal, but then wait for me to go into the GUI and press y to confirm area mining. Know how I would disable this?
Edit4: Derp, that would be coz I enabled debug mode :huh:

#123 dronf

  • Members
  • 10 posts

Posted 27 October 2013 - 09:00 PM

I finally got this working, but have had some odd results. I noticed that turtles will frequently get stuck following each other, so there will end up being like 8 in a row, slowly following the first. If that first one tries to turn around, the whole thing stops. Anyone seen something like this?

#124 karlsen

  • Members
  • 3 posts

Posted 27 October 2013 - 10:20 PM

This is the kind of program I've always dreamed about creating. I have a few ideas about features you could implement:

1: Make it possible to set up multiple mining areas using different channels.
2: As seen on this screenshot http://i.imgur.com/4SdRNjr.png it seems like the turtles "line" up after each other because the first "layer" of a section isn't mined. Would it be possible for the turtles in the "line" to make a path between the sector it is trying to get through and the one it wants to get to like in this picture: http://i.imgur.com/sjTBIQa.png (where the glass would be the possible pathing between the sectors).
2 ½: An alternative "fix" the above "problem" would be to allow the turtles in the section to communicate and divide the area they have to mine (adaptive sub-sections).
2.75: Another way to "fix" the problem from #2 would be to mine the first layer of the sections in an alternative way by mining out the edge first then going back to the regular mining of this section.

From here on it's more "wishes" than actual requests :)

3: If #1 Would become possible another feature could be to have "master" turtles which automatically sets an entire mining operation. (requires GPS coverage in the area?) Given they get the coordinates, the facing and unlabled empty turtles, drop off materials (ender chest for example), disk drive, disk, and coble stone.
4: If #3 then you could use a different channel on the modem to send information about that specific digsite through an adhoc like network of "gps towers". Where this information would be sent with progress updates of each section every 10 seconds which would consist of the y-level/the depth/ number of layers completed in every section.
5: If #4 then you could possible make these master turtles automatically move mining operations once they have been completed to another area. This could be achieved through temporary enderchest storage for the labeled & already programmed turtles. If this feature was created the user would probably have to give it some "upper" bounds of areas it's allowed to move to. If this "fully" automatic system would be set up it would probably need "blacklisted/whitelisted" areas.

6: Have a suggested dropsite being a bit above the center of the entire "map" with all the sections. Or possible add the option of having multiple drop locations where the turtle would figure out which one it is closest to and choose that one.

If all these things would be set up it would be possible to have a fully automated mining system which adaptivly moves to new digsites once it has completed it's current one.

I have a question about the movement of the turtles: I've noticed they stop up a lot and wait a tiny bit before they move on. Is this due to the information they send/receive ?
Another question would be about the connection between the turtles. Do they work like ad-hoc networks in real life where if Turtle1 and Turtle3 are too far from each other to communicate but Turtle2 is in between Turtle1 & Turtle3 and has a connection to both of them. So Turtle2 would passthrough information Turtle1 need to send to Turtle3?

Hope I did not overwhelm you but I really enjoy seeing this project of yours since it's almost what I have dreamed of achieving with computercraft. Please reply if some of my suggestions/questions are unclear and I'll make sure to edit them to be more detailed.

#125 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 28 October 2013 - 04:03 AM

Ok lets get to answering.

View Postkarlsen, on 27 October 2013 - 10:20 PM, said:

This is the kind of program I've always dreamed about creating. I have a few ideas about features you could implement:

1: Make it possible to set up multiple mining areas using different channels.
Already possible - requires manual edit of channel variable in scanner and swarminer files on disk before starting quarry - channels should be higher than 10000 cause they talk a lot.

View Postkarlsen, on 27 October 2013 - 10:20 PM, said:

2: As seen on this screenshot http://i.imgur.com/4SdRNjr.png it seems like the turtles "line" up after each other because the first "layer" of a section isn't mined. Would it be possible for the turtles in the "line" to make a path between the sector it is trying to get through and the one it wants to get to like in this picture: http://i.imgur.com/sjTBIQa.png (where the glass would be the possible pathing between the sectors).
2 ½: An alternative "fix" the above "problem" would be to allow the turtles in the section to communicate and divide the area they have to mine (adaptive sub-sections).
2.75: Another way to "fix" the problem from #2 would be to mine the first layer of the sections in an alternative way by mining out the edge first then going back to the regular mining of this section.
I Don't understand exactly whats your problem with pathing - system - can you try explaining it again. Also you could bee seeing anti-collizion system that kinda counterintuitive in actions - take a look few posts before.

View Postkarlsen, on 27 October 2013 - 10:20 PM, said:


From here on it's more "wishes" than actual requests :)

3: If #1 Would become possible another feature could be to have "master" turtles which automatically sets an entire mining operation. (requires GPS coverage in the area?) Given they get the coordinates, the facing and unlabled empty turtles, drop off materials (ender chest for example), disk drive, disk, and coble stone.
Nope - design idea - no lords no masters each turtle is equal - i will add deployer/collector turtle after i finalize its code. will still require you to set order youself but will deploy and program turtles automagicly.

View Postkarlsen, on 27 October 2013 - 10:20 PM, said:

4: If #3 then you could use a different channel on the modem to send information about that specific digsite through an adhoc like network of "gps towers". Where this information would be sent with progress updates of each section every 10 seconds which would consist of the y-level/the depth/ number of layers completed in every section.
This while idea is good i am not good at - ad-hock networking - this wwhole program is based on brodcast-net turtle don't "link" with each-other they simply send info what they are doing to all in area. Also scanners send data of what they see in their area to each other to speed up information sharing. IF you want to seend this information onwards all you need to do if figure out how its send by scanner and make program plugging into that.

View Postkarlsen, on 27 October 2013 - 10:20 PM, said:

5: If #4 then you could possible make these master turtles automatically move mining operations once they have been completed to another area. This could be achieved through temporary enderchest storage for the labeled & already programmed turtles. If this feature was created the user would probably have to give it some "upper" bounds of areas it's allowed to move to. If this "fully" automatic system would be set up it would probably need "blacklisted/whitelisted" areas.
Again - no lords no masters - to many times i lost whole mine cause "master" turtle got broken or destroyed.
As for blacklisted areas its possible with this version - take a look at List Of Argument Line Commands in Files and What They Do [For Advanced Users Only] : in floppy section - addzone commands - allows you to blacklist cuboids (turtles will not mine them - never)..

View Postkarlsen, on 27 October 2013 - 10:20 PM, said:

6: Have a suggested dropsite being a bit above the center of the entire "map" with all the sections. Or possible add the option of having multiple drop locations where the turtle would figure out which one it is closest to and choose that one.

If all these things would be set up it would be possible to have a fully automated mining system which adaptivly moves to new digsites once it has completed it's current one.
Multiple dropsides would require lots of changes in code that i don't really see point in making - with one dropspot its easier to menage your mine - also you can select dropsite point to be in (center) of mine but as i stated before there is no 100% endurance it will work 100% times.

View Postkarlsen, on 27 October 2013 - 10:20 PM, said:

I have a question about the movement of the turtles: I've noticed they stop up a lot and wait a tiny bit before they move on. Is this due to the information they send/receive ?
Can you tell me when exacly they stop a bit? if while mining then they are stopping to see if there is noting to mine - while pathfinding there are no stops to mine. Also if turtle attempts to mine another turtle its locked for a second as a punishment :D we don't want them to mine each other.
There is also queue system but its not "send/receive" based but "compare to what i know" based - it will not stop turtle unless it knows turtle should /stop for a sec.

View Postkarlsen, on 27 October 2013 - 10:20 PM, said:

Another question would be about the connection between the turtles. Do they work like ad-hoc networks in real life where if Turtle1 and Turtle3 are too far from each other to communicate but Turtle2 is in between Turtle1 & Turtle3 and has a connection to both of them. So Turtle2 would passthrough information Turtle1 need to send to Turtle3?
All turtles broadcast all they know about what they are doing - informations slowly spreads onto whole mining areas - thats how map of mine is updated with information far more than 64 blocks away - simple nah? so yes no ad-hoc connection per se but information still spreads.

View Postkarlsen, on 27 October 2013 - 10:20 PM, said:

Hope I did not overwhelm you but I really enjoy seeing this project of yours since it's almost what I have dreamed of achieving with computercraft. Please reply if some of my suggestions/questions are unclear and I'll make sure to edit them to be more detailed.
No problem i enjoy answering tho those long posts . Take care!

#126 Mad_Professor

  • Members
  • 23 posts

Posted 28 October 2013 - 05:04 AM

View Postdronf, on 27 October 2013 - 09:00 PM, said:

I finally got this working, but have had some odd results. I noticed that turtles will frequently get stuck following each other, so there will end up being like 8 in a row, slowly following the first. If that first one tries to turn around, the whole thing stops. Anyone seen something like this?

Don't make the mistake I did, doing large sectors (128x6x10) with no repeats, you're better off with 8x8 repeat 16 times.

#127 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 28 October 2013 - 05:23 AM

Ok ok i get the memo - locking it to 2 - 10 range in next update. That should get it done.

#128 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 28 October 2013 - 10:26 AM

UPDATE:v1.3.3

Changes:
  • "To long without yeld" error fixes added.
  • New even faster refuelling code
  • Limited sector size to 2-10 range on both axis.
  • Small amount of code for future deplorer added.
  • Goto Code fine-tuning (again)
Run
 disk/startup update 
on your swarminer disk to download latest version

#129 Mad_Professor

  • Members
  • 23 posts

Posted 28 October 2013 - 03:25 PM

Started up my world again today, check on all the turtles, one not responding, chase it down and found it had terminated with

Quote

swarminer:863: index expected, got nil

This is not with your newest update but the previous.
CC1.57
{["fuel"]=575,["layer"]=1,["id"]=39,["run"]=true,["loc"]={["x"]=12,["z"]=16,},["pos"]={["y"]=14,["x"]=-333,["z"]=-137,["zd"]=0,["xd"]=-1,},}

Any idea why it had died like that?

#130 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 28 October 2013 - 03:29 PM

Should be fixed in latest version - part of turtle code was sending wrong data in specific circumstances and it was poisoning environment.
Side-note
I am working on adding a emergency beacon so when turtle crashes it will fall back to sending error flag on and its position (if its able to get it) for easier tracking down.

#131 dronf

  • Members
  • 10 posts

Posted 28 October 2013 - 04:38 PM

This may have already been asked and covered, but is there a way to make a turtle skip mining certain blocks? Would be nice to be able to go back in to a quarry hole and silk touch certain ores.

thanks again!

#132 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 28 October 2013 - 04:45 PM

Nope sorry - I didn't consider that as usually i mine large areas so i get lots of stuff anyways...
Adding it now to the code would be messy. Its getting over 1500 lines of code now.

Side-note:
Emergency beacon code is operational and will be in next update.

#133 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 28 October 2013 - 05:27 PM

UPDATE:v1.4

Changes:
  • Emergency Beacon Added - Any turtle that crashes down to shell will emit send ping signal to scanners informing them of it
  • Refined anti-sector-colision code - Sadly that makes "race" situation 99.9% rarer. Turtles now decide it based on who has lover id number.
  • Scanner Code updated to properly show Emergency Beacon status.
  • Additional code added for Deployer/collector needs.

Run
 disk/startup update 
on your swarminer disk to download latest version

#134 HeffeD

  • Members
  • 61 posts

Posted 29 October 2013 - 12:45 PM

It would be a good idea to ensure that if you choose not to use the scanner as a gps host, it doesn't broadcast its coordinates. Or maybe remove any previous gps files from the computer's folder.

Currently if you've used the scanner as a gps host previously, it will still be operating as a gps host using the incorrect coordinates if you install the scanner and choose not to use the computer as a gps host.

I set up a new quarry and the first turtle went off in the wrong direction. After catching it and doing a gps locate, I noticed that the coordinates were wrong, and that one of the gps satellites was much closer than it should have been. (I have a script that puts the satellites up near the maximum world height) When I terminated the scanner, the turtle was able to receive the accurate coordinates.

After deleting the gps log and startup file from the scanner computer's folder and reinstaling the scanner and choosing not to use as a gps host things worked properly.

#135 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 29 October 2013 - 12:51 PM

Face-palm - fixed tx for report - no idea how i missed that. :(
But it should clear data correctly now. :)


Run
 disk/startup update 
on your swarminer disk to download latest version

#136 HeffeD

  • Members
  • 61 posts

Posted 29 October 2013 - 01:00 PM

View Postwojbie, on 29 October 2013 - 12:51 PM, said:

Face-palm - fixed tx for report - no idea how i missed that. :(

We all miss things sometimes. :)

View Postwojbie, on 29 October 2013 - 12:51 PM, said:

But it should clear data correctly now. :)

Thanks for the quick fix! :ph34r:

#137 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 29 October 2013 - 01:08 PM

View PostHeffeD, on 29 October 2013 - 01:00 PM, said:

Thanks for the quick fix! :ph34r:

Eh that was one line fix - nothing big - I am more interested if someone got into situation when emergency beacon started signaling - Tested it in smp and ssp but you never can test it on someone else computer. :D

#138 HeffeD

  • Members
  • 61 posts

Posted 29 October 2013 - 02:17 PM

I haven't had a beacon yet. I'll let you know if I do.

#139 HeffeD

  • Members
  • 61 posts

Posted 29 October 2013 - 04:01 PM

This is the first time I've seen this one. I have a turtle mining an already mined sector. And interestingly, the turtle doesn't show up as a "+" symbol on the quarry map.

Normal turtle
CC 1.53
Current log
{["layer"]=16,["loc"]={["x"]=1,["z"]=6,},["pos"]={["y"]=47,["x"]=1511,["z"]=-608,["zd"]=1,["xd"]=0,},["run"]=true,["fuel"]=345,["id"]=0,}


#140 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 29 October 2013 - 04:07 PM

OK i already found where that bug is from - working on fixing it.

Also side note
["id"]=0?
That turtle id is 0? interesting coincidence.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users