Jump to content




Bee Breeding with OpenPeripherals (now with Bee Matron)


321 replies to this topic

#1 McLeopold

  • Members
  • 123 posts

Posted 25 March 2014 - 08:10 AM

Installation

Download the installer first with:
pastebin get Nq5jEJfM openbee-install
Then run the installer with:
openbee-install
You can now run the program with any target species like so:
openbee Imperial
Run the bee matron for honey production like this:
move matron startup
reboot

github: https://github.com/Forte40/openbee

Bee Breeding with OpenPeripherals

Posted Image

Automatic bee breeding using OpenPeripherals 0.3.1. Setup like the picture and breed away. (NOTE: This screen shot is facing North. You'll need to modify some variables in the bee.config file for a different orientation. There's another screen shot in the thread showing a proxy block setup.) You can to specify a target species like so:

openbee Noble


Summary of the program behavior

Spoiler

Bee Matron

Posted Image

Automatic bee production using computers. Attach up to 5 apiaries by placing next to the computer, or attach as many as you want with OpenPeripheral's proxies. There are 7 apiaries running in the screen shot above. Rename the "matron" program to "startup" to keep it running all the time. Product and extra drones are pushed up. The program uses slot 26 and 27 for the princess and drone when starting a new cycle. There is a redstone output so you can turn off import buses and other extraction devices while this is happening. The program also keeps stats of what has been produced.

Edited by McLeopold, 08 August 2014 - 11:28 PM.


#2 Technium

  • Members
  • 6 posts

Posted 26 March 2014 - 07:24 PM

Excellent - used the old version of this with great success. This new version looks great but is causing me some trouble...

Firstly, OpenPeripherals seems to have a bug with handling double chests (exception thrown when checking slots > 27). I "fixed" this by simply stopping the loop in catalogBees when an empty slot it found (I also see a recently fixed bug in OpenPeripherals so I expect this problem to go away).

Secondly, pushing items from the chest into the analyser just doesn't seem to work. Any ideas? I'm new to OpenPeripherals so don't know where to look.

I'm using OpenPeripherals 0.3.3 in the ResonantRise pack.

#3 McLeopold

  • Members
  • 123 posts

Posted 26 March 2014 - 09:20 PM

I'm using 0.3.1 and I'm not sure if that's the difference. The double chest is a way for me to be attached to both the chest and the apiary with the apiary able to push and pull from the chest. The chest can't push and pull from the apiary since the direction down is technically the computer. I'll probably support the proxy block attached to the chest instead once I move this to multiple apiaries.

The chest should be pushing to the analyzer and then pulling back. There is a variable called analyzerDir that needs to be configured with the correct direction. Check that first, the default is "east". Second, remove the chest above the apiary to see if the bees are on that side or above the computer. If you're having a problem with only 27 real slots, then maybe the bee is on the wrong side of the double chest.

Also, there's a bug I'm working on with the bee selection getting stuck if missing the correct combination of princess and drone. There will be another update in a few hours. Updated, try it out! Overall this has been quite an improvement over the old version with the ability to choose from multiple princesses.

Edited by McLeopold, 26 March 2014 - 10:48 PM.


#4 Technium

  • Members
  • 6 posts

Posted 26 March 2014 - 11:15 PM

Thanks for the quick reply. Tested the half-chest theory and that seems to not be the case. However, in building and rebuilding the system a number of times it is now somehow working perfectly. Must have been my derp. I thought I had always made it North-facing for testing purposes...

May I suggest you add in my quick fix? It's a fine optimisation regardless of this bug. You are already condensing the chest so the first empty slot should indicate the loop can finish.

My only problem now is when the 27 slots fill up :)

#5 VerTiGo_Etrex

  • Members
  • 11 posts

Posted 27 March 2014 - 01:06 AM

Awesome work!

I had to change and add some entries to the score array ("rock" to "rocks", and add "jungle", among other things), but I eventually got it working.

The top chest fills up with drones a lot though, and it looks like you removed the ability to push "products" into the left-most chest?

Really looking forward to seeing where you take this!

#6 McLeopold

  • Members
  • 123 posts

Posted 27 March 2014 - 02:11 AM

View PostVerTiGo_Etrex, on 27 March 2014 - 01:06 AM, said:

Awesome work!

I had to change and add some entries to the score array ("rock" to "rocks", and add "jungle", among other things), but I eventually got it working.

The top chest fills up with drones a lot though, and it looks like you removed the ability to push "products" into the left-most chest?

Really looking forward to seeing where you take this!

I got the jungle error too. I'll fix rocks. If you know of the others post them here. I've just been adding them as they come up.

Pushing products wasn't working at all. I've been testing with oblivion frames which don't give the bees time enough to produce any, thus I haven't run a lot of tests yet. The problem is when you push items you have to specify a slot number or it assumes slot 1. If the slot is full it will neither push nor try to find the next free slot. For now it will just go up to the chest. You can put an emerald pipe or other fancy gizmo on the chest to pump out the product.

Also, the reference bees are mostly totally working. Another update in a few hours.

View PostTechnium, on 26 March 2014 - 11:15 PM, said:

May I suggest you add in my quick fix? It's a fine optimisation regardless of this bug. You are already condensing the chest so the first empty slot should indicate the loop can finish.

My only problem now is when the 27 slots fill up :)

Added. I'm working on reference bees and obsolete drones now. It's done! Update to check out the reference bees feature. I'm almost to the point where you can turn this on, go find bees, dump them into a chest and come back to see all species discovered for you!

Edited by McLeopold, 27 March 2014 - 03:27 AM.


#7 NerdimusPrime

  • Members
  • 21 posts

Posted 27 March 2014 - 02:23 AM

View PostMcLeopold, on 26 March 2014 - 09:20 PM, said:

I'm using 0.3.1 and I'm not sure if that's the difference. The double chest is a way for me to be attached to both the chest and the apiary with the apiary able to push and pull from the chest. The chest can't push and pull from the apiary since the direction down is technically the computer. I'll probably support the proxy block attached to the chest instead once I move this to multiple apiaries.

The chest should be pushing to the analyzer and then pulling back. There is a variable called analyzerDir that needs to be configured with the correct direction. Check that first, the default is "east". Second, remove the chest above the apiary to see if the bees are on that side or above the computer. If you're having a problem with only 27 real slots, then maybe the bee is on the wrong side of the double chest.

Also, there's a bug I'm working on with the bee selection getting stuck if missing the correct combination of princess and drone. There will be another update in a few hours. Updated, try it out! Overall this has been quite an improvement over the old version with the ability to choose from multiple princesses.
Even with a setup facing the same direction as the default, with a double chest I'm getting the message:
openbee: 108: slot id (27) must be less than size (27)

If I use a half chest I don't get that message, and bees are pushed to the analyzer and back to the chest correctly, but then don't get pushed down into the apiary because there's only a half chest that doesn't cover the apiary.

#8 McLeopold

  • Members
  • 123 posts

Posted 27 March 2014 - 08:38 AM

View PostNerdimusPrime, on 27 March 2014 - 02:23 AM, said:

Even with a setup facing the same direction as the default, with a double chest I'm getting the message: openbee: 108: slot id (27) must be less than size (27) If I use a half chest I don't get that message, and bees are pushed to the analyzer and back to the chest correctly, but then don't get pushed down into the apiary because there's only a half chest that doesn't cover the apiary.

First, get the new update. Second, try a setup like this with a proxy block and change the chestSide variable to "diamond_0" or whatever the name of it is after right-clicking on the wired modem. Also, this new version doesn't need an analyzer, so you can get started with breeding after finding your first piece of redstone and a few bees in a new world. (It doesn't make as good of decisions, but at least you can get to cultivated by the time you have a diamond and bronze.)

Front Side

Replace the double chest with a single chest of any size. Move the analyzer to still be next to the chest.

Posted Image

Back Side

Place a proxy block facing the new chest. Connect the computer to the proxy block and right-click each modem to turn on. You'll get a chat message displaying the name of the peripheral. Modify the script to use the chest peripheral name instead of "top".

Posted Image

#9 Verox

  • Members
  • 8 posts

Posted 27 March 2014 - 12:26 PM

This looks pretty awesome, the only question I have is, does it have functionality for Magic Bees?

#10 McLeopold

  • Members
  • 123 posts

Posted 27 March 2014 - 03:04 PM

View PostVerox, on 27 March 2014 - 12:26 PM, said:

This looks pretty awesome, the only question I have is, does it have functionality for Magic Bees?

Yes it does. OpenPeripheral has a function on the apiary called getBeeBreedingData() which returns all the possible mutations and percentage. This replaces the giant mutation graph of the last version and has the benefit of always working with the mod pack you have installed. I'm using forestry+magic bees-extra bees and I've run a test that breeds up to Esoteric.

#11 NerdimusPrime

  • Members
  • 21 posts

Posted 27 March 2014 - 03:15 PM

View PostMcLeopold, on 27 March 2014 - 08:38 AM, said:

View PostNerdimusPrime, on 27 March 2014 - 02:23 AM, said:

Even with a setup facing the same direction as the default, with a double chest I'm getting the message: openbee: 108: slot id (27) must be less than size (27) If I use a half chest I don't get that message, and bees are pushed to the analyzer and back to the chest correctly, but then don't get pushed down into the apiary because there's only a half chest that doesn't cover the apiary.

First, get the new update. Second, try a setup like this with a proxy block and change the chestSide variable to "diamond_0" or whatever the name of it is after right-clicking on the wired modem. Also, this new version doesn't need an analyzer, so you can get started with breeding after finding your first piece of redstone and a few bees in a new world. (It doesn't make as good of decisions, but at least you can get to cultivated by the time you have a diamond and bronze.)

Thanks very much for the help. I'll be trying it out as soon as I can.

#12 apemanzilla

  • Members
  • 1,421 posts

Posted 27 March 2014 - 07:06 PM

Nice to see it got ported over :) will try later

#13 NerdimusPrime

  • Members
  • 21 posts

Posted 27 March 2014 - 10:46 PM

View PostMcLeopold, on 27 March 2014 - 08:38 AM, said:

First, get the new update. Second, try a setup like this with a proxy block and change the chestSide variable to "diamond_0" or whatever the name of it is after right-clicking on the wired modem. Also, this new version doesn't need an analyzer, so you can get started with breeding after finding your first piece of redstone and a few bees in a new world. (It doesn't make as good of decisions, but at least you can get to cultivated by the time you have a diamond and bronze.)

View PostNerdimusPrime, on 27 March 2014 - 03:15 PM, said:

Thanks very much for the help. I'll be trying it out as soon as I can.
I'm starting to think I'm too stupid to be doing this.

I have the machines set up like in the pics.
I downloaded and ran openbee-install.
I modified openbee so chestSide = "gold_0" (used a gold chest instead of diamond) and saved it.
I put an unanalyzed forest princess and meadows drone in the chest and ran "openbee Imperial".
The bees go into the analyzer, get analyzed, and go back in the chest.
Then I get this: http://i.imgur.com/GMUTzrD.png

No matter how many or what species I put in there and press enter, it returns the same thing. I stopped the program and did it again from scratch, entering Noble instead of Imperial. Then Cultivated. Then Common. Same result every time.

Head --> Desk

Edited by NerdimusPrime, 28 March 2014 - 12:10 AM.


#14 Technium

  • Members
  • 6 posts

Posted 27 March 2014 - 11:04 PM

Okay, the proxy takes care of the chest problem perfectly and the optional analyzer is a great feature, but I clearly don't understand this reference bee system at all :)

If I put unanalysed bees in the chest it properly analyses them but won't accept some mundane fresh bees to breed Cultivated or Common ("add more species"). If I start with a selection of random analysed bees it seems to treat most/all of them as reference. I'm lost, and can't get it to start at all no matter what I do.

#15 NerdimusPrime

  • Members
  • 21 posts

Posted 28 March 2014 - 12:10 AM

View PostTechnium, on 27 March 2014 - 11:04 PM, said:

Okay, the proxy takes care of the chest problem perfectly and the optional analyzer is a great feature, but I clearly don't understand this reference bee system at all :)

If I put unanalysed bees in the chest it properly analyses them but won't accept some mundane fresh bees to breed Cultivated or Common ("add more species"). If I start with a selection of random analysed bees it seems to treat most/all of them as reference. I'm lost, and can't get it to start at all no matter what I do.

Glad I'm not the only one. LOL

Edited by NerdimusPrime, 28 March 2014 - 12:11 AM.


#16 McLeopold

  • Members
  • 123 posts

Posted 28 March 2014 - 12:12 AM

"Reference bees" are a term I made up. I want the system to keep 1 pure-bred bee of each species and type in the chest that won't get used so you don't lose a species. They will be used to bred extra drones if needed. You'll need to start with at least 1 duplicate princess to get started, so 2 forest princesses or 2 meadows. You'll also need a drone of a different species to breed with the duplicate princess.

I started with 2 forest princesses and 1 meadows princess with a drone of each for 5 total bees. The system found 4 "reference" bees, 0 quees, 1 princess and 0 drones. This means only the extra forest princess is available for breeding. It's smart enough to know to breed the meadows reference princess with the meadows reference drone to produce an extra meadows drone, then use that to breed with the extra forest princess.

Overall it make the system slightly slow to breed up to the higher tiers, but you are less likely to lose a stepping stone species. I can put in an option to not use reference bees, but then you are on your own to maintain copies of ones you want to keep.

If you don't have an analyzer, it will not try to keep reference bees and you may lose a species.

#17 VerTiGo_Etrex

  • Members
  • 11 posts

Posted 28 March 2014 - 12:13 AM

Base on a brief review of the source code, I think it tries to preserve at least one princess of each species.

#18 McLeopold

  • Members
  • 123 posts

Posted 28 March 2014 - 12:13 AM

View PostNerdimusPrime, on 28 March 2014 - 12:10 AM, said:

View PostTechnium, on 27 March 2014 - 11:04 PM, said:

Okay, the proxy takes care of the chest problem perfectly and the optional analyzer is a great feature, but I clearly don't understand this reference bee system at all :)

If I put unanalysed bees in the chest it properly analyses them but won't accept some mundane fresh bees to breed Cultivated or Common ("add more species"). If I start with a selection of random analysed bees it seems to treat most/all of them as reference. I'm lost, and can't get it to start at all no matter what I do.

Glad I'm not the only one. LOL

If the system doesn't start breeding, take a screenshot of the bees in the chest or make a list. I'll try and replicate it to see if there is a bug.

#19 McLeopold

  • Members
  • 123 posts

Posted 28 March 2014 - 12:42 AM

View PostNerdimusPrime, on 27 March 2014 - 10:46 PM, said:


Then I get this: http://i.imgur.com/GMUTzrD.png

--snip--

Head --> Desk
I see in the screen shot you have a "bees.species.meadows-bees.species.cultivated Drone" when I would have expected a "Meadows-Cultivated Drone". What version of CC and OpenPeripherals do you have? What mod pack is it?

#20 VerTiGo_Etrex

  • Members
  • 11 posts

Posted 28 March 2014 - 12:48 AM

I was in the middle of breeding Wight bees, and it crashed for the flowerProvider trait. The primary prints as "Flowers", and the inactive prints as nothing (nil? not sure).

In the beealyzer, it's listed as "Exotic Flowers".

http://snag.gy/jeNq0.jpg
http://snag.gy/Czp9Q.jpg





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users