←  Turtle Programs

ComputerCraft | Programmable Computers for Minecraft

»

Swarm Miner - Quarry Up Where You Want. Ve...

Wojbie's Photo Wojbie 22 Oct 2013

View PostZudoHackz, on 22 October 2013 - 12:37 PM, said:

Awesome. I can't believe I am the first 200+ poster on this thread :)

Is my program Awesome or are you just shamelessly offtopic-ing? ( <- Shameless Baiting for Compliment.)

Also if other posters gathered and made one big gestalt intelligence we still would have less posts than you. Side effect of been a recovering lurker i guess.
Quote

GeneralHARM's Photo GeneralHARM 22 Oct 2013

View Postwojbie, on 22 October 2013 - 03:42 AM, said:

View PostGeneralHARM, on 21 October 2013 - 06:12 PM, said:

Love the program thank you,
i had it setup and working nicely last night, but i wanted to change the grid and reset it, go i went out and gathered up all of my miners, now i have setup and deployed a single miner to the grid that i want, but when i try to add a new miner to the swarm i get
Love the program getting a weird error

Running parallel:22: Swarminer:858: index expected, got nil

just tried to deploy another, it mined 9 blocks then returned

miningparallel :22: swarminer:130: attempt to compare nil with number

Did a Ninja Fix on that one. Weird bug - can you provide me with contents of current.log files from both of those turtles? That would help me making it less likely to happen - sadly it never seems to happen to me. After that update program and that should not happen again.

I'll see if i have the log in one of my turtles when i check it out tonight, i wiped a few of them and re-tasked them so maybe we'll be lucky.

On a side note how effective is this system at getting Diamond if it does not go all the way to bedrock? havent been able to run it that way down yet.
Quote

Wojbie's Photo Wojbie 22 Oct 2013

View PostGeneralHARM, on 22 October 2013 - 02:23 PM, said:

I'll see if i have the log in one of my turtles when i check it out tonight, i wiped a few of them and re-tasked them so maybe we'll be lucky.


All turtles keep 6 log files inside of them - they are part of crash/reboot recovery system. For this bug i just need contents of "current.log" one.


View PostGeneralHARM, on 22 October 2013 - 02:23 PM, said:

On a side note how effective is this system at getting Diamond if it does not go all the way to bedrock? havent been able to run it that way down yet.


In preformating order phase you are asked how deep to mine - if you say mine 10 blocks it will mine 10 blocks . if amount you states is more than bedrock level it will reach it and decide its not going deeper. When i want to dig to bedrock i usually say i want 255 deep - nice round number.


EDIT:
Did large scale test of latest version of code:

Test Area = 100x100xbedrock mine
no enderchest, cobbledrop.
50 turtles.
No user input after start.

results:

Whole area mined - 3 sectors not fully / 397 fully.
3 Turtles got stuck due to UNKNOWN error (Stand still for no reason)

Conclusions:

Pathing problems - fixed
Refuel problems - fixed
Other small assorted problems - fixed
Endermen killed by turtles - 6 enderpearls in output chest?
Turtles Stopping in middle of whatever they where doing - Negated to lover levels than before - or could be lucky. Still could not get out of them why.... Irritating.
Quote

HeffeD's Photo HeffeD 22 Oct 2013

View Postwojbie, on 22 October 2013 - 02:40 PM, said:

When i want to dig to bedrock i usually say i want 255 deep - nice round number.

I just use whatever height I'm starting from. If I'm starting the quarry at level 74, I'll set the depth to 74. With flat bedrock, that mines all the way down.

View Postwojbie, on 22 October 2013 - 02:40 PM, said:

Turtles Stopping in middle of whatever they where doing - Negated to lover levels than before - or could be lucky. Still could not get out of them why.... Irritating.

Yes, I'd say you've improved whatever happens to make them freeze. Ordinarily I'd need to rescue some turtles even mining just a single chunk. Using your latest update, I just ran a successful 64x64 quarry with 10 turtles using enderchests, and I didn't have a single turtle stop what they're doing. So like you said, that may have been luck, or you've improved it. Based on my previous experiences, I'd say you improved it because up until this point, I've never had a quarry successfully finish without me having to babysit the turtles. Even small quarries. (Of course, that could just mean I've had horrible luck up to this piont... :P )

So, nice job! B)
Quote

Wojbie's Photo Wojbie 23 Oct 2013

View PostHeffeD, on 22 October 2013 - 09:49 PM, said:

I just use whatever height I'm starting from. If I'm starting the quarry at level 74, I'll set the depth to 74. With flat bedrock, that mines all the way down.


Ahh thats your problem - Turtles gave hard-coded bedrock level at level 5!!

if you want them to mine lover than 5 you need to set
local levelmin=5
in swarminer file thats on a disk to smaller one before you install it on all turtles (Warning that will reset after each update)

Depending of your flat bedrock level that can be 1 or 2 or 3 - simply stand on topmost piece of cobble and look at your legs y coord - thats what you should put there.
Quote

HeffeD's Photo HeffeD 23 Oct 2013

View Postwojbie, on 23 October 2013 - 02:47 AM, said:

Ahh thats your problem - Turtles gave hard-coded bedrock level at level 5!!

Ah, sorry wojbie, I think there's been a bit of a misunderstanding... :huh:

I wasn't reporting a problem, I was merely stating an easy way to set the quarry depth.

I've been editing the levelmin setting to "1" since the first time I've used your script. My turtles have never had a problem mining all the way down to bedrock.
Quote

Wojbie's Photo Wojbie 23 Oct 2013

Sorry :D

English is not my first/nor second language and i sometimes get confused.
Placed a small update of path-finding(again) Hopefully it will finally work bug-less.

offtop:
Also died from turtle attack - bugger picked up my whole inventory and dropped it off to ender-chest straight to me-system. :P
25 levels to the drain.
Quote

HeffeD's Photo HeffeD 23 Oct 2013

That's OK wojbie, you speak English better than I speak any language other than my native language. :)

I just encountered and error.

I found two turtles apparenlty in a standoff. Turtle One facing the front of the quarry, Turtle Two facing Turtle One, but it is positioned a block below. Turtle two had also mined the block below it. This was roughly in the middle of the edge of Turtle One's sector.

Anyway, one has the error: Mining parallel :22: swarminer :607: attempt to call nil. And the other has the same error, but a different swarminer number. Mining parallel :22: swarminer :706: attempt to call nil.

Upon restart, Turtle One was able to continue mining, but Turtle Two says:
Determining position
Something went wrong.

So Turtle Two apparently got very confused and started digging a different sector than it was supposed to, it may have been traveling to a new sector, because all of the currently unfinished sectors are being actively mined by other turtles. But if it was traveling to a new sector, I have no idea why it was digging below the turtle currently mining that sector. And it was digging down, not up, so it wasn't digging to the surface from down below.

I also wondered if it was maybe a case of the two turtles competing for the same sector as you mentioned previously, but in that case, Turtle two should have "won" the competition because it was lower, but the sector had already had 6 layers removed, and Turtle one had already mined three rows into it's current sector when it apparently encountered Turtle Two.

So I basically have no idea what Turtle Two was doing. I ended up breaking him and re-loading the orders and he's happily mining a new sector.
Quote

Wojbie's Photo Wojbie 23 Oct 2013

Still by your errors and info you given me i can say 2 things
  • Those errors are biggest headscrachers i had on this program yet
  • I have no idea what happened

Something went wrong - Error is called when after all system check and setups i am preforming one more check to double check everything - If that fails after all before stuffs i have honestly no idea what went wrong. So Eloquence of this error message symbolizes my Bafflement at situation.

In Infamous words of Turtle Nr Two: Something went wrong. I guess.

Side-note - In testing version of program this message was "Somethin went wong." Opse.
Quote

Mad_Professor's Photo Mad_Professor 24 Oct 2013

I gave your script a shot in my single player, it doesn't work.

I got 4 scanners up, the turtle can't find gps, I turned off one scanner and now the turtle has gps. I set up a 128L x 3W x 3D repeat 10 times, I sent it on it's way. 10 minutes went by, it did not come back to refuel/dropoff, it only had 1000 fuel. So I went after it, dug 1000 blocks following the single hole, gave up.

I treid again with a new setup with 5 scanners, same problem turtle could not find gps and scanner number 5 is off by 5 blocks and scanner 2 is off by 1 block. Removed those two scanner and now the turtle has GPS, I set up the sector again this time I did 3x3x3 repeat once and limited the fuel to 100. It move one block forward then said "work done!"

It's broken, or I'm doing something really wrong.
Quote

honsbeekiejj's Photo honsbeekiejj 24 Oct 2013

hey I'm running your programm now and i had 3 turtles running and they stopped at different levels saying: too long without yielding i believe they said line 85 but not sure will edit when it happens again
Quote

Wojbie's Photo Wojbie 24 Oct 2013

View PostMad_Professor, on 24 October 2013 - 08:15 AM, said:

I gave your script a shot in my single player, it doesn't work.

I got 4 scanners up, the turtle can't find gps, I turned off one scanner and now the turtle has gps. I set up a 128L x 3W x 3D repeat 10 times, I sent it on it's way. 10 minutes went by, it did not come back to refuel/dropoff, it only had 1000 fuel. So I went after it, dug 1000 blocks following the single hole, gave up.

I treid again with a new setup with 5 scanners, same problem turtle could not find gps and scanner number 5 is off by 5 blocks and scanner 2 is off by 1 block. Removed those two scanner and now the turtle has GPS, I set up the sector again this time I did 3x3x3 repeat once and limited the fuel to 100. It move one block forward then said "work done!"

It's broken, or I'm doing something really wrong.

Ok i see your problem

First:
Read How GPS Systems work in Minecraft - Basically you need to set up scanners in correct way for them to provide good gps signal.

Second:
Triple check coordinates you are giving to the program. Both scanners and in Orders you are programming.
In Scanners its asking for computer coordinates not wireless modem coordinates(common mistake - sounds like that from you rapport.)
If you type one coordinate wrong program will assume you meant it and go there.

3th
You need to find that first turtle. If it is in area It will keep sending data to other turtles causing Work Done to be issued. Scanners should be able to detect it if its in range and tell you its position ( after you set up good gps)

Also how did you limit fuel to 100?? Program should have not started with 100 fuel - there is lock on that. Unless you edited code than i am sorry but thats not under warranty.

Hope That helps.

View Posthonsbeekiejj, on 24 October 2013 - 11:10 AM, said:

hey I'm running your programm now and i had 3 turtles running and they stopped at different levels saying: too long without yielding i believe they said line 85 but not sure will edit when it happens again

Line 85 is a save to file code - if it errored on this line then server (or singleplyer) must have had some small problems with file save. Nothing i can help with (If that was line 85)
Quote

honsbeekiejj's Photo honsbeekiejj 24 Oct 2013

Miningparallel:22:swarminer:251: Too long without yielding
Quote

Wojbie's Photo Wojbie 24 Oct 2013

View Posthonsbeekiejj, on 24 October 2013 - 11:21 AM, said:

Miningparallel:22:swarminer:251: Too long without yielding
What turtle was doing? mining? attempting to refuel? any more info about situation you can give me? cause from the error message itself point at turtle.getFuelLevel() - witch is a standard function
Quote

honsbeekiejj's Photo honsbeekiejj 24 Oct 2013

hmm mining nothing it's moving down an old hole i had, my turtles do have about 12000 fuel becuase i gave them lava buckets maybe that's the problem
Quote

Wojbie's Photo Wojbie 24 Oct 2013

No No not a problem. Still i have no idea what can be causing it - i tested this program on ftb or tekkit or just on cc and it works..... No idea whats causing your error. Sorry

EDIT: Managed to duplicate this error - working on solving it.

Side note: I am working on deploying/collecting program - allows automatic deployment/collection of larger amounts of turtles (Included placing enderchests/cobble in needed slots.) Using one turtle and a chest..
Quote

honsbeekiejj's Photo honsbeekiejj 24 Oct 2013

hmm 3 lines it gets stuck on 22 85 and 251 sometimes it does, the othertime it doesn't... it won't continue when broken on line 85 EDIT: didn't see your edit waiting for response, when more will ocure i will let you know
Quote

Mad_Professor's Photo Mad_Professor 24 Oct 2013

View Postwojbie, on 24 October 2013 - 11:18 AM, said:

View PostMad_Professor, on 24 October 2013 - 08:15 AM, said:

I gave your script a shot in my single player, it doesn't work.

I got 4 scanners up, the turtle can't find gps, I turned off one scanner and now the turtle has gps. I set up a 128L x 3W x 3D repeat 10 times, I sent it on it's way. 10 minutes went by, it did not come back to refuel/dropoff, it only had 1000 fuel. So I went after it, dug 1000 blocks following the single hole, gave up.

I treid again with a new setup with 5 scanners, same problem turtle could not find gps and scanner number 5 is off by 5 blocks and scanner 2 is off by 1 block. Removed those two scanner and now the turtle has GPS, I set up the sector again this time I did 3x3x3 repeat once and limited the fuel to 100. It move one block forward then said "work done!"

It's broken, or I'm doing something really wrong.

Ok i see your problem

First:
Read How GPS Systems work in Minecraft - Basically you need to set up scanners in correct way for them to provide good gps signal.

Second:
Triple check coordinates you are giving to the program. Both scanners and in Orders you are programming.
In Scanners its asking for computer coordinates not wireless modem coordinates(common mistake - sounds like that from you rapport.)
If you type one coordinate wrong program will assume you meant it and go there.

3th
You need to find that first turtle. If it is in area It will keep sending data to other turtles causing Work Done to be issued. Scanners should be able to detect it if its in range and tell you its position ( after you set up good gps)

Also how did you limit fuel to 100?? Program should have not started with 100 fuel - there is lock on that. Unless you edited code than i am sorry but thats not under warranty.

Hope That helps.

I did not put a chest for fuel above the turtle, I manually gave them coal and did "refuel all."

SO what you're saying is that first and second turtle I lost is causing the third turtle to say work done? They are not even in range or in the same chunk I'm in. I'm never going to find them since they just gone, man. They could be in a lava pool, I don't know how they manage to get enough fuel to mine so far.

You need to implment a fail safe code to recall the turtle when it exceeds it's gps wireless range. Because the wireless modems only go 16 meters during storm at low alt, 64 on a good day and at high alt 384 on a good day, 64 on a bad day.


I will try to fix the gps again.
Quote

mistagnerd's Photo mistagnerd 25 Oct 2013

Hello, I'm quite new to computercraft and am having trouble following your imgur album. Do you by chance have a video explaining the setup process? I wil be away for a few days. So I will check back then! Thank you for any help you can provide.
Quote

Mad_Professor's Photo Mad_Professor 25 Oct 2013

Well I got it working, setup GPS satellites above ground, high in the sky. Definitely better to run standalone gps and scanner systems.

But now I got an issue with refueling. One of my turtles complained about "swarminer:251: Too long without yielding" which refer to
local i = turtle.getFuelLevel()
After manually giving it coal, it worked without issue.

not sure what's going on there.

View Postmistagnerd, on 25 October 2013 - 05:21 AM, said:

Hello, I'm quite new to computercraft and am having trouble following your imgur album. Do you by chance have a video explaining the setup process? I wil be away for a few days. So I will check back then! Thank you for any help you can provide.
what kind of problem are you having, I may be able to help.
Quote