, 11 tweets, 6 min read Read on Twitter
Today in microworlds, I'm adding consensus algorithm examples. Here is one inspired by the Slush algorithm from the Avalanche paper.

Each turtle starts off either green or blue, and emit pheromones of that color. As they move through the world they switch to the strongest scent.
Here is the system at 10, 100 and 900 time steps.
Here is an uncompressed video, since twitter hates these: fieldnotes.resistant.tech/videos/slush-c…
The initial distribution matters a lot (more - because, unlike slush, we are sampling from our neighbours, not from the global population)

Compare:
1) P(green) = 0.55
2) P(purple) = 0.55
3 P(green) = 0.5
That last one eventually converged after ~3400 time steps.
Now one based on the snowball algorithm. In this cases turtles colors get reinforced, and become much more difficult to change as time goes on.

Because of the sampling this leaves pockets of stubbornness as initial color distributions trend to 1:1.
Time steps 10,100,1000 and 2000. You can see that slowly the stubbornness dissipates. Compared to the previous slush-inspired algorithm it does converge much faster in many conditions.
To demonstrate that last point:

Image 1 is of the snowball inspired algorithm after ~400 time steps with an initial distribution of 45:55.

Image 2 is of the slush inspired algorithm after ~400 steps with the same distribution.
I've pushed both these algorithms to the repo, if you would like to play with them.

git.openprivacy.ca/sarah/microwor…
(I say "-inspired" for both of these because the nodes don't make decisions by querying nodes directly but rather by sensing signals emitted by the nodes as they random-walk around the environment)
I've made some tweaks to the snowball algorithm (don't drop signal until after checking, and only drop if sureness is > 0)

It converges must faster now, even when close to 50:50.
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to Sarah Jamie Lewis
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!