Team-Resourceful / ResourcefulBees

Minecraft Mod for creating highly customized bees
https://www.resourcefulbees.com
GNU Lesser General Public License v3.0
75 stars 31 forks source link

bee pollination AI beehavior issue! #202

Closed Arlonkraugh closed 3 years ago

Arlonkraugh commented 3 years ago

Describe the bug all resourceful bees goes for the same pollination target block(if they can pollinate it) causing them to bump each other off the target block, vanilla bees don't do this. To Reproduce Steps to reproduce the behavior:

  1. build a 5x4x5 glass cube place a lot of pollination blocks inside.
  2. put down a beehive or multiple, in a side wall. a total of 8 bees will do (has to have the same pollination type ofc.).
  3. watch as they all go for the same block over and over again bumping each other off the block.
  4. this behavior also makes the bees use more honeycombs than they produce

Expected behavior bees go for "free" pollination blocks

Additional context i had to make environmental changes to counter this "beehavior" but this fix only allows for 24 bees of the same pollination type because cramming kills the bees.

Epic428 commented 3 years ago

So vanilla bees would do the same thing. Because of how flowers are scanned for they pick the first spot that is found. The difference between ours and vanilla is that ours is faster. You can use the honey dipper to designate a flower for the bee. However there’s a 10% chance the bee will forget upon leaving the hive in the mod version you’re using. Our alpha on curse has that removed. That’s also a vanilla feature. I’m also implementing and experimental performance mode where bees will only go to flowers they’ve been designated and not scan for flowers on their own. This means more active management by the player but once a flower position is given it doesn’t change.

Arlonkraugh commented 3 years ago

well yours aren't faster, on a 16 hive vanilla bees i get 5 times the combs as resourceful bees, vanilla bees do not all go for the same block every time. they change target block in my vanilla bee cube they go for different flowers to pollinate, yours always goes for the same block and every bee goes for that block no matter how many you place.

Den tor. 1. apr. 2021 kl. 12.43 skrev James Moore @.***

:

Closed #202 https://github.com/Resourceful-Bees/ResourcefulBees/issues/202.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Resourceful-Bees/ResourcefulBees/issues/202#event-4540657272, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATPWMACZ5V2WU7LV2J5I7M3TGRE6HANCNFSM42G24QGA .

Arlonkraugh commented 3 years ago

also the issue caused by the bees stacking is that a 16 hive at 5 honey only have 2 cones in them unless you make stairs around the target block so they get crammed in and have it in range of the hive to enter from the target block, how ever this method makes baby bees unable to pollinate if you have more than 1 of them

Den tor. 1. apr. 2021 kl. 12.59 skrev Karl-Emil Madsen < @.***>:

well yours aren't faster, on a 16 hive vanilla bees i get 5 times the combs as resourceful bees, vanilla bees do not all go for the same block every time. they change target block in my vanilla bee cube they go for different flowers to pollinate, yours always goes for the same block and every bee goes for that block no matter how many you place.

Den tor. 1. apr. 2021 kl. 12.43 skrev James Moore < @.***>:

Closed #202 https://github.com/Resourceful-Bees/ResourcefulBees/issues/202.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Resourceful-Bees/ResourcefulBees/issues/202#event-4540657272, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATPWMACZ5V2WU7LV2J5I7M3TGRE6HANCNFSM42G24QGA .

Arlonkraugh commented 3 years ago

again no issues with this with vanilla bees

Den tor. 1. apr. 2021 kl. 13.03 skrev Karl-Emil Madsen < @.***>:

also the issue caused by the bees stacking is that a 16 hive at 5 honey only have 2 cones in them unless you make stairs around the target block so they get crammed in and have it in range of the hive to enter from the target block, how ever this method makes baby bees unable to pollinate if you have more than 1 of them

Den tor. 1. apr. 2021 kl. 12.59 skrev Karl-Emil Madsen < @.***>:

well yours aren't faster, on a 16 hive vanilla bees i get 5 times the combs as resourceful bees, vanilla bees do not all go for the same block every time. they change target block in my vanilla bee cube they go for different flowers to pollinate, yours always goes for the same block and every bee goes for that block no matter how many you place.

Den tor. 1. apr. 2021 kl. 12.43 skrev James Moore < @.***>:

Closed #202 https://github.com/Resourceful-Bees/ResourcefulBees/issues/202.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Resourceful-Bees/ResourcefulBees/issues/202#event-4540657272, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATPWMACZ5V2WU7LV2J5I7M3TGRE6HANCNFSM42G24QGA .

ThatGravyBoat commented 3 years ago

He's talking about the speed of the vanilla bee finding the flower we had to change it because vanilla takes so long to find a flower that it will literally kill your server due to how long it takes vanilla takes 0.5s to find a flower every tick ours takes 0.1s to find a flower which makes it so that the tps does drop, the problem is performance over QOL we take performance you can do what he told you and use a honey dipper on the bee and set its flower position.

trogarus commented 3 years ago

In theory, they created the honey dripper to address this issue. But unfortunately, for example coal bees, 16 in a 9X9X5 hive enclosure will still fight for the same flower after a period of time. I find I'm spending a lot of time in the hive structure to honey drip the bees repeatedly in order to keep them from flower fighting. Just some added input concerning the problem and the fact that the honey dripper isn't really solving the issue for long. Added note, there are flowers all over the grass in the structure so they have plenty of options.

Epic428 commented 3 years ago

That’s because vanilla function with a hive is that bees have a 10% chance to forget their flower. We retained that functionality. However our latest alpha release sees that removed

Lordeath19 commented 3 years ago

Hi, I have the same issues as @trogarus. I did notice that bees finding flowers was extremely fast compared to regular bees wondering about, but when comparing the amount of pollinations as compared to a regular bee nest, it seems that the apiary bees require the honey dripper to work effectively, else they would clump together (as described by this issue).

I really like the code and actually used it in a unity game I made as a pathfinding algorithm, but adding a random functionality would tremendously help bees in spreading their pollination goals.

I hope you can reopen the issue and address it :D

Epic428 commented 3 years ago

We’ve made changes in dev that address this issue and is not only faster than our previous code but also finds the closest flower position to the bee like vanilla.

Lordeath19 commented 3 years ago

Great! thank you this awesome mod btw :)