Jump to content




Bee Breeding With Attributes (Credit To Direwolf20 For Idea)

turtle

  • You cannot reply to this topic
128 replies to this topic

#21 tuxtux

  • Members
  • 3 posts

Posted 09 August 2013 - 06:20 PM

This script looks absolutely great. I've tested it today on a FTB unleashed and had some problems with the bee analyzer.

analyzer.analyze() returns the table with some informations about the bee. A lot of stuff like "flyer", "range", "fertility" and much more is in there, but the species name is actually missing. Everything else is there. Because of this missing information sour script dies all the time.

Any idea what could be the problem?

#22 enLighteN

  • New Members
  • 1 posts

Posted 10 August 2013 - 05:57 AM

Hello

Im a big fan of this, so thanks for sharing. Would you be able to explain were we now enter the specific bee we are after in the coding. In the previous version, it was at the top of the code just under the programm info, however i cant seem to find anywere to enter it in the new program

#23 McLeopold

  • Members
  • 123 posts

Posted 10 August 2013 - 11:23 AM

View PostenLighteN, on 10 August 2013 - 05:57 AM, said:

Hello

Im a big fan of this, so thanks for sharing. Would you be able to explain were we now enter the specific bee we are after in the coding. In the previous version, it was at the top of the code just under the programm info, however i cant seem to find anywere to enter it in the new program

If you use the new installer , your program will be named "bee". Type in "bee Industrious Imperial" to target both of those species and all the species that come before. There is no need to modify the program. It will now list all the species that it is targeting if successful.

#24 McLeopold

  • Members
  • 123 posts

Posted 10 August 2013 - 11:27 AM

View Posttuxtux, on 09 August 2013 - 06:20 PM, said:

This script looks absolutely great. I've tested it today on a FTB unleashed and had some problems with the bee analyzer.

analyzer.analyze() returns the table with some informations about the bee. A lot of stuff like "flyer", "range", "fertility" and much more is in there, but the species name is actually missing. Everything else is there. Because of this missing information sour script dies all the time.

Any idea what could be the problem?

I haven't seen that before. Paste in you bee.log file. If that doesn't tell us I can add a debug feature.

Did the bee get analyzed properly. Is there enough liquid honey? Is it a species not in the table. Also post your version of MC, forestry, extra bees and magic bees.


#25 tuxtux

  • Members
  • 3 posts

Posted 11 August 2013 - 08:01 AM

View PostMcLeopold, on 10 August 2013 - 11:27 AM, said:

View Posttuxtux, on 09 August 2013 - 06:20 PM, said:

This script looks absolutely great. I've tested it today on a FTB unleashed and had some problems with the bee analyzer.

analyzer.analyze() returns the table with some informations about the bee. A lot of stuff like "flyer", "range", "fertility" and much more is in there, but the species name is actually missing. Everything else is there. Because of this missing information sour script dies all the time.

Any idea what could be the problem?
I haven't seen that before. Paste in you bee.log file. If that doesn't tell us I can add a debug feature.

Did the bee get analyzed properly. Is there enough liquid honey? Is it a species not in the table. Also post your version of MC, forestry, extra bees and magic bees.

I'm quite sure that's a problem with the itself Analyzer, not within your script.

Ok, first the stuff you've asked for. Here you see how it behaves with a Common princess and a Diligent drone. Both are pure and analyzed, the Beealyzer shows all their properties.
Posted Image
There is no need to check the paste bin log. It only shows the first few lines you see here.

So i went a bit deeper and took this bee:
Posted Image

Put it in the Analyzer and tried to write some lua myself:
Posted Image
As you can see it get's all the properties of the bee, except for the species. This is why I believe there is some kind of strange problem with the Analyzer itself. Does the Analyzer (the one with one single slot for a single bee) maybe need any kind of power?

Thanks…

Btw. This is on FTB Unleashed v1.1.2 with gregtech and extrabiomesXL.

#26 McLeopold

  • Members
  • 123 posts

Posted 11 August 2013 - 11:03 AM

Yeah, that is either a cc issue with the analyzer or a cc to forestry incompatibility. The effect being "forestry.NONE" is suspicious too.

Line 449 is where the program fixes incorrect species names and it got a nil instead os a string because there was no table entry.

Maybe it is due to how gregtech was added? There are gregtech bees and that code path may not be well tested? Try backing up your world and disabling it to see if it works.

#27 HoneycakePlay

  • New Members
  • 1 posts

Posted 12 August 2013 - 04:09 AM

I occoured to a error after running the program on line 630

http://filesupload.f...12_11.04.39.png

~ Edit: got it myself i had 2 princess in the turtle

#28 McLeopold

  • Members
  • 123 posts

Posted 12 August 2013 - 11:31 AM

View PostHoneycakePlay, on 12 August 2013 - 04:09 AM, said:

I occoured to a error after running the program on line 630

http://filesupload.f...12_11.04.39.png

~ Edit: got it myself i had 2 princess in the turtle

I added an extra check to make sure the program doesn't stop if this occurs. I might add multiple princess support later. For now, it will just skip the second princess when sorting. It might ping-pong back and forth between the 2 princesses depending on the order bees are pulled out of the apiary.

#29 tuxtux

  • Members
  • 3 posts

Posted 12 August 2013 - 03:28 PM

View PostMcLeopold, on 11 August 2013 - 11:03 AM, said:

Yeah, that is either a cc issue with the analyzer or a cc to forestry incompatibility. The effect being "forestry.NONE" is suspicious too.

Line 449 is where the program fixes incorrect species names and it got a nil instead os a string because there was no table entry.

Maybe it is due to how gregtech was added? There are gregtech bees and that code path may not be well tested? Try backing up your world and disabling it to see if it works.

Hmm… too bad. Playing on a server, so can't disable it. Thanks, I'll hope it's fixed with the next update ;-)

#30 Moosolini

  • New Members
  • 2 posts

Posted 14 August 2013 - 04:16 PM

Great program. I've gotten it to work in single-player and it works amazingly.

#31 dn_nb

  • New Members
  • 2 posts

Posted 14 August 2013 - 05:09 PM

View Posttuxtux, on 12 August 2013 - 03:28 PM, said:

View PostMcLeopold, on 11 August 2013 - 11:03 AM, said:

Yeah, that is either a cc issue with the analyzer or a cc to forestry incompatibility. The effect being "forestry.NONE" is suspicious too.

Line 449 is where the program fixes incorrect species names and it got a nil instead os a string because there was no table entry.

Maybe it is due to how gregtech was added? There are gregtech bees and that code path may not be well tested? Try backing up your world and disabling it to see if it works.

Hmm… too bad. Playing on a server, so can't disable it. Thanks, I'll hope it's fixed with the next update ;-)

I'm also having this issue, playing on Unleashed with GT installed. It works fine in single player, but not on the server I play on. The Bee Analyzer does not seem to return the species at all, or only one half of the genome, 90% of the time and I can't figure out why.

A couple people on my server suggested it might have something to do with MCPC. Not sure.

#32 Mitchfizz05

  • Members
  • 125 posts
  • LocationAdelaide, Australia

Posted 17 August 2013 - 04:34 AM

I don't really understand bees, never have.
I'm good at just about everything else in FTB, Applied enegistics, power armour, MFFS, computercraft, RedPower2, IC2, ThermalExpansion and everything else (except the new Mystcraft), yet I still don't understand bees or tree breeding!

#33 McLeopold

  • Members
  • 123 posts

Posted 17 August 2013 - 04:24 PM

View Postmitchfizz05, on 17 August 2013 - 04:34 AM, said:

I don't really understand bees, never have.
I'm good at just about everything else in FTB, Applied enegistics, power armour, MFFS, computercraft, RedPower2, IC2, ThermalExpansion and everything else (except the new Mystcraft), yet I still don't understand bees or tree breeding!

"Don't understand" as in not good at breeding nor know how to do it well, or as in don't know why someone would bother because it seems useless?

I breed bees to make platinum to spin into iridium ( in ultimate ) and in unleashed I will do it to produce thaumcraft shards with magic bees. I am also going to breed them for their effects such as edenic ( free xp ) and others.

As for how to breed and doing it well, you now have my program to take care of the mundane work. :)

#34 dronf

  • Members
  • 10 posts

Posted 19 August 2013 - 08:03 PM

McLeopold:

This program looks great, and I'm really hoping it works out for me. I'm running the newest version of the unleashed pack (1.1.3, on MC 1.5.2), with biomes o plenty enabled. This is also in SMP. I have it all setup like in the pic in the first post. I install, then run bee with a forest princess and a meadows drone in the turtle. I get the following output:

Clearing system...
ditching product...
scanning bees...
analyzing bees...
Bee 1 not correctly analyzed
Bee 2 not correctly analyzed

Waiting for bees.......


At this point it hangs forever. The bees were properly scanned, and I can see their attributes now when I shift click. I believe the turtle found and used the bee analyzer, since it turns that direction and spits them out, then back in.

Any idea on how I can get this running?

EDIT: I've confirmed this works in single player on the same client. I believe this is also an MCPC+ server, someone above mentioned this might be a problem.

I checked with the server owner and he is using mcpc+ build 635. I tried this on my own server with both MCPC+ 635 and the newest one, 638, and it worked on both. Is there a debug mode where I can see what the problem is? Or is there a local log written somewhere?

I ran the lua from a post above that outputs the analyzer data, and got similar output to tuxtux, but using a forest bee. FYI gregtech is NOT installed on this server.

Posted Image


Thanks!

#35 nottah

  • New Members
  • 2 posts

Posted 21 August 2013 - 01:36 PM

Same error as dronf. We are running the ftb unleashed 1.1.3 on our server.

I tried ssp and it worked beautifully, dont know why we are getting the not correctly analyzed message. Hope to see a fix soon :) keep up the awesome work.

#36 McLeopold

  • Members
  • 123 posts

Posted 21 August 2013 - 07:39 PM

View Postnottah, on 21 August 2013 - 01:36 PM, said:

Same error as dronf. We are running the ftb unleashed 1.1.3 on our server.

I tried ssp and it worked beautifully, dont know why we are getting the not correctly analyzed message. Hope to see a fix soon :) keep up the awesome work.

Is it an MCPC+ server? That seems to be the common thread. If so try and ask for the bukkit mods that are installed to help us track down the incompatibility.

Unfortunately I can't do anything about the missing data. My code calls .analyze() and expects a proper table back with the correct values. I'm not sure if this is a MiscPeripherals bug or if the MCPC+ installation is corrupting it somehow.

I could allow the program to ignore the species data and just breed bees with good attributes. It would be up you to monitor any mutations that occur.

#37 nottah

  • New Members
  • 2 posts

Posted 21 August 2013 - 10:57 PM

Thanks for the reply! Yes we are an mcpc plus server, we recently installed tick threading (awesome server mod) so not to sure if that is what is causing the problem. I'll see about the plugin list.

Allowing to program to ignore the species as an option would be very helpful. But dont do any major rewrites on our behalf. The program does do what it says in the right enviroment. :) Ill bee looking for your next update!

Nottah

#38 dronf

  • Members
  • 10 posts

Posted 22 August 2013 - 11:15 AM

FYI this started working for me last night, after the server admin took the server down for some work. I wasn't online at the same time as him, but I'm strongly guessing he updated some plugins. I'll see if I can get the list from him. Pretty sure this is a plugin related issue, as I was unable to recreate on my own with several versions of mcpc+ with no plugins.


by the way.....the program is great! :D

#39 McLeopold

  • Members
  • 123 posts

Posted 22 August 2013 - 07:31 PM

View Postdronf, on 22 August 2013 - 11:15 AM, said:

by the way.....the program is great! :D/>

Thanks!

The next feature will be multiple princess support. I'm waiting for the chest turtle to be functional so I can swap the bee inventory.

#40 dybukk

  • Members
  • 7 posts

Posted 26 August 2013 - 08:47 PM

Greetings,

I started to play with bees for the first time today. Took me hours too just get up to Imperial and Industrious with pure blood. Wow painful.

Shockingly enough I started searching for ways to automate it. Thank god for this thread. Really nice work. I went straight to a test world, did the set up, whipped out some nova frames and typed the following:

bees Industrious

All was going well. It was getting the mutations and pushing down the correct line. Until all of a sudden it had a pure drone and princess for industrious (Yes!). However, instead of exiting or breeding them it started breeding the pure princess with dirty mixed blood mongrel Dilligent and then Unweary's. I thought it must be some extra attributes that its trying to pull in, but it went on indefinitely.

I tweaked the code to reverse the score table, to make sure I could see the scorings of the princess and the drone (damn those tiny turtle screens). I noticed that the unpure Unweary-Industrious and Diligent-Industrious drones got the same score as the pure drones so I started looking at the Scoring Function.

First of all I noticed this :


score = max(bees[combo[1]].score, bees[combo[2]].score)


It didn't take into account if one of the combo's might not a targeted drone. So I changed it to :


local s1

if bees[combo[1]].targeted then

s1 = bees[combo[1]].score

else

s1 = 0

end

local s2

if bees[combo[2]].targeted then

s2 = bees[combo[2]].score

else

s2 = 0

end

score = max(s1, s2)


(Damn lua and its lack of a turnery operator.)

This wasn't the problem though. It seems that the code scores everything the same that has the potential to make a particular type of bee. So all the following have the same score :

Industrious - Industrious
Unweary - Industrious
Dilligent - Industrious
Unweary - Dilligent
...

There was nothing really modifying the score based around the probability of getting that particular type of drone. Maybe there should be a percentage taken off to give the pure drone higher ranking? I'm not sure.

I slapped in the below after the previous bit of code mentioned :


-- pure drone boost in score

if combo[1] == combo[2] then

score = score + 1

end


I reran from my test world and the rankings were adjusted and it started selecting the pure drones. I didn't re-run from the beginning to see how this would affect the full process. Thought I seek other peoples thoughts on a better solution.

Eventually I got the pure princess back and it started pairing with the pure drone. However it didn't exit as I suspected it should from looking at the code.

To get it to exit I had to change the following line :


if value ~= droneData[key] and key ~= "territory" and key ~= "type" then


to



if value ~= droneData[key] and key ~= "territory" and key ~= "type" and key ~= "slot" then

as the slot was always going to be different.

I'm guessing this program is usually run to target all bee's rather than just a particular one.

A pastebin of these changes are here: http://pastebin.com/WNBY7eHa

Thanks for all the hard work on this program and for sharing it :)

Dybukk





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users