Envisioning (and building!) a new way to program robots using blockchain — Meet Grex.ai

Tobias Disse
Kryha
5 min readMay 2, 2018

--

And the winner is… Kryha! On April 8th, we’ve won the biggest blockchain hackathon in the world by building a platform for decentralized swarm intelligence. Here’s how we came up with the idea and how we actually got it to work (using drones and a 5-day old unreleased BigchainDB 2.0 build!).

“This team gives us a new way of programming code. Figuring out how to get the software on the robots so they know how to behave is a big deal. This is a very new way of figuring out how we can program robots; not just one robot, but swarms of them.” -Vinay Gupta, CEO of Mattereum

The vision: Machines working together autonomously for the benefit of society

Climate change is happening and it’s happening fast. Whole landscapes are changing rapidly; we’re watching as whole cities are drying up, huge typhoons are hitting Asian coasts and Greenland is actually turning into a green land (which is bad, mind you). Summers are getting hotter, winters are getting colder and sea levels are steadily rising.

These changes bring along disasters all over the world, costing our society countless lives and trillions of dollars in repairs. When disaster (e.g. a hurricane) looms, we usually work through these steps: Research the approaching storm and the area to assess the potential impact on the area, start search & rescue after the storm hit to save as many lives as possible and eventually we prepare for rebuilding by running aerial observations.

In nature, these types of disasters are both caused and repaired by nature. To understand why, let’s consider a termite colony and how they collectively react to destruction. Termites build their colony using dead plant material and cellulose, working in a strict hierarchy while building it. The King and Queen are protected by Soldier termites and the nests get build by Worker termites. When their colony gets destroyed, Worker termites start rebuilding the nests while Soldier termites protect it from intruders.

Let’s try to learn from this example; what if we could automate this process and have a new species of autonomous machines that work together in a swarm to rebuild society? What if this new species could pro-actively detect and assess disasters and automatically deploy missions to locations in order to start search & rescue? This species could communicate with one another, collectively make decisions, evolve and thus help rebuilding societies that were hit by disaster! There would be no need for on-land transportation, no need for expensive airplanes and helicopters and no need to risk the lives of search & rescue volunteers.

Instead, we would have a self-sustaining and fully autonomous ecosystem of robots that would co-exist with our society and aim to provide disaster relief.

Introducing Grex.ai — A platform for building a decentral hivemind

With Grex, we hope to provide the groundwork for building a decentralized hivemind. This collective intelligence for robots (e.g. drones) could be tasked with aerial observations, exploration missions, disaster impact analysis, search & rescue missions and even rebuilding cities!

How we’ve done it — Working with bleeding-edge tech

“We did some effort, the community did an effort and the team did an effort. That’s the beauty of this and other teams and solutions. This team is really next level!” -Dimitri de Jonghe, co-founder of BigChainDB and Ocean Protocol

We identified BigchainDB 2.0 as one of, if not the best, platform to implement and showcase the strengths of Grex. Grex is a decentralized autonomous swarm intelligence, creating an ownerless, trusted decentralized network of drones to embark on dangerous missions for the advancement of mankind. Grex used several strengths of BigchainDB 2.0, namely its Byzantine fault tolerance.This fault tolerance increases the robustness of the network; in the case that the drones fail, the data will still be able to be propagated in a trusted manner.

BigchainDB 2.0, which currently uses MongoDB, allowed us to work with a unique interface for handling objects. The Object Relational Model (ORM), enabled us to create and modify objects in the database. The nature of blockchain is immutability, so the ORM also had to be adjusted for its application to blockchain. This is done based on the Create Retrieve Append Burn model (implemented on BigchainDB by Jernej Pregelj, see the blog post for a more in-depth introduction).

For Grex, the CRAB model was used to implement several objects within the BigchainDB database. An example of this would be a mission object. The mission object contains a world object and several drone objects that act as agents to complete the mission. These objects can have state changes appended to them, which works as follows: drones send x and y coordinate changes, then the state of these objects are updated in the world state. With these changes being appended directly to the objects in BigchainDB, the retrieval of these objects and the changes they made is greatly simplified. Instead of having to go through the complete database searching for transactions containing the ID of the drone, world or mission, the database only needs to be queried for the desired object — this then returns it’s current state and all of the actions it has taken or changes that were made to it.

On top of that, we managed to run all of the BDB 2.0 stack (Tendermint, BDB and MongoDB) on Raspberry Pi 3B+, which enables us to think of drones on an IoT basis. Since each is capable to run a full node, we no longer have to worry about consensus and central servers.

“We could talk for hours on this team. We haven’t used IOT well because it is centralized, which is so vulnerable. This thing is a big deal, as it solves both the security and the streaming issue.” -Antonio Senatore, CTO of Deloitte EMEA Blockchain Lab​

At Kryha, we help organizations understand and engage with blockchain technology. We’re a multidisciplinary team of young blockchain enthusiasts, working closely together with our clients in order to guide them through the process of ideation to development.

We co-design viable and feasible blockchain concepts, then turn them into reality by building working prototypes.

Want to explore the possibilities of blockchain for your business? Visit our new website and get in touch!

--

--

Tobias Disse
Kryha

CEO & co-founder at Kryha.io // We’re a multidisciplinary team of young blockchain experts, helping organizations engage with blockchain technology.