How was the programming language Kotlin developed?

Kotlin is now Google’s preferred choice for Android app development, but where did the programming language originally come from? Lead developer, Andrey Breslav, tells the story of how he began working on the project at JetBrains during his PhD.

Interview conducted at JetBrains HQ in St Petersburg, Russia. Produced by Tom Crawford, with thanks to ITMO University and JetBrains.

Cannibals and hats

Time for the next puzzle in the new feature from Tom Rocks Maths – check out the question below and send your answers to @tomrocksmaths on Facebook, Twitter, Instagram or via the contact form on my website. The answer to the last puzzle can be found here.

You are walking through the jungle with two friends when all of a sudden you are attacked by a group of cannibals. Fortunately, they do not eat you straightaway, but instead devise a puzzle that you must solve to avoid being eaten. The setup is as follows:

  • You are each tied to a pole such that you can only see forwards. The poles are placed in a line such that the person at the back can see the two people in front of them, the person in the middle can see one person in front of them, and the person at the front cannot see anyone else. See diagram below.

Screen Shot 2018-09-19 at 13.25.56

  • The cannibals produce five hats: 3 are black and 2 are white. You are all then blindfolded and a hat is placed on each persons head at random. The other two hats are hidden.
  • The blindfolds are removed and you are told that you will be set free provided that one of the group can correctly guess the colour of the hat that they are wearing. An incorrect guess will cause you all to be eaten.
  • The person at the back says that they do not know the colour of their hat. The person in the middle says that they also do not now the colour of their hat. Finally, the person at the front says that they DO know the colour of their hat.

The questions is: what colour hat is the person at the front wearing and how did they know the answer?

The answer will be posted in a few weeks along with the next puzzle – good luck!

This robot is a ‘Cheetah’

Robots are developing at an incredible rate, with their ability to perform real-world tasks improving almost by the minute. Such rapid development doesn’t come without downsides, and there are many people who believe that artificial intelligence (AI) could become too powerful, leading to the possibility of robots taking our jobs, or perhaps even taking over the world! Whilst these fears might not be completely unjustified, let’s instead focus on the positives for the time being and marvel at the astonishing accomplishments being made in the field of robotics.

The Cheetah robot, developed by scientists at MIT, is roughly the same shape and size as a small dog, and has been designed to be able to walk across difficult terrains efficiently and effectively. Such a trait is particularly useful when we need to explore dangerous and hazardous environments that may be unsuitable for humans, such as the Fukushima nuclear power plant that collapsed in Japan in 2011. Like all robots, it uses algorithms to help it to navigate, stabilise itself, and ensure that its movements are natural. The latest version, the Cheetah 3, was unveiled in early July, and I think it’s fair to say that it wouldn’t look too far out of place in the animal kingdom!

Picture1

[Image courtesy of Sangbae Kim, MIT]

Perhaps the most impressive feature of the Cheetah 3 is that the strangely adorable hunk of metal performs the majority of its navigation without any visual input, meaning that it is effectively blind. The researchers at MIT believe that this is a more robust way to design the robot, since visual data can be noisy and unreliable, whereas an input such as touch is always available. Let’s imagine that you are in a pitch-black room; how would you find your way around? Your eyes are pretty much useless, but you can use your sense of touch to feel around the environment, making sure that you don’t bump into walls or obstacles. It’s also important to step carefully, so that you don’t misjudge where the floor is, or tread too strongly and break through something. The Cheetah 3 takes all of this into account as it gracefully glides across even the roughest terrain.

One of the key ideas that was addressed in the new model is contact detection. This means that the robot is able to work out when to commit to putting pressure on a step, or whether it should swing its leg instead, based on the surface that it is stepping onto. This has a massive impact on its ability to balance when it is walking on rough terrain, or one that is full of different obstacles; it also makes each step quicker and more natural. Going back to our dark room, you are likely to step quite tentatively if you can’t see where you are going as this will allow you to react to whatever surface you come into contact with, and adjust your motion as required. With the latest update, the clever ‘canine’ can make these adjustments by itself in a natural manner.

The Cheetah 3 also contains a new and improved prediction model. This can calculate how much pressure will need to be applied to each leg when it experiences a force, by estimating what will happen in half a second’s time. Returning once again to our pitch-black room, imagine how great it would be if you were able to predict what you’re about to step on and adjust your path accordingly – no more treading on sharp objects or stubbing your toe! The scientists tested the power of the new model by kicking the robot when it was walking on a treadmill. Using its prediction algorithm, the Cheetah 3 was able to quickly calculate the forces it needed to exert in order to correctly balance itself again and keep moving. Whilst I can confirm that no animals were harmed in the making of this robot, whether or not the robot itself felt harm is perhaps a question for another day…

The new and improved Cheetah 3 is certainly one of the more remarkable recent accomplishments in the field of robotics. Its natural movements and quick corrections mean that it excellently mimics animal navigation, and it is easy to see how such a robot would be extremely useful for exploring dangerous terrains. Such incredible progress in the study of robotics is as impressive and exciting as it is scary. While it is extraordinary that we are able to replicate animal movements so closely, it has rightly made many people slightly worried; will robots eventually be able to completely replace us? We can only cross our fingers that these critters have no plans for world domination just yet…

Kai Laddiman

WordPress.com.

Up ↑