Two bee or not two bee, that is the question

Inherent Challenges

The neural network does what bees don’t, they bumble around in a “reactive” pattern.

If movement is based on an algorithm (which is what NN effectively does – “same output” for “same input”), it will do the same thing every time – like go to the same flower (unless a new one appears, or someone gets there quicker). The trail below shows the dangers of an “algorithm”.

If it encounters an obstacle, it avoids and it learns to head towards flowers. But this kind of approach is left wanting.

There are zero guarantees it will discover flowers. If flowers accidentally arrive in the visual sensor they will head towards them. But at all other times, they head in a direction until avoidance is required or a flower becomes visible. Not very efficient, and excellent at causing loops, as it aptly proved.

Why do some bees fail to return home?

Resolving a blocked path (trees) is actually difficult. Take this poor bee. You’re yelling “turn left and nip between the trees”, or turn right and follow the tree line, turning left at the end of them.

Do you think you can auto-route in 62 neurons? If you can, why are you reading my posting?

Accelerating the learning

With mono-vision, it doesn’t take long for the bees to escape the hive and start wandering around. Over time it improves targeting flowers.

The downside in the approach is that the bees that escape aren’t necessarily fit to cope with some core techniques, that is dodging a tree to the left and dodging a tree to the right. We can accelerate learning by tailoring the environment to force the failure of those incapable of existing in the wider environment.

Here’s an example of the approach. Bees leave the hive and are forced to avoid both sides, and those that get and go towards flowers are rewarded. Think of it as a kind of “mutation” version of “back-propagation”.

To enable “accelerated learning”, edit the config.cs.

/// <summary>
/// We can make the environment weed out the poor performing bees early on, by
/// giving the a specific course that requires them to dodge left, right and
/// collect flowers before they are let loose.
/// </summary>
internal const bool c_acceleratedTraining = true; // default: false, it learns quick enough anyway for mono vision

Here’s it in action…

I hope you found this post both interesting and thought-provoking. I plan to follow up in due course with more about how to achieve a smarter AI for this task. The work is in progress but in the interest of regular posting I’ve made this available now.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *